Skip to content

[plan][bugfix] Normalize --yolo to --full-auto for Codex completion marker fix #984

Description

@ayazhankadessova

Implementation Plan: Ensure Codex Completion Marker via --yolo Normalization

Consensus Summary

Skill used: external-consensus (manual synthesis from the provided debate report; external CLI invocation skipped in read-only sandbox). The balanced fix is to normalize --yolo to Codex --full-auto in acw so Codex can write .tmp/finalize.txt, plus a small prompt clarification that shows the exact shell command to update the finalize file. Provider-aware prompt rendering and defensive completion inference are excluded to preserve the completion contract and keep the change minimal.

Goal

Ensure lol impl only completes when .tmp/finalize.txt contains Issue N resolved, and Codex can reliably write that file when --yolo is enabled via acw.

Success criteria:

  • acw codex ... --yolo passes --full-auto to the Codex CLI.
  • lol impl with Codex creates .tmp/finalize.txt and the completion marker only when done.
  • Docs for acw and lol impl accurately describe --yolo behavior.

Out of scope:

  • Provider-aware prompt rendering differences across CLIs.
  • Defensive completion inference based on git diffs or commit reports.

Future work assessment: ❌ Not needed — defensive completion inference masks incomplete work and should only be revisited if the completion contract is redesigned.

Bug Reproduction

Steps tried:

  • Inspected src/cli/acw/providers.sh for --yolo handling.
  • Inspected python/agentize/workflow/impl/continue-prompt.md and python/agentize/workflow/impl/kernels.py for completion marker rules.

Observed symptoms:

  • Codex runs reported in the debate summary lack .tmp/finalize.txt, preventing completion detection.

Environment snapshot:

  • Read-only sandbox; no Codex CLI execution available.

Root cause hypothesis:

  • --yolo is forwarded to Codex unchanged; Codex requires --full-auto for workspace writes, so the finalize file is never created.

Skip reason:

  • Runtime reproduction skipped because external Codex CLI is unavailable in this environment and the filesystem is read-only.

Codebase Analysis

Files verified (docs/code checked by agents):

  • python/agentize/workflow/impl/continue-prompt.md: current finalize marker instruction.
  • python/agentize/workflow/impl/kernels.py: completion marker parsing uses Issue {N} resolved.
  • src/cli/acw/providers.sh: --yolo normalization exists for Claude only.
  • docs/cli/acw.md: --yolo note in acw docs.
  • docs/cli/lol.md: lol impl flags and completion marker docs.
  • tests/cli/test-acw-yolo-translation.sh: existing Claude-only translation test.

File changes:

File Level Purpose
src/cli/acw/providers.sh minor Normalize --yolo to Codex --full-auto.
python/agentize/workflow/impl/continue-prompt.md minor Add explicit shell example for finalize file update.
docs/cli/acw.md minor Document Codex --full-auto mapping.
docs/cli/lol.md minor Update --yolo description for lol impl.
src/cli/acw/providers.md minor Update provider doc for Codex --yolo translation.
tests/cli/test-acw-yolo-translation.sh medium Extend test to cover Codex translation.

Modification level definitions:

  • minor: Cosmetic or trivial changes (comments, formatting, <10 LOC changed)
  • medium: Moderate changes to existing logic (10-50 LOC, no interface changes)
  • major: Significant structural changes (>50 LOC, interface changes, or new files)
  • remove: File deletion

Current architecture notes:
Completion is detected only by _parse_completion_marker() scanning .tmp/finalize.txt for Issue N resolved in python/agentize/workflow/impl/kernels.py, while acw currently normalizes --yolo only for Claude in src/cli/acw/providers.sh, leaving Codex without a write-permission flag.

Interface Design

New interfaces:

  • None.

Modified interfaces:

  • acw provider invocation for Codex now translates --yolo to --full-auto before calling codex exec.
-    codex exec --model "$model" -o "$output" "$@" - < "$input"
+    local args=()
+    for arg in "$@"; do
+        if [ "$arg" = "--yolo" ]; then
+            args+=( "--full-auto" )
+        else
+            args+=( "$arg" )
+        fi
+    done
+    codex exec --model "$model" -o "$output" "${args[@]}" - < "$input"

Documentation changes:

  • docs/cli/acw.md (Notes section --yolo mapping).
  • docs/cli/lol.md (lol impl options table).
  • src/cli/acw/providers.md (Codex invocation behavior).

Documentation Planning

High-level design docs (docs/)

  • docs/cli/acw.md — update --yolo mapping note to include Codex --full-auto.
- - Provider-specific options are passed through unchanged, except `--yolo` is normalized to Claude's `--dangerously-skip-permissions`
+ - Provider-specific options are passed through unchanged, except `--yolo` is normalized to Claude's `--dangerously-skip-permissions` and Codex's `--full-auto`
  • docs/cli/lol.md — update --yolo option description under lol impl.
- | `--yolo` | No | Off | Pass through to provider CLI options (Claude via acw maps to `--dangerously-skip-permissions`) |
+ | `--yolo` | No | Off | Pass through to provider CLI options (Claude via acw maps to `--dangerously-skip-permissions`; Codex maps to `--full-auto`) |

Folder READMEs

  • None.

Interface docs

  • src/cli/acw/providers.md — update Codex provider behavior.
- - Returns the Codex CLI exit code.
+ - Translates `--yolo` to `--full-auto` before invocation.
+ - Returns the Codex CLI exit code.

Test Strategy

Test modifications:

  • tests/cli/test-acw-yolo-translation.sh - Add Codex translation verification. Test case: acw codex ... --yolo passes --full-auto to stubbed Codex. Test case: --yolo is not passed directly to Codex.

New test files:

  • None.

Test data required:

  • Stub codex executable that logs arguments to a temp file.

Implementation Steps

Step 1: Documentation change (Estimated: 20 LOC)
File changes: docs/cli/acw.md, docs/cli/lol.md, src/cli/acw/providers.md
Dependencies: None
Correspondence: Docs: updates --yolo semantics per acw and lol impl interfaces. Tests: N/A

Step 2: Test case changes (Estimated: 30 LOC)
File changes: tests/cli/test-acw-yolo-translation.sh
Dependencies: Step 1
Correspondence: Docs: aligns test expectations with updated --yolo semantics. Tests: adds Codex translation checks.

Step 3: Implementation change (Estimated: 20 LOC)
File changes: src/cli/acw/providers.sh, python/agentize/workflow/impl/continue-prompt.md
Dependencies: Step 2
Correspondence: Docs: implements Codex --full-auto mapping and explicit finalize-file shell guidance. Tests: satisfies Codex translation checks.

- - update {{finalize_file}} with PR title (first line) and body (full file); include "Issue {{issue_no}} resolved" only when done.
+ - update {{finalize_file}} with PR title (first line) and body (full file); include "Issue {{issue_no}} resolved" only when done.
+ - example (shell): echo "Issue {{issue_no}} resolved" >> {{finalize_file}}

Total estimated complexity: ~70 LOC (Low)
Recommended approach: Single session
Milestone strategy: Not needed (small change)

Success Criteria

  • acw codex replaces --yolo with --full-auto in the actual provider invocation.
  • lol impl completion marker detection succeeds once .tmp/finalize.txt includes Issue N resolved.
  • docs/cli/acw.md and docs/cli/lol.md accurately describe --yolo behavior for Codex.

Risks and Mitigations

Risk Likelihood Impact Mitigation
Codex CLI flag name differs from --full-auto in some environments M H Validate with a real Codex run in a writable workspace; keep translation isolated in src/cli/acw/providers.sh for easy adjustment.
Prompt example encourages premature finalize updates L M Keep the "only when done" line unchanged and add the example as a concrete, optional reminder.

Dependencies

  • Codex CLI supports --full-auto for write permissions.
  • Existing completion marker contract remains Issue N resolved in .tmp/finalize.txt.

Dude, carefully read my response to determine what to do next.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentize:planPlan created by /ultra-planner command

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions