@viniciosrab/pi-claude-bridge
Pi extension that uses Claude Code (via Agent SDK) as a model provider and adds an AskClaude tool.
Package details
Install @viniciosrab/pi-claude-bridge from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@viniciosrab/pi-claude-bridge- Package
@viniciosrab/pi-claude-bridge- Version
0.9.4-fork.13- Published
- Nov 4, 2026
- Downloads
- 2,428/mo · 1,581/wk
- Author
- viniciosrab
- License
- MIT
- Types
- extension
- Size
- 467.7 KB
- Dependencies
- 4 dependencies · 4 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-claude-bridge
Use Claude (Fable, Opus, Sonnet, Haiku) as a model in pi, through your Claude Code subscription. Every tool call runs in pi's TUI, as with any other model.
Automated mirror of pi-claude-bridge by Eli Dickinson, with a few fork-only options. Versions match upstream;
X.Y.(Z+1)-fork.Nis upstreamX.Y.Zplus newer fork changes.
Install
pi install npm:@viniciosrab/pi-claude-bridge
Requires pi 0.86.1 or newer and a Claude Code login. Usage counts against your Claude plan, the same as Claude Code.
Use
Pick a model with /model, e.g. claude-bridge/claude-opus-5 or claude-bridge/claude-haiku-4-5. New Claude models appear on their own after pi update.
Skills, AGENTS.md/CLAUDE.md and steering work as usual.
Configure
Optional. Global: ~/.pi/agent/claude-bridge.json. Per project: .pi/claude-bridge.json, merged over the global file.
{
"provider": {
"plan": "max"
}
}
provider option |
Default | What it does |
|---|---|---|
plan |
"pro" |
Set to "max" on Max, Team Premium or Enterprise to unlock 1M context on Opus 4.6. |
longContextExtraUsage |
false |
Allow 1M-context models that bill Extra Usage (Sonnet 4.6; Opus 4.6 on Pro). |
forceTwoHundredK |
[] |
Model ids to cap at 200K, if Claude Code refuses 1M for them on your plan. |
strictMcpConfig |
true |
Ignore MCP servers from ~/.claude.json and .mcp.json. |
autoMemoryEnabled |
false |
Turn on Claude Code's auto-memory. |
pathToClaudeCodeExecutable |
bundled | Path to your own claude binary (e.g. on Nix). |
Fable 5/5.1, Opus 5.5/5/4.8/4.7, Sonnet 5.5/5 and Haiku 5.5 get 1M context on every plan. Newer models start at 200K until the bridge adds them. Fable is not included in Pro without Extra Usage.
Fork-only options
Also under provider:
| Option | Default | What it does |
|---|---|---|
loadClaudeSettings |
true |
Set false to skip Claude Code's settings.json hooks and plugins on each turn. That cuts tokens and latency, but it also drops env and apiKeyHelper from those settings. |
rateLimitWarnings |
true |
Set false to hide the rate-limit warnings and reset-time notices. |
The fork also removes Claude Code's 2,048-character cap on MCP tool descriptions, which hid codemode's MCP servers from Claude.
Troubleshooting
- Every turn fails with an auth error. Unset any
ANTHROPIC_BASE_URL,ANTHROPIC_API_KEYorANTHROPIC_AUTH_TOKENyou export: they redirect Claude Code away from your subscription. - A turn is refused because of the system prompt. Usually another extension changed or replaced pi's system prompt: fix or disable it. If the error points at your own text, reword it.
- Updated AGENTS.md or skills are ignored. The prompt is captured at the start of a session. Start a new session.
- A turn costs more after an abort,
/compactor a branch switch. The bridge resends the whole conversation, which usually misses the prompt cache. This is expected. - Claude Code hooks add duplicate guidance.
~/.claude/settings.jsonhooks also fire in bridge turns. Have the hook skip them:[ -n "$PI_CODING_AGENT" ] && exit 0. - Subagents with @gotgenes/pi-subagents. Add
{"promptInheritance": {"claude-bridge": "portable"}}to~/.pi/agent/subagents.json.
For bug reports, set CLAUDE_BRIDGE_DEBUG=1 and attach ~/.pi/agent/claude-bridge.log plus the matching file in ~/.pi/agent/cc-cli-logs/.
Extension authors and contributors: see upstream's full README.