- Item 2 (OQ3): capture PromptResponse.usage from conn.prompt and feed it into the bridge before finish(), so ACP-path turns report token usage/cost instead of always zero. Zero-when-absent is safe; tool-use (break-early) turns inherently report zero (the prompt result never resolves). - Item 3 (R17): opt-in headless credential delivery. When FUSION_CLAUDE_ACP_FORWARD_AUTH=1, buildBridgeEnv forwards a SINGLE Claude auth token (CLAUDE_CODE_OAUTH_TOKEN > ANTHROPIC_AUTH_TOKEN > ANTHROPIC_API_KEY) from the operator's launch env so a detached daemon (no login Keychain) can authenticate. Default OFF — the secure no-secrets posture is unchanged. acp-driver tests 9/9 (usage + the three auth-opt-in cases); typecheck clean. Remaining: item 1 (connection reuse / resume latency). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pi-claude-cli
A pi extension that routes LLM calls through the Claude Code CLI as a subprocess. Use your Claude Pro/Max subscription as the LLM backend — no API key, no separate billing.
How it works
The extension registers as a custom pi provider exposing all Claude models. Each request spawns a claude -p subprocess using the stream-json wire protocol, with --resume on follow-up turns to reuse the CLI's session state instead of replaying full history. Claude proposes tool calls, pi executes them natively. Custom pi tools are exposed to Claude via a schema-only MCP server.
Requirements
- Claude Code CLI installed and authenticated (
claudeon PATH) - A Claude Pro or Max subscription
- pi or GSD
Installation
Add to ~/.gsd/agent/settings.json:
{
"packages": ["npm:pi-claude-cli"]
}
Then select a Claude model via /model in the interactive UI. All Claude models appear under the pi-claude-cli provider.
Features
- Streams text, thinking, and tool call tokens in real-time
- Maps tool names and arguments bidirectionally between Claude and pi
- Exposes custom pi tools to Claude via MCP (schema-only, no execution)
- Break-early pattern prevents Claude CLI from auto-executing tools
- Session resume via
--resumeeliminates history replay on follow-up turns - Configurable thinking effort with elevated budgets for Opus models
- Cross-platform subprocess management (Windows, macOS, Linux)
- Inactivity timeout and process registry for cleanup
License
MIT