Triage system prompts read "MUST call fn_review_spec()" but Sonnet 4.6 routed through pi-claude-cli writes PROMPT.md and silently skips the call — even with the addendum explaining the deferred-tool protocol. Confirmed by the FN-2564 agent log: model called other MCP tools (fn_memory_search, fn_task_list) fine but consistently never reached fn_review_spec, leaving triage looping on "fn_review_spec was never called" and falling back to zai/glm-5.1 every time. Rewrite bare `fn_*` (and any non-built-in custom tool name) references in the system prompt to their `mcp__custom-tools__fn_*` form before sending. The prompt now literally says "call mcp__custom-tools__fn_review_spec()" so the model has no inference step, and the deferred-tool reminder Claude Code injects matches verbatim. Word-boundary safe (won't touch fn_review_specifier) and idempotent (won't double-prefix already-MCP-named occurrences). Co-Authored-By: Claude Opus 4.7 (1M context) <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