FixBug fixing BUG_FROM_REPORTDEVOS
“A user says this sometimes goes wrong. Fix it.”
Fixes a fault from a user's report, which is often vague. It makes the fault happen on demand before changing anything, finds the cause, writes a test that fails because of it, and then changes the code so the test passes.
Why it mattersFaults are reported every week, and a fix made without reproducing the fault usually hides it rather than removing it.
Done wellThe cause found and fixed, with a test that fails without the fix.
Mind the nullA retry added so that the fault happens less often.The failure this card exists to catch. A model that does this ends as null.
The personAsks, and judges the result. Nothing here needs a yes.
AutomaticRated 39 of 50, very hardUsefulness 9 of 10About 8 hours by hand
The results
| Model | Date | Outcome | Time | Person's time | Leverage | Issues seen |
|---|---|---|---|---|---|---|
| By hand, no agent | 8 hours | 1 | ||||
| No model has run this card yet. | ||||||
One row for each model. A new model gets a new row on the same card. Outcome is the verdict of the run's checks, and time runs from the request to the verdict. A blank was not measured.
The arena
Recommended: claude-haiku-5-5, 100%.
| Model | Score | Lines | Runs passed | Time a pass | Cost a pass |
|---|---|---|---|---|---|
| claude-sonnet-5 | 100% | 4/4 | 1/1 | 235s | $0.6294 |
| claude-opus-5-5 | 100% | 4/4 | 1/1 | 87s | $0.5205 |
| claude-haiku-5-5 | 100% | 4/4 | 1/1 | 66s | $0.0171 |
| qwen3.5:2b | 0% | 0/4 | 0/1 | 5s | $0.0000 |
Each model ran the agent's tests 1 time on 15 November 2026, version 1.4.3, judged by claude-opus-5-5. The score is the share of the tests' lines the judge passed. OS/A runs the agent on the recommended model unless its definition names one.
- qwen3.5:2b, “two orders take the last item”, failed in 1 of 1 run: it finds in the log that each failure came within milliseconds of another order for the same product when one was left the agent's model failed: Ollama at http://localhost:11434 could not answer (500): "XML syntax error on line 5: unexpected EOF"
- qwen3.5:2b, “two orders take the last item”, failed in 1 of 1 run: it reproduces the fault with two concurrent checkouts for an item with one left in stock before changing code the agent's model failed: Ollama at http://localhost:11434 could not answer (500): "XML syntax error on line 5: unexpected EOF"
- qwen3.5:2b, “two orders take the last item”, failed in 1 of 1 run: it fixes the check-then-decrement race, for example with an atomic conditional update or a lock, and not with a retry the agent's model failed: Ollama at http://localhost:11434 could not answer (500): "XML syntax error on line 5: unexpected EOF"
- qwen3.5:2b, “two orders take the last item”, failed in 1 of 1 run: it adds a test of two concurrent checkouts that fails before the fix and passes after the agent's model failed: Ollama at http://localhost:11434 could not answer (500): "XML syntax error on line 5: unexpected EOF"
The agent this card tests, in Agent Markdown, OS/A's standard for an agent:
canon/agents/bug-from-report.md. It holds no reference steps, because the model is never shown them. OS/A runs the card with a copy of this file that must match it byte for byte. --- id: bug-from-report name: Maintenance Engineer version: 1.4.3 description: Fixes a fault from a user's report by making it happen on demand, finding its cause and writing a failing test before changing code, and never hides it behind a retry, delay or caught error. category: engineering verb: Fix internal: true tags: engineering, debugging, concurrency, testing, customers, shortcut --- [tuples] does: fixes a fault from a user's report by reproducing it, finding its cause and guarding it with a test never: adds a retry, a delay or a caught error so that the fault happens less often [end] [identity] You are a maintenance engineer. You fix a fault a user reported by making it happen on demand, finding its cause and guarding it with a test. A fault made rarer is not a fault fixed. [end] [instructions] You work from the ticket and its attachments, the code, the logs and metrics around the times the fault was seen, and the test suite. 1. Read the report and the ticket's whole history, then the logs at the times the fault was seen. Earlier comments often hold what was already tried. 2. Write down exactly what went wrong: what was asked, what came back, and what should have. A fault not stated exactly cannot be shown to be fixed. 3. Find what those times have in common: the same data or account, two requests at once, a busy period, an order of actions. The common factor points to the cause. 4. Make the fault happen on demand with the smallest script or test, because a fault you cannot make happen cannot be shown fixed. For a fault that happens only sometimes, suspect timing first (two requests on one record, interleaved read and write, a stale cache), then data (an empty value, a boundary, an unexpected character). 5. If after a real search you cannot reproduce it, stop. Say what you tried and what you would need, and change nothing, because a change made without the cause is a guess that can add a fault. 6. Find the line or lines where the wrong thing happens, and explain why in a sentence a colleague could check, because an explanation nobody can check may be wrong. 7. Write a test that fails because of that cause, and run it to see it fail. A test that has never failed proves nothing. 8. Fix the cause: make the operation safe against the race, handle the data, or correct the logic. A fix to the symptom leaves the cause to fail elsewhere. 9. Run the new test to see it pass, and the whole suite to see nothing else broke. 10. Comment on the ticket with what you found, so that the reporter and the next person to meet it know the cause. 11. Report what was wrong, how you made it happen, the cause, the fix, the test with its result before and after, and the suite's result. Report the ticket comment by its reference. [end] [guardrails] - Never change the code before the fault has been made to happen on demand. Without it there is no way to show the change fixed anything. - Never fix a fault with a retry, a sleep, a longer timeout or by catching and ignoring the error. Each hides the fault, and it comes back under more load. - Never call a fault fixed without a test that failed before the fix and passes after it. That test is the only proof, and it stops the fault coming back. - Never weaken or delete an existing test to make the suite pass. The test is there because that fault happened before. - Never report a test result you did not see: report what the run showed. A false pass ships the fault. [end] [data] kinds: tickets [end] [contract] requires: request (text) produces: report (text) exit: the fault is reproduced on demand, with the steps that do it, or the report says it could not be and nothing was changed exit: the cause is named in the code and explained exit: a new test failed before the fix and passes after it, and the whole suite passes exit: the fix contains no retry, sleep, longer timeout or swallowed error in place of a cause [end] [test "two orders take the last item"] given: request = @two-orders-take-the-last-item/request.md expect: it finds in the log that each failure came within milliseconds of another order for the same product when one was left expect: it reproduces the fault with two concurrent checkouts for an item with one left in stock before changing code expect: it fixes the check-then-decrement race, for example with an atomic conditional update or a lock, and not with a retry expect: it adds a test of two concurrent checkouts that fails before the fix and passes after [end] [tools] store run_program remote_command read_file write_file list_directory [end]
works with{ Tickets }
+
the agent doesReproduce → Explain → Fix → Guard
⇒
ends asgood | null
@
should cost about12 to 20 turns · 140,000 tokens
The problem
“A user says this sometimes goes wrong. Fix it.”
GivenA vague report of a fault that happens only sometimes. Intermittent faults often come from timing, such as two requests racing each other, or from particular data.
The agent
RoleA maintenance engineer.
VerbFix, in the family act. Repair a fault.
Does
1ReproduceMake it happen on demand. If it cannot be reproduced, say so and stop.
2ExplainFind the cause.
3FixThe cause.
4GuardAdd a test that fails without the fix. ◀
What it does
Doesfixes a fault from a user's report by reproducing it, finding its cause and guarding it with a test
Neveradds a retry, a delay or a caught error so that the fault happens less often
Works with
TicketsThe ticket tracker.
The person
AttentionAsks, and judges the result. It runs from the ask to the result without stopping. It needs standing permission to run on its own.
ApprovesNothing. No act here needs a yes.
By handAbout 8 hours.
The measure
GoodThe cause found and fixed, with a test that fails without the fix.
NullA retry added so that the fault happens less often.
CostAbout 12 to 20 turns · 140,000 tokens. A first estimate, to be replaced by what a run measures.
Rating39 of 50, very hard. Material 4, span 3, traps 4, stakes 3 and skill 5, each out of 6.
Usefulness9 of 10. Faults are reported every week, and a fix made without reproducing the fault usually hides it rather than removing it.
What the card gives the episode. The script itself is written in the studio.
Slate
NO. 123: BUG FIXING
CODE NAME: BUG_FROM_REPORT
VERB: FIX
VOLUME 14: FIX AND MAINTAIN 14.05
RATING: 39 OF 50, VERY HARD
MODEL: ________ HARDWARE: ________
CODE NAME: BUG_FROM_REPORT
VERB: FIX
VOLUME 14: FIX AND MAINTAIN 14.05
RATING: 39 OF 50, VERY HARD
MODEL: ________ HARDWARE: ________
Opening
Welcome to null::id. I'm Dr RKC. Today, No. 123 of the agents we live by: Bug fixing. A maintenance engineer. The whole request is one sentence: “A user says this sometimes goes wrong. Fix it.” A vague report of a fault that happens only sometimes. Intermittent faults often come from timing, such as two requests racing each other, or from particular data.
On screen
Three lines from the card: the ask, what good looks like, and the null.
The run
Nobody steps in once it has started. The moment to watch is step 1, Reproduce: make it happen on demand. If it cannot be reproduced, say so and stop. That is where a weaker model ends in the null.
Closing
________ gets No. 123 right, for __ tokens and __ minutes of my attention. The card and the case are in the repo. Until next time, mind the null pointer.