Skip to content

[bug] Edit tool overwrites unrelated accepted edits when applying multiple changes sequentially #3914

Closed as duplicate

Description

@sr-tream

Description

When using the edit tool, the model often suggests multiple changes for the same file, each targeting different, non-conflicting sections (e.g., via parallel_tool). If I accept the first edit, it applies as expected. On accepting the second edit, it undoes the first and applies only its own change; the same happens for a third edit, which undoes the second. As a result, only the last accepted edit is present in the file, and previous, unrelated accepted changes are lost.

Expected: Accepting edits in sequence should result in all non-conflicting changes being incorporated into the file, not overwritten by subsequent accepted edits.

OpenCode version

1.0.23

Steps to reproduce

  1. Request multiple (e.g., 3) non-conflicting edits for one file using the model's parallel_tool.
  2. Accept the first change. It is applied as expected.
  3. Accept the second change. The first change is overwritten (lost), and only the second change remains applied.
  4. Accept the third change. The second change is now lost, and only the third is present -- instead of combining all non-conflicting changes.

Screenshot and/or share link

https://opencode.ai/s/GBhyYK1U

Operating System

ArchLinux

Terminal

konsole

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 4, 2025
  2. github-actions commented on Nov 4, 2025

    @github-actions
    Contributor

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

    The core issue described in #3856 appears to be identical - when multiple changes are accepted quickly on the same file, only the last change is applied and previous changes are lost.

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions