doesnt edit files #1349

Closed
opened 2026-02-16 17:30:32 -05:00 by yindo · 17 comments
Owner

Originally created by @laflinwalker on GitHub (Aug 17, 2025).

Originally assigned to: @thdxr on GitHub.

Plan ok. But building has no effect on files

Originally created by @laflinwalker on GitHub (Aug 17, 2025). Originally assigned to: @thdxr on GitHub. Plan ok. But building has no effect on files
yindo closed this issue 2026-02-16 17:30:32 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 17, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1987: gpt-5-chat-latest tool calling issue - describes files not being created despite successful command execution
  • #2002: JSON Parse error with write tool after updating to v0.5.5 - reports write tool failures preventing file modifications
  • #1732: Github Copilot failure to Edit (Windows/WSL) - edit tool not being invoked despite planning success
  • #1090: When model uses edit tool it returns status 126 - files are edited but tool returns error status

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 17, 2025): This issue might be a duplicate of existing issues. Please check: - #1987: gpt-5-chat-latest tool calling issue - describes files not being created despite successful command execution - #2002: JSON Parse error with write tool after updating to v0.5.5 - reports write tool failures preventing file modifications - #1732: Github Copilot failure to Edit (Windows/WSL) - edit tool not being invoked despite planning success - #1090: When model uses edit tool it returns status 126 - files are edited but tool returns error status Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Aug 17, 2025):

can you elaborate? What model are you using?

Generally this is a model/prompting issue

@rekram1-node commented on GitHub (Aug 17, 2025): can you elaborate? What model are you using? Generally this is a model/prompting issue
Author
Owner

@Artawower commented on GitHub (Aug 17, 2025):

Exactly the same behavior. This is not prompting and not a model. I use sonnet4, and claude code edits files, opencode does not.

@Artawower commented on GitHub (Aug 17, 2025): Exactly the same behavior. This is not prompting and not a model. I use sonnet4, and claude code edits files, opencode does not.
Author
Owner

@rekram1-node commented on GitHub (Aug 17, 2025):

can you provide any more detail at all? Are you in plan mode? or build mode?

fresh install w/ sonnet4 I have 0 issue so I just need a tad more info to help you debug

@rekram1-node commented on GitHub (Aug 17, 2025): can you provide any more detail at all? Are you in plan mode? or build mode? fresh install w/ sonnet4 I have 0 issue so I just need a tad more info to help you debug
Author
Owner

@Artawower commented on GitHub (Aug 17, 2025):

In my case, it was build mode. However, I am unable to reproduce this behavior again (new session)

@Artawower commented on GitHub (Aug 17, 2025): In my case, it was build mode. However, I am unable to reproduce this behavior again (new session)
Author
Owner

@rekram1-node commented on GitHub (Aug 17, 2025):

did the llm say something like "I am sorry I cannot edit files" and did this by chance happen after switching from plan mode? I have seen that happen and we definitely need to address

As in:
switch from plan -> build, ask it to do action, "I cannot do X because I am in plan mode ..."

@rekram1-node commented on GitHub (Aug 17, 2025): did the llm say something like "I am sorry I cannot edit files" and did this by chance happen after switching from plan mode? I have seen that happen and we definitely need to address As in: switch from plan -> build, ask it to do action, "I cannot do X because I am in plan mode ..."
Author
Owner

@laflinwalker commented on GitHub (Aug 18, 2025):

@rekram1-node in build mode. I get statements like I modified the code or made changes but in actual file, no changes are made. I had installed using curl, the uninstalled and re-installed using bun. No improvement

@laflinwalker commented on GitHub (Aug 18, 2025): @rekram1-node in build mode. I get statements like I modified the code or made changes but in actual file, no changes are made. I had installed using curl, the uninstalled and re-installed using bun. No improvement
Author
Owner

@alexwinston commented on GitHub (Aug 18, 2025):

I am having the exact same problem. I am on a Mac and using the CLI, installed with brew, with GPT5. I am in build mode and it says the changes and new files have been saved but nothing has changed in the project. I am starting opencode from the project directory and using !pwd to ensure the correct directory once opencode is started. To ensure the simplest scenario I tried doing /init in an existing project and it says it created the AGENTS.md but it isn't. Hope this is helpful, happy to provide more details if needed.

@alexwinston commented on GitHub (Aug 18, 2025): I am having the exact same problem. I am on a Mac and using the CLI, installed with brew, with GPT5. I am in build mode and it says the changes and new files have been saved but nothing has changed in the project. I am starting opencode from the project directory and using !pwd to ensure the correct directory once opencode is started. To ensure the simplest scenario I tried doing /init in an existing project and it says it created the AGENTS.md but it isn't. Hope this is helpful, happy to provide more details if needed.
Author
Owner

@rekram1-node commented on GitHub (Aug 18, 2025):

gpt-5-chat-latest does not support tools btw

@rekram1-node commented on GitHub (Aug 18, 2025): gpt-5-chat-latest does not support tools btw
Author
Owner

@scbarnes commented on GitHub (Aug 21, 2025):

Symptom:
The agent will start a task, "working..." will constantly tick over but its either timed out and hasn't recovered or . I am not sure how opencode as yet logs its faults etc, but i'd wager there is some sort of timeout and unable to recover from that moment. thus you see "working..." constantly spinning but its a false positive.

Models
Sonnet | Opus | Sonic

Frequency:
After about 2-3 sessions it starts to arise. That or about after about 8-10 chat cycles (ie prompt/answer/prompt/answer) it eventually becomes a "stalling"

Like I said, I haven't to be blunt taken the time to investigate where or if opencode has any visible logs for this. I will try now but in case I don't this is all I have to give for now.

@scbarnes commented on GitHub (Aug 21, 2025): Symptom: The agent will start a task, "working..." will constantly tick over but its either timed out and hasn't recovered or <insert reason here thats not visible>. I am not sure how opencode as yet logs its faults etc, but i'd wager there is some sort of timeout and unable to recover from that moment. thus you see "working..." constantly spinning but its a false positive. Models Sonnet | Opus | Sonic Frequency: After about 2-3 sessions it starts to arise. That or about after about 8-10 chat cycles (ie prompt/answer/prompt/answer) it eventually becomes a "stalling" Like I said, I haven't to be blunt taken the time to investigate where or if opencode has any visible logs for this. I will try now but in case I don't this is all I have to give for now.
Author
Owner

@SassyMemer commented on GitHub (Aug 24, 2025):

Same for me. macOS client. Stuck indefinitely on planning phase and unable to move further. Whenever asked to implement the plan it's was giving the same planning output over and over. Model is kimi k2 and to some degree Gemini 2,5 Pro / DeepSeek. Also DeepSeek weren't even able to see files in Project directory resulting in [use the bash tool to list files in the data folder.

@SassyMemer commented on GitHub (Aug 24, 2025): Same for me. macOS client. Stuck indefinitely on planning phase and unable to move further. Whenever asked to implement the plan it's was giving the same planning output over and over. Model is kimi k2 and to some degree Gemini 2,5 Pro / DeepSeek. Also DeepSeek weren't even able to see files in Project directory resulting in [use the bash tool to list files in the data folder.
Author
Owner

@rekram1-node commented on GitHub (Sep 23, 2025):

Is anyone still having this issue?

@rekram1-node commented on GitHub (Sep 23, 2025): Is anyone still having this issue?
Author
Owner

@laszloagardi commented on GitHub (Sep 29, 2025):

I am having a similar issue. Model tries to edit files, I have to manually approve edits (persmission is set to ask). As it spits out multiple few-line edits to the same file, I approve one-by-one (enter), but seems like only the last edit is applied.
Last tried with openrouter grok-4-fast:free.

@laszloagardi commented on GitHub (Sep 29, 2025): I am having a similar issue. Model tries to edit files, I have to manually approve edits (persmission is set to `ask`). As it spits out multiple few-line edits to the same file, I approve one-by-one (enter), but seems like only the last edit is applied. Last tried with openrouter grok-4-fast:free.
Author
Owner

@rekram1-node commented on GitHub (Sep 29, 2025):

hmm @laszloagardi are u on latest?

@rekram1-node commented on GitHub (Sep 29, 2025): hmm @laszloagardi are u on latest?
Author
Owner

@laszloagardi commented on GitHub (Sep 29, 2025):

yes, v0.13.4

@laszloagardi commented on GitHub (Sep 29, 2025): yes, v0.13.4
Author
Owner

@rekram1-node commented on GitHub (Sep 29, 2025):

got it I will try to replicate

@rekram1-node commented on GitHub (Sep 29, 2025): got it I will try to replicate
Author
Owner

@R44VC0RP commented on GitHub (Jan 25, 2026):

Closing this as stale - the original reports from Aug-Sep 2025 couldn't be reproduced, and we've since added fixes:

  • Per-file locking to prevent race conditions
  • Clearer "Edit applied successfully" messages

For those who were using GPT-5-chat-latest: That model doesn't support tool calling, which is required for file edits. Use a model that supports tools (Claude, GPT-4o, etc.).

If you're still experiencing edit issues on current versions (v1.1.x): Please open a new issue with:

  • Your model (provider/model name)
  • Specific repro steps
  • OpenCode version (opencode --version)

Thanks everyone for the reports!

@R44VC0RP commented on GitHub (Jan 25, 2026): Closing this as stale - the original reports from Aug-Sep 2025 couldn't be reproduced, and we've since added fixes: - Per-file locking to prevent race conditions - Clearer "Edit applied successfully" messages **For those who were using GPT-5-chat-latest:** That model doesn't support tool calling, which is required for file edits. Use a model that supports tools (Claude, GPT-4o, etc.). **If you're still experiencing edit issues on current versions (v1.1.x):** Please open a new issue with: - Your model (provider/model name) - Specific repro steps - OpenCode version (`opencode --version`) Thanks everyone for the reports!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1349