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
{{ message }}
Repository navigation
race condition when applying changes immediatly after each other on same file #3856
When multiple changes are proposed for user to accept on the same file and user press "enter" to accept them one by one immediately after each other, the last change on the file will override all previous changes, resulting the previous changes not being applied correctly on that file and only the last change is applied correctly.
OpenCode version
0.15.29
Steps to reproduce
send a prompt that results in multiple changes that need to be accepted sequentially on one file
accept all of them by pressing "enter" multiple times quickly
Found workaround: set permission "write": true. OpenCode rejects writes out of the working directory, and has functionality to undo the last edit. So I think this permission must be safe for most cases
Found workaround: set permission "write": true. OpenCode rejects writes out of the working directory, and has functionality to undo the last edit. So I think this permission must be safe for most cases
I think write tool is being enabled by default. Also, to reproduce this error, the file do not have to be outside of cwd.
Activity
github-actions commentedon Nov 3, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
sr-tream commentedon Nov 6, 2025
Found workaround: set permission
"write": true. OpenCode rejects writes out of the working directory, and has functionality to undo the last edit. So I think this permission must be safe for most caseschenxin-yan commentedon Nov 7, 2025
I think write tool is being enabled by default. Also, to reproduce this error, the file do not have to be outside of cwd.