Skip to content

[#984][bugfix][cli] Normalize --yolo to --full-auto for Codex provider#986

Merged
ayazhankadessova merged 4 commits intomainfrom
issue-984
Apr 6, 2026
Merged

[#984][bugfix][cli] Normalize --yolo to --full-auto for Codex provider#986
ayazhankadessova merged 4 commits intomainfrom
issue-984

Conversation

@ayazhankadessova
Copy link
Copy Markdown
Contributor

@ayazhankadessova ayazhankadessova commented Apr 6, 2026

Summary

Fix Codex implementation backend completing in 1 iteration instead of looping 4+ times with "completion marker missing".

Root cause: Three compounding issues prevented Codex from writing .tmp/finalize.txt:

  1. --yolo flag was passed to Codex unchanged, but Codex requires --full-auto for workspace write permissions
  2. The prompt template buried the finalize instruction in a bullet list — too implicit for Codex's execution model
  3. Codex reads AGENTS.md at startup as persistent system instructions, but no such file existed

Three-layer fix:

Layer File What it does Effect
--yolo normalization providers.sh Translate --yolo--full-auto for Codex Codex can write files (was read-only before)
Prompt restructure continue-prompt.md Move completion signal to prominent standalone section with concrete cat heredoc example Codex understands it must create the file
AGENTS.md injection kernels.py Write AGENTS.md with finalize instructions in worktree before invoking non-claude agents Codex sees the instruction at startup, before the prompt

Measured improvement:

Attempt Iterations Impl time Total time
Before fix (infinite loop) 4+ (killed) >500s >900s
+--yolo normalization only 3 iterations 556s 904s
+stronger prompt 2 iterations 601s 1339s
All three fixes 1 iteration 91s 399s

Test plan

  • Claude --yolo translation test passes (existing)
  • Codex --yolo--full-auto translation test passes (new)
  • 62/62 Python tests pass
  • Live test: --mode full --limit 1 --impl-backend codex:gpt-5.2-codex completes in 1 iteration with impl_done
  • No regression for Claude sonnet impl backend (still 1 iteration)

Closes #984

🤖 Generated with Claude Code

Ayazhan Kadessova added 2 commits April 6, 2026 17:07
- docs/cli/acw.md: Update --yolo mapping note to include Codex --full-auto
- docs/cli/lol.md: Update --yolo option description for lol impl
- src/cli/acw/providers.md: Document Codex --yolo normalization

Related: #984
…cit finalize example

- src/cli/acw/providers.sh: Add --yolo → --full-auto normalization in
  _acw_invoke_codex(), matching Claude's --yolo → --dangerously-skip-permissions
  pattern. Without --full-auto, Codex runs in read-only sandbox and cannot
  write .tmp/finalize.txt, causing infinite FSM iteration loops.
- python/agentize/workflow/impl/continue-prompt.md: Add explicit shell command
  example for writing the completion marker file
- tests/cli/test-acw-codex-yolo-translation.sh: New test verifying --yolo
  is translated to --full-auto for Codex provider

All shell tests pass.

Related: #984
@ayazhankadessova ayazhankadessova added the agentize:pr PR created by agentize label Apr 6, 2026
Ayazhan Kadessova added 2 commits April 6, 2026 19:26
… template

- Restructure continue-prompt.md to make COMPLETION SIGNAL a prominent
  standalone section instead of buried in a bullet list
- Add explicit cat heredoc example showing exact file structure
- Explain that the orchestrator checks after every iteration and will
  loop if the marker is missing
- Instruct agent to create finalize file in the SAME iteration as the fix

Related: #984
- python/agentize/workflow/impl/kernels.py: Write AGENTS.md with explicit
  finalize.txt instructions before invoking non-claude impl agents (e.g. Codex).
  Codex reads AGENTS.md at startup as persistent system instructions, ensuring
  it sees the completion marker requirement before processing the prompt.
  Only written once (checked with exists()) and only for non-claude providers.

Related: #984
@ayazhankadessova ayazhankadessova merged commit 7a50c3a into main Apr 6, 2026
1 check passed
@ayazhankadessova ayazhankadessova deleted the issue-984 branch April 6, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentize:pr PR created by agentize

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants