One of the hardest parts of building an agent harness is constructing its action space — the set of tools and capabilities the model can invoke. Too few tools and the agent is crippled. Too many and it's paralyzed by choice.
The model just outputs text. It can reason but can't act on the world. Like solving math with just pen and paper.
Structured tool calls (search, file_read, API). Powerful but each call round-trips through context — the "composition tax."
Bash, Python, or PTC. The agent writes code that orchestrates tools directly. Highest ceiling, but the model must know how to code.
In traditional tool calling, each action round-trips through Claude's context window. The result gets serialized (even thousands of rows when you only need five), triggers a new reasoning step, and adds latency.
With 3 sequential tool calls, you're paying 3× the latency, 3× the context bloat, and 3 full reasoning steps.
With PTC, Claude writes code that calls tools as functions inside a container. Intermediate results stay in the code — they never bloat the context window.
The container pauses when a tool is invoked, the call crosses the sandbox boundary, gets fulfilled externally, and the result returns to the running code.
The Claude Code team tried three approaches to get Claude to ask better clarifying questions. Modified markdown was too loose (Claude broke format). ExitPlanTool parameter was too rigid (questions came after the plan was already made). The AskUserQuestion tool hit the sweet spot — structured enough for reliable UI, flexible enough that Claude actually liked calling it.
Early Claude needed a Todo list + reminders every 5 turns to stay on track. But as models improved, the reminders became a cage — Claude felt it had to stick to the list instead of adapting.
Opus 4.5 got better at subagents, but TodoWrite couldn't handle inter-agent coordination. The Task Tool replaced it with dependencies, shared updates, and deletable tasks.
Instead of stuffing all knowledge into the system prompt or a RAG index, progressive disclosure lets the agent explore a tree of files. Each file references others. The agent only loads what's relevant.
This is how Claude Code added self-documentation without adding a tool. A "Guide" subagent follows links, searches docs, and returns just the answer.
Claude Code operates with ~20 tools. Each additional tool gives the model one more option to reason about — increasing decision complexity and the chance of misuse.
Before adding tool #21, the team asks: can this be handled by progressive disclosure (skills, docs, subagents) instead?
Every tool in Claude Code's ~20-tool set serves one of four roles: composability (bash, PTC for code execution), guardrails (file_edit with staleness checks), context building (grep, skills, subagents), or user interaction (AskUser for elicitation). Progressive disclosure — skills, subagents, linked docs — extends the action space without adding tools.