Tool result
Also called Tool output
What comes back from a tool call and lands in the context: file contents, command output, an error, a list of search hits.
A tool result is the payload the harness returns after executing a tool call: the text of a file, the stdout and exit code of a command, the matches from a search, or an error message. It is appended to the context window as if someone had pasted it into the chat, and the model reads it on the next request. Everything the agent knows about the current state of the environment arrived this way.
Because results are the agent's only eyes, their quality is the agent's quality. A truncated log hides the failing test. A command that swallows errors and exits zero tells the agent everything is fine. A search tool that returns two hundred matches buries the one that matters. And results are ordinary text to the model, which means text inside them can carry instructions: a README that says 'ignore your previous rules' is a prompt injection risk the moment it becomes a tool result.
Shape the results you feed the loop. Prefer commands with short, honest output, and make failures loud: a non-zero exit code and a one-line reason beat a wall of green. When output is unavoidably long, have the agent pipe it through tail, grep or a summary step instead of reading the whole thing. Big results are the fastest way out of the smart zone.
- Claude CodeLong results are collapsed in the transcript view, but the model still receives the text up to a per-tool limit; ask it to filter output when a command is chatty.
- CodexCommand output streams into the thread and is stored with the run, so you can inspect exactly what the model saw.
- Most toolsResults from MCP servers count the same as built-in tool output, so a verbose server bloats context just as fast.
“It insists the build passed, but the deploy is broken.”
“Check the tool result for the build step. The script prints 'done' and exits zero even when the bundler fails, so from the agent's side it did pass.”
“Okay, that's a script bug first and an agent bug second.”
Course 01 puts every one of these terms to work: you install Claude Code, run the loop, and ship a real project — permission modes, compaction, hooks and all.
Start Course 01 →