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
JetBrains ACP on Windows apply_patch hang even though the file write succeeds #16371
When using OpenCode through the JetBrains ACP integration on Windows, apply_patch appears to hang after starting. If I manually cancel the operation, the file has already been created or updated successfully on disk. This problem only occurs in Git projects.
So the patch application itself succeeds, but the JetBrains ACP flow does not appear to surface completion correctly, making it look stuck.
This does not reproduce in the official OpenCode client.
Environment
OpenCode version: v1.2.20
Client: JetBrains AI Assistant ACP integration v1.2.20
IDE: JetBrains Rider 2025.3.3
OS: Windows 11
Reproduces in a git repository
Does not reproduce in the official OpenCode client
Expected behavior
After apply_patch successfully applies the patch, the tool call should complete normally in the JetBrains ACP UI.
Actual behavior
apply_patch starts
the JetBrains ACP UI appears to stay stuck / keep thinking
I manually cancel because it looks hung
after cancellation, the target file is already present or already updated correctly
In other words, the patch is applied successfully, but the completion state does not appear to be reflected correctly in the ACP integration.
Open a git project in JetBrains with OpenCode configured through ACP
Ask the agent to create a new file and write any string to it
Observe that the UI appears stuck after apply_patch starts
Manually cancel the operation
Check the filesystem: codex_patch_repro.txt exists and contains the expected content
This was reproducible multiple times for both file creation and file update.
This issue might be a duplicate of existing issues. Please check:
write tool causes client to hang indefinitely when creating a new file #15675: Same symptom — file write succeeds on Windows with JetBrains ACP but the client hangs indefinitely waiting for a completion signal; only resolves after manual cancellation. That issue focuses on the write tool, but the root cause (missing completed status update on Windows/ACP) appears to be the same pattern as what you're seeing with apply_patch.
Activity
github-actions commentedon Mar 6, 2026
This issue might be a duplicate of existing issues. Please check:
writetool causes client to hang indefinitely when creating a new file #15675: Same symptom — file write succeeds on Windows with JetBrains ACP but the client hangs indefinitely waiting for a completion signal; only resolves after manual cancellation. That issue focuses on thewritetool, but the root cause (missingcompletedstatus update on Windows/ACP) appears to be the same pattern as what you're seeing withapply_patch.If you believe this is a distinct issue (e.g. specific to
apply_patchin git repos), please let a maintainer know.lexwitte commentedon Apr 6, 2026
Not sure if this is related, but
apply_patchconstantly fails inside web version as well, however patches are applied.