A local tool helps Cursor find the real file behind test failures
whatbroke is a free CLI that gives Cursor better evidence when a test suite or fails. Pasting only a can lead Cursor to edit the wrong file because it does not know what changed since the code last worked. The tool wraps an existing command, such as `npx whatbroke run -- npm test`, and records useful failure context when the command crashes.
That context includes the error, a parsed , the code changes since the last passing run, and a ranked list of likely culprit files with plain reasons. The ranking is rule-based, not chosen by an LLM. It connects to Cursor through MCP, so Cursor can ask for suspected files, edit the code, and then run the exact captured command again to check whether the fix worked, failed the same way, or failed differently.
Secrets are removed before data is written to disk, and everything with no account and no telemetry. Node.js and TypeScript are the main targets, with Python and Go also supported. In a benchmark of 35 real regressions, the right file was ranked first about 90% of the time and appeared in the top three every time.
Key points
- whatbroke wraps commands such as test runs and captures failure context when they crash.
- It compares the failure with the last passing version of the code.
- Cursor can use MCP to get likely culprit files and verify the fix by rerunning the same command.
- The ranking does not use an LLM, and the tool without telemetry.
- Across 35 real regressions, the correct file was ranked first about 90% of the time.