[BUG] Intellij AI Chat Failed to initialize ACP session. Error: Internal error
Resolved 💬 2 comments Opened May 29, 2026 by kanebryant Closed Jul 1, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] 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:
- JetBrains launches the ACP process with
Target PATH: null, overwriting system PATH with only its bundled Node bin folder - The bundled Node bin folder only has
node.exenotnode, causing npx.cmd to fail CLAUDE_CODE_GIT_BASH_PATHenvironment variable is not passed through to the ACP process- The bundled
claude.exein the npx cache (@anthropic-ai/claude-agent-sdk-win32-x64) is not compatible with the OS CLAUDE_CODE_EXECUTABLEis not passed through, so the ACP wrapper cannot find a working claude binary
What Should Happen?
Workaround:
- Copy
node.exetonodein the JetBrains bundled Node bin folder - Patch
acp-agent.jsin the npx cache to injectCLAUDE_CODE_GIT_BASH_PATHandCLAUDE_CODE_EXECUTABLEpointing 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_PATHshould be passed through to the ACP process environment- The bundled
claude.exeshould 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
- Start Intellij
- open AI Chat
3 install claude from APC Registry
- 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
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗