Every word you type, every line of code, every response the model generates — it all flows through the same pipeline as tokens.
Each agent step reads files, generates plans, writes code — all consuming tokens from the context window.
"Hello world" = 2 tokens | "Tokenization" = 3 tokens | "🤖" = 3 tokens
On average, 1 token ≈ ¾ of an English word. Code tokens are shorter due to punctuation splitting.
The agent repeats this for every tool call, every file read, every response — burning tokens until the task is done or the context window fills.
The agent can only interact with the world through tools. No tool = no action.
Reads any file from the repository. The agent uses this to understand context before making changes.
Searches for patterns across all files. Faster than reading each file individually.
Creates, updates, or deletes files. Every code fix, config change, or new file goes through here.
Executes shell commands: npm test, git commit, build scripts — any terminal command.
The agent's working memory. Everything it has seen and done fits in here.
Every file the agent reads, every tool result, every thinking step — it all accumulates. When the window fills up, the agent can't take in more context without forgetting something.
The harness controls what the agent is allowed to do without asking.
Certain operations like reading files are always allowed. The agent doesn't need to ask.
Destructive or risky operations pause and wait for human approval before continuing.
Actions outside the defined scope are blocked entirely. The agent cannot override this.