TL;DR: The request is a model identifier, instructions, the message list so far, the tool definitions, the sampling settings and an output cap. The reply is content (text, tool-call requests, or both), a stop reason, usage counts and identifiers. The harness branches on the stop reason: a natural end is an answer, a tool-call stop means validate and run the calls and append their results, a length stop means the output was cut and may be half a JSON object, and a refusal or filter stop is a message to handle, not a crash. Nothing in the reply executes anything; everything the agent does happens in your code after this point.
How to approach it
Describe the round trip as data, not as "the model thinks". Name each field in the request and say why the harness put it there. Name each field in the reply and say what the harness does with it. The interviewer is checking that you have looked at a raw reply rather than at a framework's return value, so mention the stop reason and the usage block before they ask.
A strong answer
Start with what the code sends. The model is stateless between calls, so every request carries the whole conversation:
request
model which build answers; recorded with the run
instructions the system prompt: role, rules, output format
messages user, assistant and tool-result turns so far, in order
tools name, description and JSON schema for each callable tool
sampling temperature and similar; near zero for tool steps
max_output a cap on generated tokens; also a cost ceiling
Then what comes back, and the branch each part forces:
reply
content text blocks, tool-call blocks (id, name, arguments), or both
stop_reason natural end | tool call | length cap | refusal or filter
usage input tokens, output tokens, cached input tokens
ids reply id, the model build that actually answered
The stop reason is the field a beginner skips and a harness cannot. With a natural end, the text is the answer and the loop exits. With a tool-call stop, the harness checks each call's name against the tool list, validates the arguments against the schema, runs the tool, and appends one result message per call, keyed by the call id, before calling the model again. A model that gets no result for a call it made is reading an invalid transcript, and the next reply is unpredictable.
The length stop is the one that looks like success. The model hit the output cap, so the text may end mid-sentence and a tool call's arguments may be half an object. Parsing it as if it were complete is how an agent "calls" a tool with the wrong arguments. The harness either retries with a larger cap or asks the model to continue, and never dispatches arguments that did not parse. A refusal or safety filter stop carries no tool calls and usually some text; the harness records it, shows the user something honest, and does not retry in a loop hoping for a different answer.
Usage is how budgets work. Input tokens grow every turn because the transcript grows; the harness adds them per step and stops the run when the total crosses the budget set for the task. Cached input tokens tell you whether the stable prefix is being reused; a number that drops to zero mid-run means something changed at the front of the prompt (The Message List the Harness Builds).
A reply can hold text and tool calls together. The text is often the model's narration ("Let me look that up"); the harness shows or logs it and still runs the calls. Treating "there is text" as "the run is finished" ends runs early.
Draw the authority line: the model proposes, in structured form, what should happen next. The harness decides whether the call is allowed, runs it, and decides when the loop ends. A reply is a request, not an action.
What interviewers probe next
"The reply has a tool call for a tool that is not in your list." Do not run anything. Append a result for that call id that says the tool does not exist and lists what does, then call the model again. Count it; three in a row ends the run.
"You hit the output cap in the middle of a tool call's JSON." The stop reason says length, so the arguments are not trusted. Retry that step with a higher cap, or ask for the call again; dispatching a partial object is the bug.
"The provider returns 429 on step twelve of thirty." That is transport, not a reply. Honour the retry-after header, back off with jitter, and count the wait against the run's deadline, so a rate-limited run ends with a timeout exit instead of hanging.
How it's scored
Weak: Describes the call as "send a prompt, get text back", or does not know that the stop reason exists.
Hire: Names the request and reply parts, branches correctly on natural end and tool call, appends results by call id, and tracks usage against a budget.
Strong Hire: Also handles the length stop as untrusted output, treats refusal stops without retrying, reads cached-token counts as a cache health signal, and states that the reply is a proposal the harness executes.
Common mistakes
- Reading only the text and ignoring the stop reason.
- Dispatching tool arguments after a length stop.
- Ending the run because the reply contained text, when it also contained tool calls.
- Appending tool results without the call id, so the model cannot match them to its requests.
- Treating a rate-limit error as a model reply and retrying without a deadline.