Predict the most likely runtime failure in a file
predict_failuresIdentifies the most likely runtime failure in JS/TS code, returning line and reason from an independent model review. Flags only actionable defects, clarifying uncertain or clean results.
Instructions
Combine static analysis with a second-opinion verdict from the signed-in Claude Code, Codex, or GitHub Copilot CLI, returning the most likely runtime failure with a line number and reason. status distinguishes actionable, uncertain, no-finding, and unavailable results. checked lists the bug categories the model reports having considered, so a clean file weighed against the whole catalogue is distinguishable from one where it stopped early; it is a self-report, and an empty list means no coverage was reported. Pass multi: true to get every finding the model can demonstrate, ranked, in a findings array instead of one verdict — experimental, and more findings per call is also more surface for false positives per call. Treat it as a defect only when actionable is true; that applies the measured score >= 0.7 precision gate. This spawns another model and takes 5-15 seconds, so only call it when you specifically want an independent second opinion. If you are yourself reviewing the code, use analyze_file and read the source instead. Reviewing several files? Pass them all as files in one call rather than calling once per file: the verdicts run concurrently, so the batch costs the same and takes about as long as a single file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Absolute path to a .js/.jsx/.ts/.tsx file | |
| files | No | Absolute paths to review in one call, run concurrently. Prefer this over one call per file when checking a change set: the verdicts are independent, so a batch bills the same as the same files one at a time but finishes in roughly the time of the slowest one. Replies carry a `results` array in the order given. Supersedes `file`. | |
| model | No | Model override passed to the CLI | |
| multi | No | Return every finding the model can demonstrate, ranked by score, rather than the single most likely one (default false). Experimental: the precision gate was measured on one-finding replies, so `actionable` is less well characterised here. | |
| logFile | No | Optional log file to fold into the combined score | |
| verbose | No | Include the static metric counts and the full log breakdown (default false) | |
| provider | No | Which CLI to ask (default: whichever is installed) | |
| concurrency | No | Verdicts in flight at once for a batch (default 4). Lower it if the provider starts rate-limiting. | |
| calleeContext | No | Also send bounded imported definitions and referenced type contracts so the model can check dependency behavior (default true). Turning this off reduces input tokens but removes that evidence. |