How the bridge works
The bridge (src/bridge/) establishes a communication channel between the Claude Code CLI and IDE extensions using a local socket. The IDE extension sends context (open file, selection, cursor) to Claude Code, and Claude Code can trigger IDE actions (open files, show diffs, navigate to definitions).
Key components:
bridgeMain.ts— Main bridge event loopbridgeMessaging.ts— Message protocol between CLI and IDEreplBridge.ts— Bridges the REPL session to the IDEjwtUtils.ts— JWT-based auth for the bridge connectionsessionRunner.ts— Manages session execution through the bridge
Capabilities
With an IDE extension connected, Claude Code gains:File context
Claude sees your currently open file and cursor position without you needing to paste it
Selection awareness
Highlight code and Claude works on exactly that selection
Navigate to code
Claude can open files and jump to specific lines in your editor
Inline diffs
View Claude’s proposed changes as diffs directly in the IDE
Supported IDEs
- VS Code — via the Claude Code VS Code extension
- JetBrains — via the Claude Code JetBrains plugin (IntelliJ IDEA, WebStorm, PyCharm, GoLand, etc.)
Using the bridge
Once the IDE extension is installed and connected:The bridge connection uses a local socket and JWT authentication. No code leaves your machine through the bridge — it’s a local communication channel only.