scan_project
Find your starting point.
Scan the project for risk signals. See which files have the most going on, before spending a model call.
Find likely runtime failures in JavaScript and TypeScript. Give your coding agent the context to see what it missed.
Six MCP tools. The model CLI you already use.
const onHand = await getStock(sku); if (onHand < qty) { return {ok: false, remaining: onHand};} await recordReservation(orderId, sku, qty); await setStock(sku, onHand - qty); return {ok: true, remaining: onHand - qty};Concurrent calls read the same quantity.
The last write wins.
race_conditionscore 0.82Fits the way
you already build.
THE WORKFLOW
From the first signal to the second opinion.
Follow one real bug through the tool.
scan_project
Scan the project for risk signals. See which files have the most going on, before spending a model call.
map_dependencies
Follow the imports. See who calls a file and which tests connect to it, so a local change gets a wider review.
predict_failures
An independent model checks the code. Here, two concurrent reservations can read the same stock and overwrite each other.
predict_failures
Move the stock check and decrement before the await. Re-check the file, then test the behavior across the feature.
01 / 04 SCROLL TO CONTINUE
Skip to the filmauditLog.ts3 async boundaries · 1 branch0.58reserveStock.ts3 async boundaries · 1 branch0.51stockStore.ts1 async boundary · 1 branch0.35formatMoney.tscyclomatic complexity 10.05priceCart.tscyclomatic complexity 10.025 source files scanned · no model call
Risk density helps prioritize reading. It is not a probability that a file contains a bug.
reserveStock.tsimports at line 1stockStore.tsselected file5 files indexed · 0 unresolved imports
const onHand = await getStock(sku); if (onHand < qty) { return {ok: false, remaining: onHand};} await recordReservation(orderId, sku, qty); await setStock(sku, onHand - qty);Concurrent reservations can overwrite the same stock value.
onHand is read at line 18 before two awaits; concurrent reserveStock calls for the same sku both read the same onHand and setStock(sku, onHand-qty) overwrites each other, letting stock oversell despite the negative-stock guard.
Confidence score from this recorded prediction, not a measured accuracy rate.
− const onHand = await getStock(sku);
− await setStock(sku, onHand - qty);
+ const remaining = tryReserve(sku, qty);
// Check and decrement before the await.
Key lines from the fix. The full demo also handles insufficient stock and adds tryReserve to stockStore.ts.
Recorded re-check · pattern: none
tryReserve and stock update are synchronous and atomic before the await, so no race window exists between check and reservation; audit log failure would just propagate as a rejected promise.
A clean file verdict does not prove the whole feature is correct.
Actual v0.8.1 output · Claude provider · September 2026
Read the tool reference
SEE IT IN PRACTICE
A real project scan. A real race condition.
Watch the tool follow the evidence.
The film includes historical development-benchmark results. They are not a guarantee of accuracy on other codebases. Read the results and limits ↗
A SMALL, FOCUSED TOOLKIT
Local analysis narrows the search.
An independent model gives you another view.
scan_projectRank source files by risk density. Start with the code that deserves a closer read.
analyze_fileInspect complexity, async boundaries, and the signals behind a file’s risk score.
map_dependenciesTrace imports, reverse imports, and connected tests back to their source lines.
predict_failuresAsk an independent model for likely runtime failures, with a line number and a reason.
analyze_logsSurface unusual log entries, ranked by severity and unusual wording. Requires Python 3.
list_providersSee which supported CLIs are installed and check their sign-in status.
YOUR NEXT REVIEW
Add the MCP server. Restart your agent.
Ask it where your code might fail.
claude mcp add --scope project predictive-debugger -- npx -y predictive-debugger@latestAdds the server to this project. Use --scope user for every project.
codex mcp add predictive-debugger -- npx -y predictive-debugger@latestAdds the server for your user. See the setup guide for project-only configuration.
copilot mcp add predictive-debugger -- npx -y predictive-debugger@latestAdds the server for your user. See the setup guide for project-only configuration.
“Use Predictive Debugger to find the riskiest files in src/.”
Node.js 22+ · A supported CLI, installed and signed in.
Prediction calls use your CLI’s model access and allowance.
A FEW DETAILS
Static analysis, dependency maps, and log analysis run locally. Predictions send source and bounded dependency context to your CLI’s model provider. Credentials stay with your CLI. See the security model.
No. Predictions use the Claude Code, Codex, or GitHub Copilot CLI you are already signed in to, including its usage allowance.
JavaScript and TypeScript, including JSX, TSX, and decorators. Vue and Svelte single-file components are not supported. Files over 4 MB are rejected, and large predictions may cover selected declarations. See the tool reference.
No. Risk scores and predictions can be wrong. A clean verdict on one file does not prove a feature works. Use the findings to guide your review, then verify behavior with tests and the surrounding code.
There is an experimental extension that can show findings in the Problems panel. It currently requires a local build and is not on the Marketplace. Try the VS Code preview.