Skip to content

Constant failures to use the Write / Edit tools #1357

Closed as not planned
Closed as not planned

Description

@sdeleon28

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.

Activity

  1. thdxr commented on Jul 28, 2025

    @thdxr
    Member

    gpt4.1 works the best - not mini

  2. sdeleon28 commented on Jul 28, 2025

    @sdeleon28
    Author

    @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.

  3. self-assigned this
    on Aug 4, 2025
  4. thdxr commented on Aug 4, 2025

    @thdxr
    Member

    i disabled the todo tool for non sonnet models

  5. thdxr commented on Aug 4, 2025

    @thdxr
    Member

    let me look more into this

  6. Cyrille37 commented on Dec 8, 2025

    @Cyrille37

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

  7. rekram1-node commented on Dec 13, 2025

    @rekram1-node
    Contributor

    stale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions