Alternate Coding Agents: pi

Claude Code fills its context window before I’ve got much done.

I use it for the usual loop. Read a file, change it, run the tests, read the failure. A few turns of that and the window is full, the agent has lost the thread, and I start a new session. The UI flickers while this is happening, and picking up an old session is awkward.

The window

Claude Code spends 15% of a 200k window before I type anything. 30k tokens of system prompt and overhead. Pi spends 0.5%. Same model, more of the window left for the work.

pi

Pi describes itself as a minimal terminal coding harness. Less in the default install, less sitting in the context.

npm install -g --ignore-scripts @earendil-works/pi-coding-agent
export ANTHROPIC_API_KEY=sk-ant-...
pi

I ask it for the same things I asked Claude Code for. Same skills, same model, same output. The system prompt is smaller, and I don’t miss the rest of what Claude Code adds.

I’ve built dashboards with it for workout tracking, token performance, and usage analysis, and I updated this blog with it. It has replaced Claude Code for my day to day work.

For anything bigger than one session I keep the main context small and send the subtask to another Pi with its own context and tools. Research in one, planning in one, implementation in one, review in one. I run them in order. For work where the quality matters I tell it to score the output and loop, rerunning with changes based on what scored badly, until it clears the threshold or I check in.

The overhead adds up

The model is no longer the part I blame. A feature, a prompt template, a built-in capability, each of them costs tokens on every turn whether I use it or not. After a few turns of poking around and implementing, the window is spent.

Which one

I like tinkering with the tools and fixing them myself, so I use Pi. If you want something that runs without configuration, Claude Code does that. If Claude Code is working for you, keep using it. I switched because of the window.

Links