elidickinson/pi-claude-bridge
Agent SDK provider that brings Claude Code inference and session sync to Pi
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
pi-claude-bridge is a Node.js model-provider extension for Pi, not a standalone inference server. Pi renders prompts, holds the user-facing conversation, and supplies tools. The extension sends that input to a Claude Code subprocess through @anthropic-ai/claude-agent-sdk and bridges the Pi tools back into the turn. The manifest also lists @modelcontextprotocol/sdk, cc-session-io, @earendil-works/pi-ai, and @earendil-works/pi-coding-agent.
The harder part is keeping Pi history aligned with Claude Code's on-disk sessions. Before a fresh query, the bridge compares conversation content: unchanged history resumes the same session; tree navigation, edits, forks, and clones use records up to a safe shared prefix; model or instruction changes import Pi history into a new session. Session pointers, content digests, and record IDs persist under claude-bridge/sessions/ in Pi's agent directory so matching can recover after restart. Compaction and branch summaries use isolated queries rather than altering the live session.
Key Capabilities & Differentiators
The claude-bridge/... selector is populated from pi-ai's Anthropic catalog, omitting dated snapshots. The bridge also lists Mythos 5.1 and 5.2, but listing does not grant access: accounts outside approved programs receive a 404. Long-context support can reach 1M tokens; Opus 4.6 requires the matching Max-class plan configuration or, on Pro, Extra Usage, while Sonnet 4.6 uses the Extra Usage option. forceTwoHundredK provides a per-model 200K fallback. Pi's modelOverrides do not reliably change bridge model limits.
Pi skills and prompt or message edits reach Claude Code. By default, Pi's system prompt follows Claude Code's preset; the preset can be disabled. Mid-turn steering arrives at the next tool boundary, and bridged Bash commands get a 120-second timeout. The extension does not render a quota display itself: it exposes available rate-limit fields through Pi's after_provider_response event, and an event that arrives after a turn can surface on the next provider call.
Trade-offs & Limitations
The closest alternative, pi-claude-code, runs claude -p each turn and rewrites requests through a local proxy. The bridge avoids that on-the-wire rewrite by using the Agent SDK, but takes on the complexity of synchronizing native session records. Prompt changes can trigger a full uncached import and discard prior thinking; transient context messages can repeatedly invalidate cache reuse. Rewritten suffixes may also lose Claude Code file snapshots, and two bridge processes must not operate on the same Pi session concurrently.
The permission boundary is not identical to native Claude Code. User-level Claude hooks can run on normal turns, project hooks are not loaded, and isolated summary queries do not run hooks. Do not rely on Claude Code permission rules or PreToolUse hooks to block tools; enforce authorization in Pi. Local MCP config is blocked by default and cloud MCP is always blocked. The extension's MIT license is separate from Anthropic's service terms, and subscription coverage and Extra Usage billing should be checked before adoption.
Hardware & Deployment Guide
Use Node.js 20+ and Pi 1.5.1 or newer. Install with pi install npm:pi-claude-bridge, authenticate with claude auth login rather than Pi's /login, then select a claude-bridge/... model. Provider settings live in ~/.pi/agent/claude-bridge.json; pathToClaudeCodeExecutable can point to an installed Claude binary if the bundled one cannot run. Inference is remote. Locally, size for Pi, Claude Code subprocesses, tool workloads, and session storage rather than model weights or GPU memory.
Claude Code inherits Pi's environment, so exported Anthropic endpoint or credential variables can override the intended login path. Provider-scoped env values in ~/.pi/agent/auth.json can override or remove them; HOME, USERPROFILE, and CLAUDE_CONFIG_DIR are excluded there because session lookup relies on Pi's values. npm run test:unit runs offline; npm test adds API-backed integration tests that spawn Pi and Claude Code and need write access to ~/.claude. The supplied GitHub snapshot lists no latest release, so there is no tagged release milestone to assess.
Pi users who want to keep Pi's tools and branching workflow while using a Claude Code login, and whose extensions keep prompts and history stable across turns.
You need offline inference, depend on Claude Code hooks for tool authorization, frequently rewrite request history, or run the same session from multiple processes.
Quick Start & Installation
pi install npm:pi-claude-bridgeComparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| pi-claude-bridge ★ | 878 | +18 | JavaScript | MIT | Agent SDK provider that brings Claude Code inference and session sync to Pi |
| ECC | 316.1k | +4.2k | JavaScript | MIT | Plugins and CLI workflows for planning, reviewing, and verifying agent-written c |
| ponytail | 204.4k | +4.1k | JavaScript | MIT | A prompt-driven coding-agent plugin for smaller changes and focused tests. |
| spec-kit | 153.8k | +1.3k | Python | MIT | A Python CLI for spec-driven coding-agent workflows and reviewable handoffs |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/elidickinson/pi-claude-bridge.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about pi-claude-bridge
Which application owns conversation history, and how does session resume work?
Does this need a GPU, and what should I size on the workstation?
Can a company deploy this under MIT and use its Claude subscription?
When should I choose pi-claude-code or Pi's built-in Anthropic provider instead?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy