elidickinson/pi-claude-bridge
Claude Code inference provider for Pi. Allows the use of Claude Code of Pro/Max subscriptions from pi.dev.
What it solves
This project provides a bridge between the pi coding agent and Claude Code, allowing users to use Claude models (Opus, Sonnet, Haiku) as the primary intelligence for pi while maintaining the pi TUI (Terminal User Interface) and tool-calling capabilities. It also allows pi to delegate specific tasks to Claude Code as a separate tool when using other providers.
How it works
The bridge operates in two primary modes:
- Provider Mode: It registers Claude models as providers within
pi. When a user sends a request, the bridge forwards the request and tool calls to Claude Code via the Agent SDK, ensuring that bash commands and skills are handled correctly. It manages session synchronization betweenpi's history and Claude Code's sessions. - AskClaude Tool: This is an optional tool that allows
pi's current LLM (regardless of the provider) to delegate tasks or questions to Claude Code. This can be configured for read-only access or "full" mode (read, write, and bash access).
Who it’s for
Developers using the pi coding agent who want to integrate Claude's latest models and the specific capabilities of the Claude Code CLI tool into their workflow.
Highlights
- Seamless Model Integration: Automatically pulls Claude model lists from
pi-ai's catalog, supporting high-context windows (up to 1M tokens) for supported plans. - Flexible Delegation: The
AskClaudetool allows for second opinions, code reviews, or autonomous task handling via Claude Code. - TUI Preservation: All tool calls and tool results flow through
pi's TUI, maintaining a consistent user experience. - Detailed Debugging: Includes comprehensive logging for both the bridge and the Claude Code CLI subprocesses to troubleshoot session-resume failures.
- Cofigurable Control: Users can customize the plan type, context window limits, and the path to the Claude Code executable.
Related
- Project
- Project
- Dispatch
- Dispatch
- Project