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
When using plan mode with Claude Sonnet 4 (on a fairly simple task), the agent made a plan and hallucinated an implementation without realizing that it's in plan mode. Later when I switched it to build mode, it claimed that the implementation was already complete even though it didn't edit any files.
This issue might be a duplicate of existing issues. Please check:
plan mode agent still builds #1965: Gemini uses sed to edit files in plan mode - describes similar behavior where agents try to use tools to edit/fix files during planning stage
v0.4.11 ignores plan restrictions #1799: v0.4.11 ignores plan restrictions - reports plan mode agents going to bash to write files, ignoring plan mode restrictions
Feel free to ignore if none of these address your specific case.
Activity
github-actions commentedon Aug 19, 2025
This issue might be a duplicate of existing issues. Please check:
sedto edit files inplanmode - describes similar behavior where agents try to use tools to edit/fix files during planning stageFeel free to ignore if none of these address your specific case.
rekram1-node commentedon Aug 19, 2025
Thx for issue nikhil, Do you think this is basically same issue as #1965?
I have seen this happen a few times too
nikhilmaddirala commentedon Aug 21, 2025
Upon closer inspection, yes it's the same issue. It edited the file using cat >> file << 'EOF'.
But this was Claude Sonnet 4, and this never happens with claude code, so I think the issue is with opencode prompts.
Feel free to merge the issues.
rekram1-node commentedon Aug 21, 2025
Will do thx!