The same call, 400 times
Run 4821 called lookup_order with the same arguments until ops killed it.
Impact: The customer got no reply, and the Canada rollout is paused.
FDE interview labData & Systems
Find why an agent made the same tool call 400 times and fix the loop.
Your mission · Agent loop debugging
Hearthline's order desk chat is the first stop for customers asking about orders, and one question tied up a worker for 11 minutes without ever getting a reply. Ops paused the rollout to Canada, and the review on Friday will decide whether it restarts.
Run 4821 called lookup_order with the same arguments until ops killed it.
Impact: The customer got no reply, and the Canada rollout is paused.
The run was set to stop after 12 steps and kept going.
Impact: One stuck question held a worker for 11 minutes and cost about $9.
Edit the components marked “Your work”. The other components show where your changes fit.
| Field | Type | Notes |
|---|---|---|
role | "user" | "assistant" | "tool" | |
content | string | The question (user) or the final answer (assistant). |
call_id | string | call-1, call-2, ... within a run. A call and its tool message share it. |
tool, args | string, object | On an assistant message that asks for a tool. |
result | object | On a tool message when the tool returned. |
error | string | On a tool message when the tool raised ToolError. Never together with result. |
| Field | Type | Notes |
|---|---|---|
status | "answered" | "stopped" | |
answer | string | null | The answer text, or null when stopped. |
reason | string | null | null when answered; "max_steps" when the step limit ended the run. |
steps | integer | Times the model was asked, including the turn that answered. |
history | Message[] | A copy of every message, in order. |
| Field | Type | Notes |
|---|---|---|
max_steps | integer, 1 to 50 | Optional. Default 8. Production uses 12 for order questions. |
config/order-desk.yaml The production settings for the agent: the step limit run 4821 was supposed to have, and the ops kill switch.# Order desk agent, production settings (deployed 2026-11-03). agent: max_steps: 12 # per run; the chat hands over to a human after a stop worker_slots: 64 typing_indicator_seconds: 8 ops: kill_after_turns: 400 # process-wide watchdog, pages on-call when it fires tools: timeout_ms: 1500 enabled: [lookup_order, refund_status, list_orders]
samples/refund-timeout-args.json Arguments for a run where refund_status times out once. Paste them into Preview.[
"Is my refund for A-19 paid?",
[
{
"tool": "lookup_order",
"args": {
"order_id": "A-19"
}
},
{
"tool": "refund_status",
"args": {
"order_id": "A-19"
}
},
{
"answer": "Order {order_id}: refund {refund}."
}
],
{
"orders": {
"A-17": {
"customer": "c-1",
"status": "shipped",
"eta": "March 2"
},
"A-18": {
"customer": "c-1",
"status": "processing",
"eta": "March 9"
},
"A-19": {
"customer": "c-1",
"status": "delivered",
"eta": "February 20",
"refund": "pending"
},
"C-40": {
"customer": "c-2",
"status": "shipped",
"eta": "March 4"
}
},
"outages": {
"refund_status": 1
}
},
{
"max_steps": 6
}
]samples/refund-timeout-expected.json What that run must return under the contract: the timeout is shown to the model, which asks again and answers in 4 turns.{
"status": "answered",
"answer": "Order A-19: refund pending.",
"reason": null,
"steps": 4,
"history": [
{
"role": "user",
"content": "Is my refund for A-19 paid?"
},
{
"role": "assistant",
"call_id": "call-1",
"tool": "lookup_order",
"args": {
"order_id": "A-19"
}
},
{
"role": "tool",
"call_id": "call-1",
"result": {
"order_id": "A-19",
"status": "delivered",
"eta": "February 20"
}
},
{
"role": "assistant",
"call_id": "call-2",
"tool": "refund_status",
"args": {
"order_id": "A-19"
}
},
{
"role": "tool",
"call_id": "call-2",
"error": "refund_status timed out"
},
{
"role": "assistant",
"call_id": "call-3",
"tool": "refund_status",
"args": {
"order_id": "A-19"
}
},
{
"role": "tool",
"call_id": "call-3",
"result": {
"order_id": "A-19",
"refund": "pending"
}
},
{
"role": "assistant",
"content": "Order A-19: refund pending."
}
]
}metrics/runs-2026-11-17.csv Hourly run counts on the night of the incident. Note that stopped_max_steps is 0 in every hour, including busy ones.hour_utc,runs,answered,stopped_max_steps,killed,handed_to_human,median_turns,model_cost_usd 20,1984,1702,0,0,282,2,4.31 21,2113,1795,0,1,318,2,13.92 22,1876,1601,0,0,275,2,4.07 23,1402,1198,0,0,204,2,3.02
BUG-101 The support agent asked for the same order again and again until it was killed Reported by Priya (ops)
Expected The replay answers in 2 steps: "I could not find order B-204. Please check the order number."
Actual The replay raises "run killed after 400 model turns", the same way production did, and returns no history to read.
BUG-102 After a tool fails, the run history is missing what happened Reported by Priya (ops)
Expected The refund sample matches the expected file exactly, with a tool message after every assistant tool call. A made-up tool is reported to the model, not raised.
Actual The refund run answers in 4 steps, but its history has an assistant message for call-2 with no tool message after it. The made-up tool fails with AttributeError.
BUG-103 max_steps does not stop a run Reported by Marcus (support automation)
Expected With max_steps 3 the run stops after 3 turns with reason "max_steps". With {} it stops after 8. max_steps 0, "6" or 51 raises ValueError mentioning max_steps.
Actual Every run makes all nine calls and answers on turn 10, whatever max_steps says, and max_steps 0 is accepted.
Scores use evidence from your session. A short or incomplete session may not provide enough evidence for every skill. See a sample scorecard
An agent run made 400 calls to lookup_order with the same arguments before ops killed it. The log shows the tool calls but not their results. A scripted model stands in for the real one, so you can replay the run exactly. Find the cause and fix it, so the run ends the way it should have. Use the AI assistant however you like. Before you change any code, replay the run and tell me what you think the model was shown.