Skip to content

JetBrains ACP on Windows apply_patch hang even though the file write succeeds #16371

Closed

Description

@Hithy

Description

Description

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.

Fix

windows-acp-git-fix.patch

Plugins

No response

OpenCode version

v1.2.20

Steps to reproduce

  1. Open a git project in JetBrains with OpenCode configured through ACP
  2. Ask the agent to create a new file and write any string to it
  3. Observe that the UI appears stuck after apply_patch starts
  4. Manually cancel the operation
  5. 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.

Screenshot and/or share link

Image

Operating System

Windows 11

Terminal

No response

Activity

  1. added
    bugSomething isn't working
    on Mar 6, 2026
  2. github-actions commented on Mar 6, 2026

    @github-actions
    Contributor

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

    If you believe this is a distinct issue (e.g. specific to apply_patch in git repos), please let a maintainer know.

  3. lexwitte commented on Apr 6, 2026

    @lexwitte

    Not sure if this is related, but apply_patch constantly fails inside web version as well, however patches are applied.

    Image
  4. assigned and unassigned on Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions