[BUG] IDE integration not working in JetBrains devcontainer setup

Resolved 💬 1 comment Opened Jun 6, 2026 by joepadmiraal Closed Jul 13, 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?

Description

When using the Claude Code plugin with a JetBrains devcontainer setup, the IDE integration does not work:

  • Running /ide inside Claude Code reports " No available IDEs detected. Please install the plugin and restart your IDE"
  • Selecting text in IntelliJ does not make it available in the Claude Code terminal
  • The Claude icon in the toolbar opens a terminal correctly, but no SSE connection is established between the plugin and Claude Code

Environment

  • Plugin version: com.anthropic.code.plugin v0.1.14-beta
  • IDE: IntelliJ IDEA 2026.1.2 (Build #IU-261.24374.151)
  • Setup: JetBrains Remote Development via devcontainer (JetBrains Gateway)
  • OS (host): Linux (Kubuntu 26.04)
  • Container base image: mcr.microsoft.com/devcontainers/base:ubuntu
  • Claude Code devcontainer feature: ghcr.io/anthropics/devcontainer-features/claude-code:1.0
  • Claude Code CLI version: 2.1.165

What Should Happen?

/ide should work and Claude Code should see the code I select in Intellij.

Error Messages/Logs

No available IDEs detected. Please install the plugin and restart your IDE

Steps to Reproduce

Steps to Reproduce

  1. Set up a devcontainer using the Anthropic Claude Code feature:

``json
"features": {
"ghcr.io/anthropics/devcontainer-features/claude-code:1.0": {}
}
``

  1. Add the plugin to the JetBrains devcontainer customizations:

``json
"customizations": {
"jetbrains": {
"backend": "IntelliJ",
"plugins": ["com.anthropic.code.plugin"]
}
}
``

  1. Open the devcontainer in IntelliJ via JetBrains Gateway
  2. Click the Claude icon to open a terminal
  3. Run claude in the terminal
  4. Run /ide — reports no IDE connected

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.165

Platform

Other

Operating System

Ubuntu/Debian Linux

Terminal/Shell

IntelliJ IDEA terminal

Additional Information

Investigation Findings

What works correctly

  • The plugin is installed and active on the host IDE (confirmed via idea.log)
  • The plugin correctly injects CLAUDE_CODE_SSE_PORT and ENABLE_IDE_INTEGRATION=true into terminals opened via the Claude icon:

``
diff_envs={CLAUDE_CODE_SSE_PORT=40417, ENABLE_IDE_INTEGRATION=true, ...}
``

  • Claude Code starts and listens on the assigned SSE port (confirmed via ss -tlnp)
  • The SSE port is reachable: curl localhost:40417 responds (with 400 Bad Request)
  • The container uses --network=host, so there is no network isolation between host and container

What fails

After the terminal is opened, the only plugin log activity is a marketplace update check. There is no connection attempt from the plugin to Claude Code's SSE port and no error logged:

16:28:18 - Terminal started with CLAUDE_CODE_SSE_PORT=40417
16:28:18 - Plugin is up to date          ← only plugin activity
(no further com.anthropic log entries)

Confirmed via ss -tnp: zero established connections to the SSE port throughout the session.

Root cause hypothesis

In JetBrains Remote Development (Gateway + devcontainer), the plugin code runs on the host and communicates with the container through the IJent gRPC tunnel — not via direct localhost TCP — even when --network=host is used.

Evidence: a previous session's idea.log contained:

SEVERE - Plugin to blame: Remote Execution Agent version: 261.24374.151
Last Action: com.anthropic.code.plugin.actions.OpenClaudeInTerminalAction
IjentUnavailableException$CommunicationFailure: Connection to IJent suddenly terminated

This confirms the plugin uses IJent (JetBrains' remote execution agent) as its transport layer. IJent-mediated port access requires ports to be explicitly registered — but the SSE port is assigned dynamically per session and is never added to forwardPorts. As a result, the IJent tunnel for the SSE port is never established, and the plugin silently fails to connect.

Additionally, the devcontainer-feature.json for ghcr.io/anthropics/devcontainer-features/claude-code:1.0 only includes VS Code customizations — no JetBrains plugin auto-install — so users must add the plugin manually to devcontainer.json.

Proposed Solution

The plugin needs to programmatically register the dynamic SSE port with IJent when running in a JetBrains devcontainer context, rather than relying on forwardPorts in devcontainer.json.

JetBrains provides an API for dynamic port forwarding through IJent (IjentTunnelsApi or similar). The plugin should:

  1. Detect that it is running in a devcontainer context (e.g. by checking DEVCONTAINER_CONFIG_PATH env var, or the presence of IJent)
  2. Choose an available SSE port
  3. Register that port with IJent for forwarding before injecting CLAUDE_CODE_SSE_PORT into the terminal environment
  4. Connect to the port via the IJent tunnel

Relevant log excerpts

Terminal opened with correct env vars (idea.log):

LocalTerminalDirectRunner - Started IjentChildPtyProcessAdapter from [/bin/bash, ...] 
diff_envs={CLAUDE_CODE_SSE_PORT=40417, ENABLE_IDE_INTEGRATION=true, FIG_TERM=1, ...}

Plugin crash tied to IJent during container rebuild (idea.log):

SEVERE - Plugin to blame: Remote Execution Agent version: 261.24374.151
Last Action: com.anthropic.code.plugin.actions.OpenClaudeInTerminalAction
IjentUnavailableException$CommunicationFailure: Connection to IJent suddenly terminated

SSE port listening but no connections:

$ ss -tlnp | grep 40417
LISTEN   0   511   *:40417   *:*

$ ss -tnp | grep 40417
(no output — no established connections)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗