Agent files a bug about zero-extraction comparison tooling, then immediately ships another comparison parser with the same silent zero-extraction bug
Summary
Within a single session the agent (Claude Code) filed a bug report about producing comparison tooling that silently extracts nothing — and then, in the very next step, produced another comparison script with the same silent-zero-extraction bug. It did not internalize the lesson it had just written down moments earlier. The user had to catch the empty/broken comparison a second time and push the agent to fix it.
What happened
- Earlier in the session the agent wrote a comparison script whose parser returned zero rows for both sides, and presented the empty output as if a comparison had run. The user flagged it; the agent filed an issue describing exactly this failure ("ships comparison tooling that extracts nothing").
- Immediately afterward, asked to do the comparison properly, the agent wrote another parser with a closely related bug (a character-class that stopped at the digits inside a column header like "95% CI"), which again matched zero rows — and again the agent only discovered it after running and seeing empty results.
- Only on the next iteration did the agent write a working parser. The correct comparison then showed full agreement — meaning the underlying result was fine all along; the wasted cycles were entirely self-inflicted by repeatedly shipping extraction code that silently produced nothing.
Why this matters
Recording a lesson ("don't present a zero-extraction result as a comparison") and then violating it one step later is a failure to learn within the same context window. A parser that extracts zero items must be treated as a hard error and force an immediate self-correction, not be run repeatedly until the user notices. The agent should validate that its own extraction returned a plausible, non-empty result before presenting or trusting it.
Suggested guardrails
- Any extraction/parse step must assert a non-empty, expected-shape result and hard-fail loudly if it gets zero items — never present empty output as a completed comparison.
- When the agent has just recorded a specific failure mode, it should gate its next similar action against that exact lesson before executing.
- Validate parsers against a known sample (one row that must match) before running them across a dataset, so a regex that matches nothing is caught immediately rather than after a user complaint.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗