An agent bug hunt: 16 bugs, 4 unreported, 6 decoys: 7 AI models

5 of 9 tries passed. Gemini 4 Neon, GPT-6.2 Astra, Claude Opus 5.5 and Kimi K3.1 Pro passed every try; Gemini 4 Carbon never passed. Cheapest per pass at the maker's list price: DeepSeek V4.1 Flash 1017. Who failed and why is below, with the model's diff.

Updated

The task

Asked
18 user reports against a copy of cachetools with 16 planted bugs. 4 bugs have no report, and 6 reports describe documented behavior, unlabeled. Fix the real bugs, find the unreported ones, keep documented behavior.
Tries
5 of 9 passed, 1 to 3 tries a model

Who failed, and why?

Each model's closest failed try: how far it got, the grader's own words and the start of its change to the library.

  1. Gemini 4 Carbon

    0 of 2 tries passed. Closest failed try: 0 of 16 bugs fixed, 6 of 6 decoys kept.

    In both tries it spent most of its 60 steps (36 and 38) printing files as base64 and ran out of steps before editing any code, so all 16 bugs were still there.

    Grader, try 1: Missed report 1 (typedkey drops kwarg types); report 2 (LRU read does not refresh); report 3 (TTL iteration shows key at its expiry time); report 4 (cache_clear keeps info counters (no lock)) and 12 more.

    Used all 60 tool steps without finishing.

  2. DeepSeek V4.1 Flash 1017

    1 of 3 tries passed. Closest failed try: 0 of 16 bugs fixed, 6 of 6 decoys kept.

    Passed try 1. Tries 2 and 3 spent all 60 steps reading code and docs with sed and grep and never edited a file.

    Grader, try 2: Missed report 1 (typedkey drops kwarg types); report 2 (LRU read does not refresh); report 3 (TTL iteration shows key at its expiry time); report 4 (cache_clear keeps info counters (no lock)) and 12 more.

    Used all 60 tool steps without finishing.

Passed every try: Claude Opus 5.5, GPT-6.2 Astra, Gemini 4 Neon and Kimi K3.1 Pro.

No try on this task, because the run hit its $25 spend cap first: Claude Fable 5.2.

Every model, every try

ModelTries passedBest tryMedian timeMedian stepsList costStraitly price
Claude Opus 5.5Anthropic1 of 116 of 16 bugs fixed, 6 of 6 decoys kept10.9 min48$3.52$2.11
GPT-6.2 AstraOpenAI1 of 116 of 16 bugs fixed, 6 of 6 decoys kept7.6 min55$2.68$1.61
Gemini 4 NeonGoogle1 of 116 of 16 bugs fixed, 6 of 6 decoys kept6.9 min59$1.19See model page
Gemini 4 CarbonGoogle0 of 20 of 16 bugs fixed, 6 of 6 decoys kept8.6 min60$1.04$1.04
DeepSeek V4.1 Flash 1017DeepSeek1 of 316 of 16 bugs fixed, 6 of 6 decoys kept14.6 min60$0.0713$0.0428
Kimi K3.1 ProMoonshot1 of 116 of 16 bugs fixed, 6 of 6 decoys kept19.4 min52$0.75$0.43
Claude Fable 5.2AnthropicNot runSpend cap reachedSee model page

26 November 2026, 7:25 PM to 9:52 PM PT. Time is wall time for a whole try on our machine, tool runs included: one dated run, not a speed claim for any API. Both costs are for one try, the mean over a model's tries, at the maker's list price and at the Straitly catalog price that day. Gemini 4 Neon: see its model page.

Do the public boards agree?

The Artificial Analysis Index, Terminal-Bench and ARC-AGI 2 run many tasks once each. This is one hard task, tried again and again.

Where we agree
GPT-6.2 Astra, first on the AA Index of the models that ran it (62), also passed the most here: 1 of 1.
Where we differ
Kimi K3.1 Pro is 5th of 6 on the AA Index (47) but 1st here, with 1 of 1 tries passed. Claude Opus 5.5 is 4th of 6 on the AA Index (59) but 1st here, with 1 of 1 tries passed. Gemini 4 Carbon is 3rd of 6 on the AA Index (60) but only 6th here, with 0 of 2 tries passed.

Our run next to the public boards

ModelOur tries passedAA IndexTerminal-Bench 4.1ARC-AGI 2
GPT-6.2 AstraOpenAI1 of 16262.1%95.8%
Gemini 4 NeonGoogle1 of 16161.2%93.8%
Gemini 4 CarbonGoogle0 of 26064.5%94.2%
Claude Opus 5.5Anthropic1 of 15965.8%93.3%
Kimi K3.1 ProMoonshot1 of 14759.7%Not listed
DeepSeek V4.1 Flash 1017DeepSeek1 of 33238.5%78.1%

Sorted by the AA Index. Scores are the boards' own independent runs, not ours: AA Index as of 26 November 2026; Terminal-Bench 4.1 as of 26 November 2026; ARC-AGI 2 as of 26 November 2026. Each score links to its board.

What did each model say it did?

The prompt, the file it points to, and every try's closing message, exactly as it came back.

The promptSent word for word to every model, every try

System: You are a senior software engineer working in a git repository on a Linux-like machine. You have one tool, `bash`, which runs a shell command in the repository root and returns its output. There is no network access. Python is `python` (3.12) with pytest installed; run the tests with `python -m pytest -q`. Work step by step: read the code, make the change, run the tests. Edit files with shell tools (cat with a heredoc, sed, or python). When you are completely done, reply with a short summary and no tool call.

This is the cachetools repository (src/cachetools). BUG_REPORTS.md lists eighteen open reports from users. Work through them as the maintainer would. Our own QA also says this build has bugs that no user has reported yet; find and fix those too. The visible test suite passes today but does not cover any of this. Hidden tests will check the reports, the unreported bugs and the rest of the library. Run Python with PYTHONPATH=src.

BUG_REPORTS.mdThe file in the repo the prompt points to
# Open bug reports

Users sent these reports against this build of cachetools. They are written the way users wrote them: what
they saw, not where the cause is. Some reports may share a cause and one report may have more than one cause.
Please look into them all.

1. With `typed=True`, calling my function as `f(x=3)` and then `f(x=3.0)` gives the cached int answer for the
   float. Positional calls are fine.
2. My `LRUCache` throws away the entry I read a moment ago instead of the one nobody has touched.
3. Looping over a `TTLCache` at the exact moment an item expires still shows that item, though `in` says no.
4. After `cache_clear()` on a decorated function with `info=True`, `cache_info()` still shows the old hits and
   misses. With a lock it resets fine.
5. The `choice` function I pass to `rr_cache` is never called.
6. A cache with `getsizeof` slowly fills up when I keep storing new values under the same keys, and starts
   evicting unrelated entries.
7. In a `TLRUCache`, a key I stored a second time with a longer lifetime still vanishes at the old time, and
   `len()` can then disagree with what is really inside.
8. A value exactly as big as `maxsize` is refused as too large.
9. A memoized `f(*args, **kwargs)` returns the same answer for `f(x=1)` and for `f(("x", 1))`.
10. When several keys in an `LFUCache` have been used the same number of times, the newest is evicted, not the
    oldest.
11. After calling `expire(t)` on a `TTLCache` with a time a bit ahead of its timer, the expired keys are gone from
    `len()` and iteration but `key in cache` still says `True` for them.
12. `ttl_cache(maxsize=None, timer=my_timer)` never expires anything when I move my timer forward.
13. Without `typed`, my memoized `f(1)` and `f(1.0)` share one cache entry, so `f(1.0)` gives back the int
    answer. These are different arguments and should be cached apart.
14. Storing a key again in a `TTLCache` pushes its expiry later. I expected an item to expire `ttl` seconds
    after I first stored it, whatever I do with it afterwards.
15. Checking `key in cache` on an `LFUCache` does not count as a use, so a key I check all the time is still
    the first one evicted.
16. `RRCache` evicts a different key on each run, so my test results change from run to run. Eviction
    should be repeatable.
17. Storing a value bigger than `maxsize` in a cache raises `ValueError`. It should just not be cached.
18. `LRUCache.popitem()` takes out the oldest item. Every other mapping I use, `dict` included, pops the
    newest one.
Claude Opus 5.5, try 1Pass, 16 of 16 bugs fixed, 6 of 6 decoys kept, 10.9 min, 48 steps

I fixed 12 of the 18 reports and 3 bugs nobody had reported. The other 6 reports describe how the library is documented to work, so I left that behaviour alone. The full suite passes (400 tests, including the 22 I added), and every new test fails on the original code. Randomized checks of each cache against a simple reference model also pass. I ran pytest directly, not `tox`, so the type-check, lint and docs checks have not been run.

**Fixed reports** (all in `src/cachetools/` unless noted)

| # | Cause | Fix | |---|---|---| | 1 | `keys.typedkey` left keyword-argument types out of the key | Adds them, as `typedmethodkey` already did | | 9 | `keys.hashkey` had no separator between positional

Cut at 700 characters.

GPT-6.2 Astra, try 1Pass, 16 of 16 bugs fixed, 6 of 6 decoys kept, 7.6 min, 55 steps

Fixed reports **1–12** and documented why **13–18** are expected behavior in `BUG_REPORTS.md`.

Also fixed unreported bugs in LFU copying and unpickling, TTL expiry order after unpickling, and TLRU copying of replaced entries. Reusing a `cachetools.func` decorator now gives each wrapped function its own cache instead of allowing one function to return another’s result.

Added regression tests and ran `PYTHONPATH=src python -m pytest -q`: **400 passed**.

Gemini 4 Neon, try 1Pass, 16 of 16 bugs fixed, 6 of 6 decoys kept, 6.9 min, 59 steps

I have reviewed all eighteen reports in `BUG_REPORTS.md`, audited the full `src/cachetools` codebase for unreported bugs, applied fixes, and added regression tests.

### Fixed Reported Bugs (1–12) 1. **`src/cachetools/keys.py` (`typedkey`)**: Included keyword argument value types (`tuple([type(v) for _, v in sorted_kwargs])`) so `f(x=3)` and `f(x=3.0)` produce distinct keys with `typed=True`. 2. **`src/cachetools/__init__.py` (`LRUCache.__getitem__`)**: Restored `self.__order.move_to_end(key)` when `key in self.__order` so reads mark entries as most recently used. 3. **`src/cachetools/__init__.py` (`TTLCache.__iter__`)**: Changed `time <= link.expires` to `time < link.expires` so items expir

Cut at 700 characters.

Gemini 4 Carbon, try 1Fail, 0 of 16 bugs fixed, 6 of 6 decoys kept, 8.0 min, 60 steps

No closing message. Used all 60 tool steps without finishing.

Gemini 4 Carbon, try 2Fail, 0 of 16 bugs fixed, 6 of 6 decoys kept, 9.2 min, 60 steps

No closing message. Used all 60 tool steps without finishing.

DeepSeek V4.1 Flash 1017, try 1Pass, 16 of 16 bugs fixed, 6 of 6 decoys kept, 14.6 min, 60 steps

No closing message. Used all 60 tool steps without finishing.

DeepSeek V4.1 Flash 1017, try 2Fail, 0 of 16 bugs fixed, 6 of 6 decoys kept, 15.3 min, 61 steps

No closing message. Used all 60 tool steps without finishing.

DeepSeek V4.1 Flash 1017, try 3Fail, 0 of 16 bugs fixed, 6 of 6 decoys kept, 10.8 min, 60 steps

No closing message. Used all 60 tool steps without finishing.

Kimi K3.1 Pro, try 1Pass, 16 of 16 bugs fixed, 6 of 6 decoys kept, 19.4 min, 52 steps

Implemented fixes for the 12 actionable reports and four additional internal-state bugs:

- Corrected typed keyword keys and positional/keyword key collisions. - Restored LRU/LFU eviction behavior and weighted-size accounting. - Fixed TTL/TLRU expiration, replacement, and exact-boundary handling. - Reset unlocked decorator statistics and honored custom RR/TTL decorator arguments. - Fixed LFU/TTL/TLRU copy and pickle restoration invariants. - Preserved documented behavior for the six reports requesting incompatible semantics.

Validation: all **378 tests pass**, plus direct checks covering every report and the unreported copy/pickle defects.

How was this run?

The same way for every model and every try, graded by tests the model never saw.

  • Run26 November 2026, 7:25 PM to 9:52 PM PT. Every model got the same system prompt and the same task prompt, word for word, in a fresh copy of the repo for every try.
  • TriesUp to 3 per model per task; each row says how many. The run had a $25 spend cap, so tries went in rounds, cheapest models first, and stopped at the cap. Claude Fable 5.2 got no try on the cachetools bug hunt. Every try is shown, passed or not.
  • AgentThrough the Straitly API (OpenAI chat completions format) with our own test key. One tool, bash, run in a macOS sandbox with no network. Up to 60 tool steps and 16,000 output tokens a reply; tool output cut to 6,000 characters. Each model's default temperature and reasoning.
  • Gradingcachetools' full upstream test suite, plus hidden tests for each bug and each decoy. A bug counts as fixed only when every test tied to it passes; a decoy counts as kept when its documented behavior still works. The model never saw the hidden tests. Pass means every test passed.
  • TimeWall time for a whole try, timed on our own machine, tool runs and network included. It is one dated run per model, so it says how long each model took on these tasks, not how fast any API is, Straitly's included.
  • Slow first repliesGemini 4 Carbon took 10 s on average before their first reply. That wait is the model's own thinking before it acts, and it showed on every task.
  • List costEvery call's input, cached input and output tokens at the maker's list price, read on the run day. DeepSeek uses the peak or off-peak rate in force when each try started. Gemini 4 Carbon's rate is the one in force until 30 November 2026.
  • Straitly priceThe same tokens at the Straitly catalog price on the run day. Gemini 4 Neon shows a link to its model page instead.
  • Made harderClaude Opus 5.5 fixed every bug in an earlier version of the bug hunt, so before the full run four reports were taken out (those bugs are now unreported) and the line saying some reports are not bugs was cut. Runs on the earlier version are not counted.
  • RerunsTwo bug-hunt tries stopped part way when our own shell closed, before any grading, and were started again from scratch. One DeepSeek bug-hunt try read a stock copy of cachetools that our sandbox had left readable; we closed that hole, threw the try away and ran it again. Two Kimi K3.1 Pro bug-hunt tries were cut off part way by an API error (HTTP 502, upstream provider not answering) before grading; both were thrown away and the try run again with longer retries. The same error ended its third refactor try; that one is left out and was not run again. Nothing was rerun for a better answer.

Rates used

ModelListCache readStraitly price
Claude Opus 5.5Anthropic$4.00 / $20.00$0.2$2.40 / $12.00
GPT-6.2 AstraOpenAI$8.00 / $40.00$0.4$4.80 / $24.00
Gemini 4 NeonGoogle$3.00 / $15.00$0.15See model page
Gemini 4 CarbonGoogle$2.00 / $10.00$0.1$2.00 / $10.00
Claude Fable 5.2Anthropic$8.00 / $40.00$0.2$4.80 / $24.00
DeepSeek V4.1 Flash 1017DeepSeek$0.15 / $0.60$0.003$0.090 / $0.36
Kimi K3.1 ProMoonshot$2.00 / $10.00$0.2$1.14 / $5.70

List prices from each maker's pricing page, read on the run day. Each call is priced on its own, cache reads at the cache rate. DeepSeek's rate is the one in force when each try started (peak hours cost double); its off-peak rate is shown.

What else do people ask?

Ask a question
  • Gemini 4 Neon, GPT-6.2 Astra, Claude Opus 5.5 and Kimi K3.1 Pro passed every try. 2 of 6 models failed at least once.
  • By running it, never by reading it: cachetools' full upstream test suite, plus hidden tests for each bug and each decoy. A bug counts as fixed only when every test tied to it passes; a decoy counts as kept when its documented behavior still works. The model never saw the hidden tests.
  • Not the fixes. Models know cachetools well, so the bugs were planted for this test, the reports give symptoms only, 4 bugs have no report at all, and 6 decoy reports punish changing code that is right.
  • An agent does not take the same path twice. Repeat tries show whether a pass repeats or was luck. Here each model got 1 to 3 tries; every try is on the page, passed or not.

Sources

The task's upstream sources, the public boards and each maker's pricing page, read on the run day. Spot something out of date? Tell us at straitly.ai/contact.

  1. [1]cachetools on GitHubgithub.com, checked 26 November 2026
  2. [2]Artificial Analysis Intelligence Indexartificialanalysis.ai, checked 26 November 2026
  3. [3]Terminal-Bench leaderboardtbench.ai, checked 26 November 2026
  4. [4]ARC Prize leaderboardarcprize.org, checked 26 November 2026
  5. [5]Anthropic pricingplatform.claude.com, checked 26 November 2026
  6. [6]OpenAI pricingdevelopers.openai.com, checked 26 November 2026
  7. [7]Gemini API pricingai.google.dev, checked 26 November 2026
  8. [8]DeepSeek pricingapi-docs.deepseek.com, checked 26 November 2026
  9. [9]Kimi API pricingplatform.kimi.ai, checked 26 November 2026
  10. [10]Straitly model catalogstraitly.ai/models, checked 26 November 2026
What each source says
cachetools on GitHub
The library the bug hunt starts from, at commit 321a3b6, with its full test suite.
Artificial Analysis Intelligence Index
Intelligence Index 5.0.2, one score per model from Artificial Analysis' own runs of its evaluation suite.
Terminal-Bench leaderboard
Terminal-Bench 4.1 resolution rate, the best verified agent run per model.
ARC Prize leaderboard
ARC-AGI 2 scores verified by ARC Prize, default leaderboard view.
Anthropic pricing
Claude Opus 5.5 $4 / $20 and Claude Fable 5.2 $8 / $40 per 1M input / output tokens, base rate; cache reads $0.20.
OpenAI pricing
gpt-6.2-astra $8 / $40 per 1M input / output tokens, Standard, prompts up to 272K tokens; cached input $0.40.
Gemini API pricing
Gemini 4 Neon $3 / $15 per 1M input / output tokens, paid tier. Gemini 4 Carbon $2 / $10 through 30 November 2026 and $4 / $20 from 1 December 2026.
DeepSeek pricing
V4.1 Flash $0.15 / $0.60 per 1M input (cache miss) / output tokens off-peak; double that in peak hours, 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays.
Kimi API pricing
kimi-k3.1-pro $2 / $10 per 1M input (cache miss) / output tokens; cache hits $0.20.
Straitly model catalog
The per-model price list /models prints, read on the run day.

Start with one request.

Run the same task on every model with one key. See pricing.