About this project
pi-claude-bridge is a Pi extension that integrates Claude Code through Anthropic's Agent SDK. It began as a fork of claude-agent-sdk-pi and adds streaming, MCP tool bridging, custom Pi tool bridging, session resume and persistence, context sync, thinking support, skills forwarding and various correctness fixes.
It offers two main capabilities. First, a provider: Claude models (Opus, Sonnet, Haiku) can be selected in Pi's model picker, with tool calls flowing through Pi's TUI. Pi's tools are bridged to Claude Code, bash commands get a 120-second default timeout, Pi skills are copied into Claude Code's system prompt, and mid-turn steering is supported. The model list is drawn from pi-ai's Anthropic catalog, so new Claude models appear after updating that package. Extended 1M context is enabled for an explicit list of models, with configuration options for plan type and extra-usage billing; unlisted new models start at 200K to avoid unsupported requests.
Second, an opt-in AskClaude tool lets Pi's own LLM delegate questions or tasks to Claude Code when using another provider. It supports read, none and full modes, model and thinking-effort selection, and an isolated flag for clean sessions. Delegated calls avoid the user's global Claude configuration.
Configuration lives in a global or project JSON file and covers tool registration, default modes, plan, context handling, MCP restrictions, auto-memory and the path to the Claude executable. Debug logging can be enabled via an environment variable, writing bridge logs and per-query Claude Code CLI logs.
The README documents known issues: sessions are rebuilt more often than necessary and rebuilds are costly in prompt-cache terms; file edits made by Claude Code are not carried across rebuilds; older bridge versions fail on Pi 0.86; and exported Anthropic environment variables can override the Claude Code child process. It also notes compatibility caveats with other extensions and with a subagents extension, and describes unit and integration test commands.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.