You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Codex in experimental plan mode create the plan file twice #10121
Codex models are equipped with the apply_patch tool, not able to use the write tool, and when in the experimental plan mode, it will first create the plan file using apply_patch but found itself violated instructions to mandate the write tool, then delete and recreate the same plan file.
Its thinking often shows something like:
Thinking: Correcting file creation to use write tool
The initial plan file was created with apply_patch, but instructions mandate using the write tool in plan mode, so I'll rewrite the file with the write tool.
Thinking: Confirming only patch-based file writes
The available tools lack a direct write or edit command, so file modifications must use apply_patch despite system reminders mentioning write. I'll continue using apply_patch for file changes.
Plugins
No response
OpenCode version
1.1.32
Steps to reproduce
Enable the experimental plan mode.
Select GPT Codex 5.2 with plan mode.
Ask to create a plan.
Observe the agent try to create the plan file twice.
Activity
github-actions commentedon Jan 23, 2026
This issue might be a duplicate of existing issues. Please check:
planagent runs amock and starts writing #10057:planagent runs amock and starts writing - related issue where the plan agent is making unexpected changes and creating files twiceFeel free to ignore if none of these address your specific case.
github-actions commentedon Mar 26, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.