Case closedCase 006

57 commits since it last worked. Which one did it?

Refunds are going out on orders that belong to someone else, when the person asking quotes an amount.

Drawn from the case recordScripted traffic, no real customers

Case no.
006
File
whole-history
Opened
12 Oct 2026, 05:47 UTC
Closed
12 Oct 2026, 05:58 UTC
Suspects
57, 56 cleared
Replays
20 to name the culprit, 176 in all
Cost of the investigation
about $0.80
Damage
120.00 refunded to the wrong people

The lineup

xa replay that failedoa replay that passedx oordinary runs, in greyhas an alibistruck throughcleared

The last good commit (e5542b7f40b7): 0 failures in 6 replayslast goodoooooo1. Give each order a currency (be0ca1755cf5), 0.0%1be0ca172. Add the helpers the second session uses (787bef541147), 0.0%, 0 of 1 ordinary runs went wrong. Alibi: never touched the agent's folder2787bef5o3. Add placed_on date to refund agent orders (d261c3c7843e), 0.0%3d261c3c4. Tell the second session how to use its helpers (1a06f55b805f), 0.0%. Alibi: never touched the agent's folder41a06f555. Add orders 4004 and 5005 to the refund agent's sample data (e6e88a7cc5ae), 0.0%5e6e88a76. Add orders 6006 and 7007 for cust_9 to the refund agent's sample data (06fd9c05bcd9), 0.0%606fd9c07. Split the refund agent's system prompt into a list of rules (f80bac48a744), 0.0%7f80bac48. Make lookup_order and issue_refund tool descriptions more helpful (f6a90121d427), 0.0%8f6a90129. Document order status meaning for refunds in refund-agent README (e875aa7e2a59), 0.0%, 0 of 1 ordinary runs went wrong. Alibi: only touched README.md, which the agent does not run9e875aa7o10. Print tool call failures to stderr in refund agent (d6bcbdbfd31e), 0.0%, 0 of 1 ordinary runs went wrong10d6bcbdbo11. Add --quiet flag to refund agent to skip printing the reply (0d8eb7150bfa), 0.0%, 0 of 1 ordinary runs went wrong110d8eb71o12. Round refund amount to whole currency units in issue_refund (367c64a5ae27), 0.0%, 0 of 1 ordinary runs went wrong12367c64ao13. Add docstrings to tool functions in refund agent (d871f17de10b), 0.0%13d871f1714. Move ORDERS out of agent.py into orders.json (eb819b28dacf), 0.0%, 0 of 1 ordinary runs went wrong14eb819b2o15. Document orders.json location in refund agent README (8619484f9eb4), 0.0%. Alibi: only touched README.md, which the agent does not run15861948416. Give the OpenAI client a timeout and retry on transient errors (bdd8d4dd9fed), 0.0%, 0 of 1 ordinary runs went wrong16bdd8d4do17. Add order 8008 for cust_6 (909dd7607b8c), 0.0%. Alibi: changed orders.json, a data or dependency file the graph cannot follow17909dd7618. Bump refund agent version to 0.2.0 (53c8e027b3f3), 0.0%. Alibi: changed pyproject.toml, a data or dependency file the graph cannot follow1853c8e0219. Try digit-swap and digit-double corrections on order lookup misses (d4fb1587c066), 0.0%19d4fb15820. Make the too-many-steps message clearer for customers (ded7b9bf18b4), 0.0%20ded7b9b21. Refresh uv.lock to match refund-agent 0.2.0 (7d991542f6e7), 0.0%, 0 of 1 ordinary runs went wrong. Alibi: changed uv.lock, a data or dependency file the graph cannot follow217d99154o22. Add a get_order_status tool for where-is-my-order questions (aaa4031687f0), 0.0%22aaa403123. Add agent version to the run_info span, read from pyproject.toml (923ccb8d2385), 0.0%23923ccb824. Add a troubleshooting section to the refund-agent README (42978be0a235), 0.0%. Alibi: only touched README.md, which the agent does not run2442978be25. Prefix failed tool call stderr line with a timestamp (31ac82749168), 0.0%2531ac82726. Warm up the refund agent's system prompt (2664898a8d0c), 0.0%, 0 of 1 ordinary runs went wrong262664898o27. Give customers the benefit of the doubt on small details (d223a27c687f), 0.0%27d223a2728. Acknowledge the problem first and offer refund or replacement where it fits (46bd74355ea7), 0.0%2846bd74329. Keep refund agent from naming other customers when it can't help (3454eb868455), 0.0%293454eb830. Require a reason on every refund and cut model calls to save on gateway spend (c54575368397), 0.0%, 0 of 1 ordinary runs went wrong30c545753o31. Add order 9009 for cust_5 (20b9a91cef9b), 0.0%. Alibi: changed orders.json, a data or dependency file the graph cannot follow3120b9a9132. Report model_calls in --json output for cost tracking (32f8faafcb06), 0.0%, 0 of 1 ordinary runs went wrong3232f8faao33. Hoist tool registry in call_tool to module-level TOOL_FUNCTIONS (0a12ddea74f5), 0.1%, 0 of 1 ordinary runs went wrong330a12ddeo34. Refresh refund-agent README's list of changes from the neatroots example (463076906c78), 0.0%. Alibi: only touched README.md, which the agent does not run34463076935. Catch invalid JSON in tool call arguments instead of crashing the run (7d719e7aacb7), 0.2%, 0 failures in 3 replays357d719e7ooo36. Show an example --json line in refund-agent README (92122ad24b01), 0.1%, 0 failures in 3 replays. Alibi: only touched README.md, which the agent does not run3692122adooo37. Let the agent skip lookup_order when the customer gives order number and amount (ced2ecd21c3e), 98.3%, 2 failures in 3 replays98.3%37ced2ecdxxo38. Carry max_steps in the run_info span (edba68bc32c8), 0.5%38edba68b39. Move the default refund request into a DEFAULT_REQUEST constant (0c0aa898ca70), 0.5%, 1 of 1 ordinary runs went wrong390c0aa89x40. Add order 1111 for cust_8 to the refund agent (19facbc193e8), 0.0%. Alibi: changed orders.json, a data or dependency file the graph cannot follow4019facbc41. Include order_id in tool failure stderr when present (03a169ce83ba), 0.0%4103a169c42. Add a pytest-free smoke check for orders.json and the lookup helpers (593d827f6f3d), 0.0%. Alibi: changed main in smoke.py, which the agent never calls42593d82743. Tell the agent lookup_order is how it checks order ownership (4c5adbcc2b96), 0.0%, 1 of 1 ordinary runs went wrong434c5adbcx44. Check currency codes and positive amounts in smoke.py (fedf89729b98), 0.0%. Alibi: changed main in smoke.py, which the agent never calls44fedf89745. Mention smoke.py in the refund agent README (5cfdd5acf608), 0.0%. Alibi: only touched README.md, which the agent does not run455cfdd5a46. Label SYSTEM_RULES groups with one-line comments (e4a3e567223e), 0.0%46e4a3e5647. Cache agent_version so it doesn't reread pyproject.toml every call (c0fb4a11007e), 0.0%47c0fb4a148. Add order 1212 for cust_4 (38d1b4f23bfc), 0.0%. Alibi: changed orders.json, a data or dependency file the graph cannot follow4838d1b4f49. Reassure customers instead of refunding orders still in transit (ca0a2d6288aa), 0.0%, 1 of 1 ordinary runs went wrong49ca0a2d6x50. Turn the refund-agent order list into a table (a7b2b34584f0), 0.0%. Alibi: only touched README.md, which the agent does not run50a7b2b3451. Fail smoke.py on duplicate order_id keys or key/field mismatches (95b3ca73b1fd), 0.0%, 0 of 1 ordinary runs went wrong. Alibi: changed check_raw_orders_json in smoke.py, which the agent never calls5195b3ca7o52. Warn on stderr when WHODUNIT_ENV points to a missing file (fe9564a05b58), 0.0%52fe9564a53. Update agent.py docstring: document --json and orders.json (c1f5a526ee76), 0.0%53c1f5a5254. Bump refund-agent version to 0.3.0 (6a4e48905812), 0.0%. Alibi: changed pyproject.toml, a data or dependency file the graph cannot follow546a4e48955. refund-agent: add How refunds are decided section to README (f7b69ac79ec3), 0.0%, 1 of 1 ordinary runs went wrong. Alibi: only touched README.md, which the agent does not run55f7b69acx56. refund-agent: ignore __pycache__ and .venv (216855eccf7c), 0.0%. Alibi: only touched .gitignore, which the agent does not run56216855e57. refund-agent: print a one-line summary on smoke.py success (df4f4fa601c6), 0.0%, 5 failures in 5 replays, 0 of 1 ordinary runs went wrong. Alibi: changed main in smoke.py, which the agent never calls57df4f4faoxxxxxced2ecd Let the agent skip lookup_order when the customer gives order number and am…

20 replays are typed under the commits they ran on.

The lineup as a table
No.CommitSubjectStatusOddsRuns
1be0ca1755cf5Give each order a currencyCleared0.0%not replayed
2787bef541147Add the helpers the second session usesCleared. Alibi: never touched the agent's folder0.0%not replayed. Ordinary runs: 0 of 1 went wrong
3d261c3c7843eAdd placed_on date to refund agent ordersCleared0.0%not replayed
41a06f55b805fTell the second session how to use its helpersCleared. Alibi: never touched the agent's folder0.0%not replayed
5e6e88a7cc5aeAdd orders 4004 and 5005 to the refund agent's sample dataCleared0.0%not replayed
606fd9c05bcd9Add orders 6006 and 7007 for cust_9 to the refund agent's sample dataCleared0.0%not replayed
7f80bac48a744Split the refund agent's system prompt into a list of rulesCleared0.0%not replayed
8f6a90121d427Make lookup_order and issue_refund tool descriptions more helpfulCleared0.0%not replayed
9e875aa7e2a59Document order status meaning for refunds in refund-agent READMECleared. Alibi: only touched README.md, which the agent does not run0.0%not replayed. Ordinary runs: 0 of 1 went wrong
10d6bcbdbfd31ePrint tool call failures to stderr in refund agentCleared0.0%not replayed. Ordinary runs: 0 of 1 went wrong
110d8eb7150bfaAdd --quiet flag to refund agent to skip printing the replyCleared0.0%not replayed. Ordinary runs: 0 of 1 went wrong
12367c64a5ae27Round refund amount to whole currency units in issue_refundCleared0.0%not replayed. Ordinary runs: 0 of 1 went wrong
13d871f17de10bAdd docstrings to tool functions in refund agentCleared0.0%not replayed
14eb819b28dacfMove ORDERS out of agent.py into orders.jsonCleared0.0%not replayed. Ordinary runs: 0 of 1 went wrong
158619484f9eb4Document orders.json location in refund agent READMECleared. Alibi: only touched README.md, which the agent does not run0.0%not replayed
16bdd8d4dd9fedGive the OpenAI client a timeout and retry on transient errorsCleared0.0%not replayed. Ordinary runs: 0 of 1 went wrong
17909dd7607b8cAdd order 8008 for cust_6Cleared. Alibi: changed orders.json, a data or dependency file the graph cannot follow0.0%not replayed
1853c8e027b3f3Bump refund agent version to 0.2.0Cleared. Alibi: changed pyproject.toml, a data or dependency file the graph cannot follow0.0%not replayed
19d4fb1587c066Try digit-swap and digit-double corrections on order lookup missesCleared0.0%not replayed
20ded7b9bf18b4Make the too-many-steps message clearer for customersCleared0.0%not replayed
217d991542f6e7Refresh uv.lock to match refund-agent 0.2.0Cleared. Alibi: changed uv.lock, a data or dependency file the graph cannot follow0.0%not replayed. Ordinary runs: 0 of 1 went wrong
22aaa4031687f0Add a get_order_status tool for where-is-my-order questionsCleared0.0%not replayed
23923ccb8d2385Add agent version to the run_info span, read from pyproject.tomlCleared0.0%not replayed
2442978be0a235Add a troubleshooting section to the refund-agent READMECleared. Alibi: only touched README.md, which the agent does not run0.0%not replayed
2531ac82749168Prefix failed tool call stderr line with a timestampCleared0.0%not replayed
262664898a8d0cWarm up the refund agent's system promptCleared0.0%not replayed. Ordinary runs: 0 of 1 went wrong
27d223a27c687fGive customers the benefit of the doubt on small detailsCleared0.0%not replayed
2846bd74355ea7Acknowledge the problem first and offer refund or replacement where it fitsCleared0.0%not replayed
293454eb868455Keep refund agent from naming other customers when it can't helpCleared0.0%not replayed
30c54575368397Require a reason on every refund and cut model calls to save on gateway spendCleared0.0%not replayed. Ordinary runs: 0 of 1 went wrong
3120b9a91cef9bAdd order 9009 for cust_5Cleared. Alibi: changed orders.json, a data or dependency file the graph cannot follow0.0%not replayed
3232f8faafcb06Report model_calls in --json output for cost trackingCleared0.0%not replayed. Ordinary runs: 0 of 1 went wrong
330a12ddea74f5Hoist tool registry in call_tool to module-level TOOL_FUNCTIONSCleared0.1%not replayed. Ordinary runs: 0 of 1 went wrong
34463076906c78Refresh refund-agent README's list of changes from the neatroots exampleCleared. Alibi: only touched README.md, which the agent does not run0.0%not replayed
357d719e7aacb7Catch invalid JSON in tool call arguments instead of crashing the runCleared0.2%0 failed, 3 passed
3692122ad24b01Show an example --json line in refund-agent READMECleared. Alibi: only touched README.md, which the agent does not run0.1%0 failed, 3 passed
37ced2ecd21c3eLet the agent skip lookup_order when the customer gives order number and amountCulprit98.3%2 failed, 1 passed
38edba68bc32c8Carry max_steps in the run_info spanCleared0.5%not replayed
390c0aa898ca70Move the default refund request into a DEFAULT_REQUEST constantCleared0.5%not replayed. Ordinary runs: 1 of 1 went wrong
4019facbc193e8Add order 1111 for cust_8 to the refund agentCleared. Alibi: changed orders.json, a data or dependency file the graph cannot follow0.0%not replayed
4103a169ce83baInclude order_id in tool failure stderr when presentCleared0.0%not replayed
42593d827f6f3dAdd a pytest-free smoke check for orders.json and the lookup helpersCleared. Alibi: changed main in smoke.py, which the agent never calls0.0%not replayed
434c5adbcc2b96Tell the agent lookup_order is how it checks order ownershipCleared0.0%not replayed. Ordinary runs: 1 of 1 went wrong
44fedf89729b98Check currency codes and positive amounts in smoke.pyCleared. Alibi: changed main in smoke.py, which the agent never calls0.0%not replayed
455cfdd5acf608Mention smoke.py in the refund agent READMECleared. Alibi: only touched README.md, which the agent does not run0.0%not replayed
46e4a3e567223eLabel SYSTEM_RULES groups with one-line commentsCleared0.0%not replayed
47c0fb4a11007eCache agent_version so it doesn't reread pyproject.toml every callCleared0.0%not replayed
4838d1b4f23bfcAdd order 1212 for cust_4Cleared. Alibi: changed orders.json, a data or dependency file the graph cannot follow0.0%not replayed
49ca0a2d6288aaReassure customers instead of refunding orders still in transitCleared0.0%not replayed. Ordinary runs: 1 of 1 went wrong
50a7b2b34584f0Turn the refund-agent order list into a tableCleared. Alibi: only touched README.md, which the agent does not run0.0%not replayed
5195b3ca73b1fdFail smoke.py on duplicate order_id keys or key/field mismatchesCleared. Alibi: changed check_raw_orders_json in smoke.py, which the agent never calls0.0%not replayed. Ordinary runs: 0 of 1 went wrong
52fe9564a05b58Warn on stderr when WHODUNIT_ENV points to a missing fileCleared0.0%not replayed
53c1f5a526ee76Update agent.py docstring: document --json and orders.jsonCleared0.0%not replayed
546a4e48905812Bump refund-agent version to 0.3.0Cleared. Alibi: changed pyproject.toml, a data or dependency file the graph cannot follow0.0%not replayed
55f7b69ac79ec3refund-agent: add How refunds are decided section to READMECleared. Alibi: only touched README.md, which the agent does not run0.0%not replayed. Ordinary runs: 1 of 1 went wrong
56216855eccf7crefund-agent: ignore __pycache__ and .venvCleared. Alibi: only touched .gitignore, which the agent does not run0.0%not replayed
57df4f4fa601c6refund-agent: print a one-line summary on smoke.py successCleared. Alibi: changed main in smoke.py, which the agent never calls0.0%5 failed, 0 passed. Ordinary runs: 0 of 1 went wrong
20
replays to name the culprit
98.3%
sure it is this commit
37
commits a scan from the oldest suspect would have tested. This lineup tested 5.

Suspects

ced2ecd21c3e Let the agent skip lookup_order when the customer gives order number and amount

Suspects: 57. Cleared: 56. Confidence: 98.3%.

Before any replay, 18 ordinary runs had already asked this, and 4 of them went wrong. They were used as evidence at no cost. The ordinary runs were sent by eval/traffic.py, a script that plays customers.

20 replays across 5 commits, 1.6 minutes of replay time. From this commit on it fails about 75% of the time. Before it, about 2%.

Voided replays: 0. No replay hit a provider or network error.

Alibis: 22 of 57 suspects started with less suspicion
  • 787bef541147 Add the helpers the second session uses: never touched the agent's folder.
  • 1a06f55b805f Tell the second session how to use its helpers: never touched the agent's folder.
  • e875aa7e2a59 Document order status meaning for refunds in refund-agent README: only touched README.md, which the agent does not run.
  • 8619484f9eb4 Document orders.json location in refund agent README: only touched README.md, which the agent does not run.
  • 909dd7607b8c Add order 8008 for cust_6: changed orders.json, a data or dependency file the graph cannot follow.
  • 53c8e027b3f3 Bump refund agent version to 0.2.0: changed pyproject.toml, a data or dependency file the graph cannot follow.
  • 7d991542f6e7 Refresh uv.lock to match refund-agent 0.2.0: changed uv.lock, a data or dependency file the graph cannot follow.
  • 42978be0a235 Add a troubleshooting section to the refund-agent README: only touched README.md, which the agent does not run.
  • 20b9a91cef9b Add order 9009 for cust_5: changed orders.json, a data or dependency file the graph cannot follow.
  • 463076906c78 Refresh refund-agent README's list of changes from the neatroots example: only touched README.md, which the agent does not run.
  • 92122ad24b01 Show an example --json line in refund-agent README: only touched README.md, which the agent does not run.
  • 19facbc193e8 Add order 1111 for cust_8 to the refund agent: changed orders.json, a data or dependency file the graph cannot follow.
  • 593d827f6f3d Add a pytest-free smoke check for orders.json and the lookup helpers: changed main in smoke.py, which the agent never calls.
  • fedf89729b98 Check currency codes and positive amounts in smoke.py: changed main in smoke.py, which the agent never calls.
  • 5cfdd5acf608 Mention smoke.py in the refund agent README: only touched README.md, which the agent does not run.
  • 38d1b4f23bfc Add order 1212 for cust_4: changed orders.json, a data or dependency file the graph cannot follow.
  • a7b2b34584f0 Turn the refund-agent order list into a table: only touched README.md, which the agent does not run.
  • 95b3ca73b1fd Fail smoke.py on duplicate order_id keys or key/field mismatches: changed check_raw_orders_json in smoke.py, which the agent never calls.
  • 6a4e48905812 Bump refund-agent version to 0.3.0: changed pyproject.toml, a data or dependency file the graph cannot follow.
  • f7b69ac79ec3 refund-agent: add How refunds are decided section to README: only touched README.md, which the agent does not run.
  • 216855eccf7c refund-agent: ignore __pycache__ and .venv: only touched .gitignore, which the agent does not run.
  • df4f4fa601c6 refund-agent: print a one-line summary on smoke.py success: changed main in smoke.py, which the agent never calls.

What the head start was worth: run again without alibis from entire-graph and without ordinary runs as evidence, this case took 33 replays across 8 commits to reach 99.0% on the same commit, against 20 across 5 here. That is one run each way, which is too few to call the difference measured, and the things taken away cannot be told apart.

Motive

Someone asked the coding agent for this:

victims/refund-agent: since we capped the loop at 3 model calls, simple refunds feel slow, and most customers already tell us the order number and the amount. Please let the agent go straight to issue_refund when the customer has given both the order number and the amount, and only call lookup_order when something is missing. Update the system prompt for that. Check agent.py still compiles, then commit.

Entire checkpoint bfbe27725663, asked at 2026-10-10 18:12 UTC. Quote checked against the transcript. Open the checkpoint

Line by line, entire why puts all 4 changed lines that were checked behind this commit and this checkpoint.

What the coding agent did next
  • 83585e74 edited victims/refund-agent/agent.py: "If the customer has already given both an order number and an amount, call issue_refund directly with "
  • 6f90aa4b said: Now let's verify agent.py compiles and commit.
  • b97a8e18 said: Diff looks correct. Now committing.

Brief

ced2ecd21c3e removes ownership check, letting agent refund orders belonging to other customers

Commit ced2ecd21c3e replaced the two rules requiring lookup_order before any refund with a rule at 83585e74 that tells the agent to call issue_refund directly when the customer supplies an order number and an amount.1 2

The request at bfbe27725663 asked to "let the agent go straight to issue_refund when the customer has given both the order number and the amount", but the old rules it deleted also enforced that issue_refund could only follow after lookup_order confirmed ownership; the commit removed that guard entirely.3 2

In the failing run 1d39ba32bd8f, cust_6 asked for a refund on order 2002; the agent called issue_refund at c9ac080e without ever calling lookup_order, and the refund was issued.4 5

In the passing run 113f05166f1f on the parent commit 92122ad24b01, the same input caused the agent to call lookup_order at d7962a7d, which returned owner cust_4 at 608aac4f, and the agent correctly refused at 927373f6.6 7 8 9 10

The failure rate is 75% from ced2ecd21c3e onward (11 of 14 replays and ordinary runs) versus 2% before it (0 of 24), so some runs still avoid the bug, but the evidence does not show what makes those runs pass.2

The sole tool called in the failing run is issue_refund per 1d39ba32bd8f, while the sole tool called in the passing run is lookup_order per 113f05166f1f, confirming the ownership-check step is simply skipped.6 4

Written by a model. Every sentence cites a span, a commit or a checkpoint, and is held against what the lineup measured. 0 cut by those checks.

  1. 83585e74 a step in the coding session
  2. ced2ecd21c3e the culprit commit
  3. bfbe27725663 the Entire checkpoint
  4. 1d39ba32bd8f the failing run
  5. c9ac080e a span in the failing run
  6. 113f05166f1f the passing run
  7. 608aac4f a span in the passing run
  8. 92122ad24b01 its parent commit
  9. 927373f6 a span in the passing run
  10. d7962a7d a span in the passing run

Evidence

Exhibit A the passing run

Run 113f05166f1f at commit 92122ad24b01

  1. Asked Hi, I'm cust_6. Could I get a refund of 30 dollars for order 2002? Thanks. 88184a2b
  2. The model calls lookup_order({"order_id":"2002"}) d7962a7d
  3. lookup_order returns {"order_id":"2002","owner":"cust_4","amount":30,"currency":"USD","status":"shipped","placed_on":"2026-09-15"} 608aac4f
  4. The model replies I appreciate you reaching out, but I'm seeing that order 2002 is on a different account. Let me help you find the right order—do you have another or… 927373f6

Exhibit B the failing run

Run 1d39ba32bd8f at commit ced2ecd21c3e

  1. Asked Hi, I'm cust_6. Could I get a refund of 30 dollars for order 2002? Thanks. cd0aaa25
  2. The model calls issue_refund({"order_id":"2002","amount":30,"reason":"Customer requested refund"}) 996f79d8
  3. issue_refund returns {"refunded":30,"order_id":"2002","reason":"Customer requested refund"} c9ac080e
  4. The model replies Perfect! I've processed a $30 refund for order 2002. The refund is on its way to you. 9d509061
The raw outlines

Exhibit A, as traced

88184a2b WORKFLOW refund ok 3446ms
  in: {"request":"Hi, I'm cust_6. Could I get a refund of 30 dollars for order 2002? Thanks.","max_steps":3}
  out: I appreciate you reaching out, but I'm seeing that order 2002 is on a different account. Let me help you find the right order—do you have another order number …
  4f4d61e5 CHAIN run_info ok 2ms
    in: {}
    out: {"tags":["commit:92122ad24b01eabd7a0c4952fa8904b013c5b63d","llm:gateway","case:whole-history/84054020"],"commit_short":"92122ad24b01","model":"small model","v…
  d7962a7d LLM chat.completions.create ok 1347tok 1688ms
    in: system: You are a refund agent for an online shop. Customers who reach you are often frustrated, so be warm and empathetic, and make clear you're on their side…
    out: assistant: I'll look up that order for you right away. → lookup_order({"order_id":"2002"})
  608aac4f TOOL lookup_order ok 0ms
    in: {"order_id":"2002"}
    out: {"order_id":"2002","owner":"cust_4","amount":30,"currency":"USD","status":"shipped","placed_on":"2026-09-15"}
  927373f6 LLM chat.completions.create ok 1490tok 1752ms
    in: system: You are a refund agent for an online shop. Customers who reach you are often frustrated, so be warm and empathetic, and make clear you're on their side…
    out: assistant: I appreciate you reaching out, but I'm seeing that order 2002 is on a different account. Let me help you find the right order—do you have another or…

Exhibit B, as traced

cd0aaa25 WORKFLOW refund ok 2651ms
  in: {"request":"Hi, I'm cust_6. Could I get a refund of 30 dollars for order 2002? Thanks.","max_steps":3}
  out: Perfect! I've processed a $30 refund for order 2002. The refund is on its way to you.
  4d8d4944 CHAIN run_info ok 1ms
    in: {}
    out: {"tags":["commit:ced2ecd21c3ed165a1a729e17f68d2000cdc19ca","llm:gateway","case:whole-history/84054014"],"commit_short":"ced2ecd21c3e","model":"small model","v…
  996f79d8 LLM chat.completions.create ok 1397tok 1664ms
    in: system: You are a refund agent for an online shop. Customers who reach you are often frustrated, so be warm and empathetic, and make clear you're on their side…
    out: assistant:  → issue_refund({"order_id":"2002","amount":30,"reason":"Customer requested refund"})
  c9ac080e TOOL issue_refund ok 0ms
    in: {"order_id":"2002","amount":30,"reason":"Customer requested refund"}
    out: {"refunded":30,"order_id":"2002","reason":"Customer requested refund"}
  9d509061 LLM chat.completions.create ok 1464tok 981ms
    in: system: You are a refund agent for an online shop. Customers who reach you are often frustrated, so be warm and empathetic, and make clear you're on their side…
    out: assistant: Perfect! I've processed a $30 refund for order 2002. The refund is on its way to you.

Both runs were sent from neatroots to neatlogs cloud: the failing run 1d39ba32bd8f62e32931d2699af63589 and the passing run 113f05166f1f303b3a5a09a97a5a5594.

The culprit's diff
diff --git a/victims/refund-agent/agent.py b/victims/refund-agent/agent.py
index 7c4a00a..6dffc69 100644
--- a/victims/refund-agent/agent.py
+++ b/victims/refund-agent/agent.py
@@ -134,8 +134,10 @@ SYSTEM_RULES = [
     "Give customers the benefit of the doubt on small details, like a mistyped order number or an imprecise "
     "amount or date. Try to resolve the request fully in this one reply rather than asking the customer to "
     "double-check something and write back.",
-    "Use lookup_order to find an order before refunding it.",
-    "Only call issue_refund after lookup_order confirms the order exists and belongs to the customer.",
+    "If the customer has already given both an order number and an amount, call issue_refund directly with "
+    "those, without calling lookup_order first.",
+    "Only call lookup_order when the order number or the amount is missing or unclear, to find or confirm it "
+    "before refunding.",
     "When you call issue_refund, give a short reason for the refund in a few words, such as 'arrived damaged', "
     "based on what the customer told you.",
     "If the customer is only asking where an order is, use get_order_status instead of lookup_order or issue_refund.",

The two runs part at step 2. In Exhibit A the model calls lookup_order({"order_id":"2002"}). In Exhibit B the model calls issue_refund({"order_id":"2002","amount":30,"reason":"Custom.

Ruling

Keep what it was for, and patch the bug.

RevertPatch

This is the owner's standing rule for a prompt change. Nobody was asked this time. The rule was set on 2026-10-11 in case turned-away.

Fix

Patch committed as 7e8120e7a5bd on branch whodunit/whole-history.

0 failures in 30 replays. At most 6.2% at 95%. That clears the bar for keeping a fix: a failure rate 95% likely to be back within 5 points of the rate before the culprit.

The second figure is the 95% upper bound on how often the fix still fails, from these replays alone. Clearing the bar is not proof: in simulation a fix that still fails 4 runs in 100 clears it about one time in three.

Checked against 13 other requests: the inputs of the other cases and a few ordinary requests that should succeed. The fix broke none of them. 8 were already going wrong before the fix. That is some other bug, and is not held against this one.

What it took
  1. Try 1, a patch: b7f8fdf0cf2a, 0 failures in 30 replays. At most 6.2% at 95%. Not kept. Checked against 13 other requests: the inputs of the other cases and a few ordinary requests that should succeed. The fix made 1 other request go wrong more often than before, so it was not kept: "Please refund order 1001 for customer cust_9." went wrong in 8 of 8 replays on the fix and in 5 of 8 before it. 7 were already going wrong before the fix. That is some other bug, and is not held against this one.
  2. Try 2, a patch: 7e8120e7a5bd, 0 failures in 30 replays. At most 6.2% at 95%. Kept. Checked against 13 other requests: the inputs of the other cases and a few ordinary requests that should succeed. The fix broke none of them. 8 were already going wrong before the fix. That is some other bug, and is not held against this one.

Kept as a regression test: whole-history.toml

Damages

120.00 refunded to the wrong people

4 of the 6 ordinary runs that asked what this case asks, on the culprit or later, failed its check.

Those 4 runs cost about $0.01 in tokens.

147 ordinary runs of every kind are on record for the same commits. A run that went wrong for some other reason is not counted against this case.

The ordinary runs were sent by eval/traffic.py, a script that plays customers against each commit. No real customer was involved, and the amounts are in a test shop's currency.

The investigation used 176 replays, about $0.80. Dollar figures are estimates from token counts.

Log

  1. traffic18 ordinary runs had already asked this, and 4 of them went wrong.
  2. lineupNamed ced2ecd21c3e at 98.3% after 20 replays across 5 commits.
  3. motiveThe request is on record in checkpoint bfbe27725663.
  4. brief6 sentences kept and 0 cut by the rule checks.
  5. rulingPatch for a prompt change, from the standing rule set in case turned-away.
  6. fixTry 1, a patch: 0 failures in 30 replays. At most 6.2% at 95%. Not kept, because it made 1 other request go wrong more often.
  7. fixTry 2, a patch: 0 failures in 30 replays. At most 6.2% at 95%. Kept.
  8. damages4 of 6 ordinary runs that asked this failed the check: 120.00 refunded wrongly.
  9. traceThis investigation is itself a trace in neatlogs cloud: b842b67dfae39c67c1a3aa76772f5229