跪拜 Guibai
← All articles
Backend

Pi's 200-Token System Prompt Undercuts Claude Code by 7x While Hitting 99.93% Cache Rates

By 苏三说技术 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Agent costs are dominated by context overhead, not model pricing. Pi proves that a 200-token system prompt can drive a capable coding agent, which directly lowers per-task spend and sidesteps vendor lock-in at a moment when Claude Code is actively banning users by device fingerprinting.

Summary

Pi, created by libGDX founder Mario Zechner, takes the opposite approach from every other coding agent. Where Claude Code burns 14,000 tokens on its system prompt and ships over a dozen tools, Pi runs on roughly 200 tokens and four primitive operations. The result is a 99.93% cache hit rate when paired with DeepSeek, pushing the average task cost down to $0.028 — seven times cheaper than Claude Code. It binds to no single model provider, supports 15+ APIs, and automatically ingests existing Claude Code skills and AGENTS.md files without modification. The agent is MIT-licensed and runs entirely in the terminal as a simple while-loop calling an LLM with tool access. Extensions, plugins, and skills bolt on any missing capability — plan mode, sub-agents, MCP — but nothing ships by default. One community configuration already layers 17 plugins, 18 global skills, and two MCP servers on top of the base install.

Takeaways
Pi's system prompt is roughly 200 tokens; Claude Code's is 14,000 tokens.
Only four tools ship by default: Read, Write, Edit, and Bash.
Cache hit rates reach 99.93% with DeepSeek, making the average successful task cost about $0.028.
Claude Code costs roughly seven times more per task in Composio's benchmark of eight agent harnesses.
Pi supports 15+ model providers and does not bind to any single vendor.
Existing Claude Code skills in ~/.agents/skills and AGENTS.md files load automatically with no migration.
Extensions, Skills, and Packages add plan mode, sub-agents, MCP, and permission controls on demand.
One community setup layers 17 plugins, 18 global skills, and two MCP servers onto the base agent.
Pi is MIT-licensed and runs as a pure terminal application installed via npm.
Claude Code's June 2026 ban wave used device-level fingerprinting — timezone checks and Unicode prompt tampering — not IP detection.
Conclusions

Agent cost is primarily a function of system-prompt length, not model price per token; a 200-token prompt turns nearly the entire repeated context into cache hits.

Vendor lock-in for coding agents is now enforced through client-side device fingerprinting, not just API access, which makes model-agnostic runners like Pi a hedge against arbitrary bans.

Pi's design bets that frontier models already internalize agent behavior from RL training and need tool definitions, not lengthy instructions — a bet that the 99.93% cache rate appears to validate.

The 'bare shell' architecture inverts the typical agent product strategy: instead of shipping a finished experience, Pi ships a controllable kernel and lets the community build the surface area.

Concepts & terms
System prompt
The fixed instruction text prepended to every LLM call that defines the agent's behavior, tools, and constraints. Longer prompts consume context window space and cost tokens on every request.
Cache hit rate
The percentage of input tokens the model provider recognizes as unchanged from a previous request and therefore does not recompute, directly reducing API cost.
AGENTS.md
A project-level markdown file that describes conventions, architecture, and constraints for an AI coding agent. Supported by multiple tools including Claude Code and Pi.
MCP (Model Context Protocol)
Anthropic's open protocol for connecting LLMs to external data sources and tools. Pi omits native MCP support in favor of direct CLI tool invocation.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗