claude-code - 💡(How to fix) Fix [BUG] JetBrains AI Chat agent fails on Windows - spawn UNKNOWN / CLAUDE_CODE_GIT_BASH_PATH not passed to ACP process

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

2026-05-29 10:34:36,667 [ 25204] WARN - #c.i.m.l.a.a.p.AcpProcessHandler - [Claude Agent] stderr: Error handling request { type: 'com.agentclientprotocol.rpc.JsonRpcRequest', id: 4, method: 'session/new', params: { cwd: 'D:\Users\bryank01\dtf11\rev', mcpServers: [ [Object] ], _meta: { additionalRoots: [Array] } }, jsonrpc: '2.0' } { code: -32603, message: 'Internal error', data: { details: 'Claude Code process exited with code 1' } }

2026-05-29 10:34:36,667 [ 25204] FINE - #c.i.m.l.a.a.p.AcpProcessHandlerService - No process handler found for agent acp.registry.claude-acp in chat 332e42af-3003-4e7c-88b3-42cc9c123da0 2026-05-29 10:34:36,667 [ 25204] WARN - #c.i.m.l.a.a.c.AcpSessionLifecycleManager - Failed to initialize ACP session for chat 332e42af-3003-4e7c-88b3-42cc9c123da0, error: com.

Root Cause

Root causes found:

  1. JetBrains launches the ACP process with Target PATH: null, overwriting system PATH with only its bundled Node bin folder
  2. The bundled Node bin folder only has node.exe not node, causing npx.cmd to fail
  3. CLAUDE_CODE_GIT_BASH_PATH environment variable is not passed through to the ACP process
  4. The bundled claude.exe in the npx cache (@anthropic-ai/claude-agent-sdk-win32-x64) is not compatible with the OS
  5. CLAUDE_CODE_EXECUTABLE is not passed through, so the ACP wrapper cannot find a working claude binary

Fix Action

Fix / Workaround

Workaround:

  1. Copy node.exe to node in the JetBrains bundled Node bin folder
  2. Patch acp-agent.js in the npx cache to inject CLAUDE_CODE_GIT_BASH_PATH and CLAUDE_CODE_EXECUTABLE pointing to the working claude.exe from the npm global installation

Code Example

2026-05-29 10:34:36,667 [  25204]   WARN - #c.i.m.l.a.a.p.AcpProcessHandler - [Claude Agent] stderr: Error handling request {
  type: 'com.agentclientprotocol.rpc.JsonRpcRequest',
  id: 4,
  method: 'session/new',
  params: {
    cwd: 'D:\\Users\\bryank01\\dtf11\\rev',
    mcpServers: [ [Object] ],
    _meta: { additionalRoots: [Array] }
  },
  jsonrpc: '2.0'
} {
  code: -32603,
  message: 'Internal error',
  data: { details: 'Claude Code process exited with code 1' }
}

2026-05-29 10:34:36,667 [  25204]   FINE - #c.i.m.l.a.a.p.AcpProcessHandlerService - No process handler found for agent acp.registry.claude-acp in chat 332e42af-3003-4e7c-88b3-42cc9c123da0
2026-05-29 10:34:36,667 [  25204]   WARN - #c.i.m.l.a.a.c.AcpSessionLifecycleManager - Failed to initialize ACP session for chat 332e42af-3003-4e7c-88b3-42cc9c123da0, error: com.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Environment:

  • OS: Windows 10
  • IntelliJ IDEA 2026.1
  • Claude Code plugin: 0.1.14-beta
  • Claude Code: 2.1.154

Problem: The AI Chat Claude Agent fails to initialize on Windows with "Intellij AI Chat Failed to initialize ACP session. Error: Internal error: "Claude Code process exited with code 1"". Claude Code works fine in the terminal.

Root causes found:

  1. JetBrains launches the ACP process with Target PATH: null, overwriting system PATH with only its bundled Node bin folder
  2. The bundled Node bin folder only has node.exe not node, causing npx.cmd to fail
  3. CLAUDE_CODE_GIT_BASH_PATH environment variable is not passed through to the ACP process
  4. The bundled claude.exe in the npx cache (@anthropic-ai/claude-agent-sdk-win32-x64) is not compatible with the OS
  5. CLAUDE_CODE_EXECUTABLE is not passed through, so the ACP wrapper cannot find a working claude binary

What Should Happen?

Workaround:

  1. Copy node.exe to node in the JetBrains bundled Node bin folder
  2. Patch acp-agent.js in the npx cache to inject CLAUDE_CODE_GIT_BASH_PATH and CLAUDE_CODE_EXECUTABLE pointing to the working claude.exe from the npm global installation

Expected fix:

  • JetBrains should append to PATH rather than replace it
  • CLAUDE_CODE_GIT_BASH_PATH should be passed through to the ACP process environment
  • The bundled claude.exe should be compatible with Windows or fall back to the globally installed one

Error Messages/Logs

Intellij AI Chat Failed to initialize ACP session. Error: Internal error: "Claude Code process exited with code 1"

2026-05-29 10:34:36,667 [  25204]   WARN - #c.i.m.l.a.a.p.AcpProcessHandler - [Claude Agent] stderr: Error handling request {
  type: 'com.agentclientprotocol.rpc.JsonRpcRequest',
  id: 4,
  method: 'session/new',
  params: {
    cwd: 'D:\\Users\\bryank01\\dtf11\\rev',
    mcpServers: [ [Object] ],
    _meta: { additionalRoots: [Array] }
  },
  jsonrpc: '2.0'
} {
  code: -32603,
  message: 'Internal error',
  data: { details: 'Claude Code process exited with code 1' }
}

2026-05-29 10:34:36,667 [  25204]   FINE - #c.i.m.l.a.a.p.AcpProcessHandlerService - No process handler found for agent acp.registry.claude-acp in chat 332e42af-3003-4e7c-88b3-42cc9c123da0
2026-05-29 10:34:36,667 [  25204]   WARN - #c.i.m.l.a.a.c.AcpSessionLifecycleManager - Failed to initialize ACP session for chat 332e42af-3003-4e7c-88b3-42cc9c123da0, error: com.

Steps to Reproduce

  1. Start Intellij
  2. open AI Chat 3 install claude from APC Registry
  3. start conversation.

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.154

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

IntelliJ IDEA terminal

Additional Information

Intellij Terminal works fine I set that up ok, its the new AI chat window in IntelliJ

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING