opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Constant failures to use the Write / Edit tools

Open sdeleon28 opened this issue 5 months ago • 5 comments

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.

sdeleon28 avatar Jul 27 '25 17:07 sdeleon28

gpt4.1 works the best - not mini

thdxr avatar Jul 28 '25 00:07 thdxr

@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 avatar Jul 28 '25 16:07 sdeleon28

i disabled the todo tool for non sonnet models

thdxr avatar Aug 04 '25 21:08 thdxr

let me look more into this

thdxr avatar Aug 04 '25 21:08 thdxr

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

Cyrille37 avatar Dec 08 '25 12:12 Cyrille37

stale

rekram1-node avatar Dec 13 '25 05:12 rekram1-node