💻 Four Integration Layers
Claude Desktop Handoff
/desktop command flushes sessions and opens via deep link claude://resume.
IDE Integration
Auto-detects VS Code, Cursor, Windsurf, 14+ JetBrains IDEs via lockfiles.
Claude in Chrome
Native messaging host manifest for browser extension tool invocation.
Computer Use MCP
Subscription-gated OS-level automation (screenshots, input, app control).
🔗 Desktop Handoff
Six-state machine: checking, prompt_download, flushing, opening, success, error. Deep link: claude://resume?session=uuid&cwd=path. Critical step: flushSessionStorage() writes all buffered turns to disk before opening.
💡 Platform Detection
macOS: check /Applications/Claude.app. Linux: xdg-mime query. Windows: HKEY_CLASSES_ROOT\claude registry.
🖥️ IDE Integration
Detection via ~/.claude/ide/
💡 Terminal Detection Shortcut
Before scanning lockfiles, checks TERM_PROGRAM env var against known IDE names. Returns immediately without filesystem I/O.
🌐 Claude in Chrome
Native messaging host manifest maps com.anthropic.claude_code_browser_extension to wrapper script invoking CLI with --chrome-native-host. Supports Chrome, Chromium, Brave, Edge, Opera, Vivaldi, Arc.
💡 Auto-Enable
Detects if extension installed and tengu_chrome_auto_enable GrowthBook flag is set. Disabled by default in non-interactive sessions.
🖱️ Computer Use MCP
Most heavily gated integration. Triple-gated: build-time feature('CHICAGO_MCP'), Max/Pro subscription, GrowthBook experiment tengu_malort_pedway. Codename 'Chicago'/'Malort'.
💡 Coordinate Mode Freeze
Coordinate mode (pixels vs normalized) freezes at first read. A live GrowthBook flip mid-session would cause model to think in one space while executor transforms in another.
📦 Native Installer
Binary lifecycle: ~/.local/share/claude/versions/ (permanent), ~/.cache/claude/staging/ (temporary), ~/.local/bin/claude (symlink). Keeps 2 versions on disk. PID-based lockfiles with 7-day stale timeout.
💡 Portable Session Storage
sessionStoragePortable.ts is dependency-free, shared verbatim with VS Code extension package. Same code reads session transcripts in both CLI and IDE plugin.