You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A single apply_patch call with multiple *** Update File: sections for the same path reports success for every section, but only the final section’s changes persist. Earlier updates are computed from the original file and then overwritten during the write phase, while the returned diff incorrectly shows all changes as applied.
This disproportionately affects GPT Astra, which frequently emits multiple Update File sections for the same file in one apply_patch call. The silent loss then causes unnecessary repair turns and token use.
Plugins
none
OpenCode version
1.18.30
Steps to reproduce
Use any gpt model and prompt:
Create a temporary text file with two distinct lines using apply_patch. Then, in a single subsequent apply_patch call, include two separate *** Update File: sections targeting that same file: change the first line in the first section and the second line in the second section. Read the file afterward and report its contents. Do not merge the two edits into one Update File section.
It will drop the first update in this apply_patch call.
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊