/cpython-review-toolkit:reproduce [finding-or-snippet] [--python <cpython-build>]from cpython-review-toolkit
Attempts to reproduce a static allocation-failure finding as a crash via dense OOM injection on a CPython build. Sweeps allocation indices, confirms and minimizes crashes, and generates a report.
Ships in cpython-review-toolkit. Installing the plugin adds it to Claude Code.
Take a static candidate — from uninitialized-dealloc-auditor, pyerr-clear-auditor, null-safety-scanner, error-path-analyzer, or a known-issues present verdict — and try to turn it into a reproduced crash with evidence on a locally-built CPython.
Arguments: "$ARGUMENTS"
The harness needs a CPython build providing _testcapi.set_nomemory. Check, in order:
--python <path> argument../python (e.g. ~/projects/cpython/python).~/projects/python_build_matrix/builds/*/python) — prefer a debug or ASan build; they turn silent corruption into loud assertions.Verify: <python> -c "import _testcapi; print(hasattr(_testcapi,'set_nomemory'))".
If none is available, report that and stop — do not fabricate a result.
If the argument names a finding (file:line, function, or a scanner finding id), read that code and write the smallest stdlib-only snippet that reaches it. If the argument is already a snippet or a script path, use it directly.
State explicitly which line you are trying to reach — Phase 4 depends on it.
Dispatch the oom-reproducer agent, or run directly:
python <plugin_root>/scripts/run_oom_sweep.py --python <build> --code '<snippet>' --max-n 300
Dense by default. Use --stop-after 1 for existence proof, --start-n to skip startup allocations, --script for a longer payload.
On a crash: re-run to confirm determinism, then shrink the payload to the minimum that still crashes, and capture the faulthandler traceback and the crash index.
# Reproduction Report
## Target
[static finding + file:line + which agent surfaced it]
## Interpreter
[path, build flavor, version]
## Sweep
- Range: 0..N (dense) | Outcomes: {...}
- **Verdict**: REPRODUCED at index K / not reproduced in this range
## Evidence
[exit code + faulthandler traceback]
## Assessment
[Did the payload reach the flagged line? What is proven / not proven?]
A negative result is a real result: "every allocation failure on this path was handled cleanly" must be reported plainly, and does not by itself refute the static finding (the payload may not have reached the line).
For a reproduced crash, add/update the record in the cpython-review-findings repo — repro.py, evidence.txt, status reproduced, the crash index, the interpreter build, and found_by (the static agent that predicted it). Then regenerate its index.
/cpython-review-toolkit:reproduce Objects/templateobject.c:225
/cpython-review-toolkit:reproduce 'import json; json.loads("[1,2,3]")' --python ~/projects/cpython/python
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub reviewtoolkits/cpython-review-toolkit --plugin cpython-review-toolkit7 commands in this plugin
/exploreComprehensive CPython C Code ExplorationComprehensive CPython C code exploration and analysis using specialized agents/healthCPython C Code Health DashboardQuick health dashboard — all agents in summary mode/hotspotsCPython C Code HotspotsFind cleanup targets — complexity hotspots, refcount issues, and error handling bugs/informed-exploreInformed CPython C Code ExplorationLike `explore`, but INFORMED: every agent first reads a briefing of recurring CPython C bug SHAPES (sibling-hunt templates with their guarded twins), the cross-cutting triage rules, and the false-positive taxonomy — so it confirms-without-relitigating, suppresses known FPs, and hunts un-found siblings of known shapes instead of re-discovering from scratch. Use for a thorough audit, a re-review of a subsystem, or whenever fix-propagation matters more than raw speed./known-issuesCPython Known-Issues RegressionCross-reference the seed catalog of previously-found CPython crashes against a fresh scan, so a fix (or a regression-after-revert) is detected. Static, drift-tolerant regression — no repros run./mapInclude Graph MapQuick include graph mapping — understand CPython C file structure and dependenciesOther plugins' commands for the same job