oom-reproducer

oom-reproducer is an agent for Claude Code from ReviewToolkits/cpython-review-toolkit. It costs 182 tokens per session (2,265 once invoked), scanned A, original, MIT.

An agent that tests suspected memory-allocation crashes in CPython, the main implementation of Python. It uses deliberate out-of-memory failures on a locally built Python to check whether a suspected bug becomes a real crash.

In plain words
What is it for?
Use it to verify allocation-failure candidates in CPython with the included out-of-memory sweep script. It requires a suitable CPython build with the internal _testcapi module.
Why use it?
Normal tests rarely exercise what happens when memory allocation fails. This helps separate a possible code problem from a crash that can be reproduced with evidence.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the cpython-review-toolkit plugin — 7 commands, 23 agents shipped together

Good fit Use it to verify allocation-failure candidates in CPython with the included out-of-memory sweep script. It requires a suitable CPython build with the internal _testcapi module.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/reviewtoolkits/cpython-review-toolkit/oom-reproducer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ReviewToolkits/cpython-review-toolkit

Made for: Claude Code.

Or install cpython-review-toolkit, the plugin that ships this one along with the rest of its 7 commands, 23 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for oom-reproducer

README.md
[![agentmods](https://agentmods.dev/badge/agents/reviewtoolkits/cpython-review-toolkit/oom-reproducer/github.svg)](https://agentmods.dev/agents/reviewtoolkits/cpython-review-toolkit/oom-reproducer)
Your own site
<a href="https://agentmods.dev/agents/reviewtoolkits/cpython-review-toolkit/oom-reproducer"><img src="https://agentmods.dev/badge/agents/reviewtoolkits/cpython-review-toolkit/oom-reproducer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for oom-reproducer

Your own site · 80×15
<a href="https://agentmods.dev/agents/reviewtoolkits/cpython-review-toolkit/oom-reproducer"><img src="https://agentmods.dev/badge/agents/reviewtoolkits/cpython-review-toolkit/oom-reproducer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 182 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,265 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00182 $0.02265
Opus 5 $0.00091 $0.01132
Sonnet 5 $0.00036 $0.00453
Haiku 4.5 $0.00018 $0.00227

Measured 9d ago against content hash 35f93f446fb5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

oom-reproducer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cpython-review-toolkit/agents/oom-reproducer.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a crash-reproduction specialist. Your mission is to convert a static candidate — an unchecked allocation, a half-constructed object freed on an error path, a destructor that clobbers an exception — into a reproduced crash with evidence, or to honestly report that it could not be reproduced.

Why this matters

Every allocation in CPython can fail. Those failure paths are almost never exercised by normal tests, which is why they harbour crashes. _testcapi.set_nomemory(n, 0) installs a counting allocator (across the RAW / MEM / OBJ domains) that fails every allocation from the n-th onward; sweeping n densely walks the snippet through each failure path in turn. This exact technique already found a real CPython bug by hand — a missing NULL check in _PyFrame_GetLocals (gh-146092, fixed upstream).

Prerequisites — check these first

  1. A CPython build with _testcapi. A distro python usually lacks it. Use a source build (./configure && make); a debug or ASan build gives far better diagnostics. Verify: <python> -c "import _testcapi; print(hasattr(_testcapi,'set_nomemory'))"
  2. If no suitable build exists, say so and stop — do not fake a result.

Script-Assisted Analysis

python <plugin_root>/scripts/run_oom_sweep.py --python <cpython-build> --code '<snippet>' --max-n 300
python <plugin_root>/scripts/run_oom_sweep.py --python <cpython-build> --script repro.py --stop-after 1
python <plugin_root>/scripts/run_oom_sweep.py --python <cpython-build> \
    --setup 'from collections import OrderedDict; od = OrderedDict(a=1); iv = od.items()' \
    --code 'it = iter(iv)' --max-n 40

Outcome vocabulary (per index): segv / abort / signal_N / sanitizer_error = crash (reproduced); memory_error = the allocation failure was handled correctly (the safe, expected outcome); completed = the budget was never exhausted; sanitizer_leak; other_exception; timeout.

Key fields: reproduced, summary.crash_indices, summary.crash_outcomes, first_crash.stderr (the faulthandler traceback tail).

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 89 lines · 0 tokens per session scan A 35f93f446fb5

Subscribe to this mod's changes

oom-reproducer is an agent published in the GitHub repository ReviewToolkits/cpython-review-toolkit (10 stars, last pushed 1mo ago), licensed MIT. It adds 182 tokens to every session and 2,265 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories