informed-explore

A guided exploration command for CPython’s C source that gives its checking agents background on recurring bug patterns and known false positives. It then searches for other instances of those patterns.

In plain words
What is it for?
Use it to investigate selected paths or the whole checkout across several bug categories. It can produce summary or deeper results and limit how many checks run at once.
Why use it?
It helps reviews build on previously understood CPython bugs instead of repeatedly starting from scratch. The extra context supports comparing suspicious code with safer related code.

Command

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.

agentmods
npx agentmods add commands/reviewtoolkits/cpython-review-toolkit/informed-explore
Clone the repo
git clone --depth 1 https://github.com/ReviewToolkits/cpython-review-toolkit
Per session 106 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,817 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00106 $0.01817
Opus 5 $0.00053 $0.00908
Sonnet 5 $0.00021 $0.00363
Haiku 4.5 $0.00011 $0.00182

Measured 2d ago against content hash 78121d6450e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

informed-explore 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 2d 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/commands/informed-explore.md · 125 lines

How it starts

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

Informed CPython C Code Exploration

Same coverage as explore, but informed: every agent is seeded with the toolkit's accumulated knowledge before it triages. That is what turns a cold, re-discovering pass into a fix-propagation sweep — finding every instance of a known bug shape and naming the guarded twin that fixes it. Validated pattern, ported from the sibling toolkits' informed runs.

Arguments: "$ARGUMENTS"

Plugin root: <plugin_root> is the plugins/cpython-review-toolkit/ directory — this command file's grandparent. Resolve it relative to this file.

Argument Parsing

Identical to explore: scope (path or glob, default the whole checkout), aspects (the same aspect→agent table as explore.md, default all), and options (deep, summary, parallel, --max-parallel N).

Execution Workflow

Phase 0 — Project Discovery

Exactly as explore Phase 0: identify the CPython root (Include/Python.h + Objects/object.c), count .c/.h files in scope, read the version from Include/patchlevel.h, print a brief scope summary.

Phase 0.5 — Build the informed briefing ← the new step

python <plugin_root>/scripts/build_informed_briefing.py > reports/preflight/informed_briefing.md

If you keep the durable findings repo (cpython-review-findings) checked out — the static analog of the cpython-oom-findings / cpython-tsan-findings repos — add --catalog-dir <path-to-cpython-review-findings> to fold its reports/*/meta.json entries into the briefing as "confirm, don't re-litigate" leads, so a re-review is cumulative.

This assembles a Markdown briefing from three catalogs:

  • data/cpython_bug_shapes.json — recurring CPython C bug SHAPES, each with its guarded twin (the correctly-handled sibling = the fix), a sibling-hunt directive, a confirming differential, and which scanner surfaces it.
  • The cross-cutting triage rules (guarded-twin-is-the-signal, both-crash ≠ acceptable, reachability-first, confirm-don't-relitigate, Class-J out of scope).
  • data/cpython_non_bugs.md — the false-positive taxonomy, reproduced inline.

Read the full file on GitHub · 125 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. 2d ago First seen · 125 lines · 106 tokens per session scan A 78121d6450e2

Subscribe to this mod's changes

informed-explore is a command published in the GitHub repository ReviewToolkits/cpython-review-toolkit (10 stars, last pushed 1mo ago), licensed MIT. It adds 106 tokens to every session and 1,817 once invoked, about $0.0005 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.