Constant failures to use the Write / Edit tools #944

Closed
opened 2026-02-16 17:28:52 -05:00 by yindo · 6 comments
Owner

Originally created by @sdeleon28 on GitHub (Jul 27, 2025).

Originally assigned to: @thdxr on GitHub.

I've been using opencode since around v0.3.40 or thereabouts. I keep hoping for this infuriating issue to go away but it just keeps happening.

Most of the time, when opencode tries to write / edit a file, I'm getting these errors as if the models are just incapable of producing output compatible with the expected payload.

Image

I'm using GPT-4.1 mini most of the time but I've tried many other OpenAI models and they all do the same.

Originally created by @sdeleon28 on GitHub (Jul 27, 2025). Originally assigned to: @thdxr on GitHub. I've been using `opencode` since around `v0.3.40` or thereabouts. I keep hoping for this infuriating issue to go away but it just keeps happening. Most of the time, when `opencode` tries to write / edit a file, I'm getting these errors as if the models are just incapable of producing output compatible with the expected payload. <img width="1410" height="514" alt="Image" src="https://github.com/user-attachments/assets/b06fb3de-da22-4017-98c9-cb37fce33582" /> I'm using GPT-4.1 mini most of the time but I've tried many other OpenAI models and they all do the same.
yindo added the model-problem label 2026-02-16 17:28:52 -05:00
yindo closed this issue 2026-02-16 17:28:52 -05:00
Author
Owner

@thdxr commented on GitHub (Jul 27, 2025):

gpt4.1 works the best - not mini

@thdxr commented on GitHub (Jul 27, 2025): gpt4.1 works the best - not mini
Author
Owner

@sdeleon28 commented on GitHub (Jul 28, 2025):

@thdxr I don't think this is a model issue. I just tried with Codex Mini (which is the model I use with codex and never fails to call any tools there).

Image

My general experience has been OpenAI models work fine without failing to call any tools in codex and they fail to call tools all the time in opencode, so I think the issue is specific to how opencode interacts with the models.

@sdeleon28 commented on GitHub (Jul 28, 2025): @thdxr I don't think this is a model issue. I just tried with Codex Mini (which is the model I use with `codex` and never fails to call any tools there). <img width="1708" height="1009" alt="Image" src="https://github.com/user-attachments/assets/a95b5f65-be76-43a3-9cf2-d157d89b5717" /> My general experience has been OpenAI models work fine without failing to call any tools in `codex` and they fail to call tools all the time in `opencode`, so I think the issue is specific to how `opencode` interacts with the models.
Author
Owner

@thdxr commented on GitHub (Aug 4, 2025):

i disabled the todo tool for non sonnet models

@thdxr commented on GitHub (Aug 4, 2025): i disabled the todo tool for non sonnet models
Author
Owner

@thdxr commented on GitHub (Aug 4, 2025):

let me look more into this

@thdxr commented on GitHub (Aug 4, 2025): let me look more into this
Author
Owner

@Cyrille37 commented on GitHub (Dec 8, 2025):

Hi
I solved some tool errors without forgetting to call /init at first.

@Cyrille37 commented on GitHub (Dec 8, 2025): Hi I solved some tool errors without forgetting to call `/init` at first.
Author
Owner

@rekram1-node commented on GitHub (Dec 13, 2025):

stale

@rekram1-node commented on GitHub (Dec 13, 2025): stale
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#944