Let a run prove what’s broken

A coding agent plans the cheapest check for each change, runs your own tests or your app, and reports only what a run showed.

6 min read · Video walkthrough

Before you start

  • Claude Code or Codex installed and signed in. Find Bugs uses whichever the Agent panel uses, with its model, effort and permission mode.
  • A folder you trust the agent to work in. It reads the files, runs commands and may change files, within the mode you pick.
  • For web tests, Google Chrome. For phone tests, a booted iOS simulator or a ready Android device, and Maestro (one click to install).
A hunt over two changes to a cart: the project’s own Python tests run for one, the other is skipped with a reason, and the report opens the failed case with what it expected beside what it got. The agent’s messages are scripted; the tests really ran.

How a hunt works#

The split is deliberate. The agent decides and writes: what to test, which programs must be running, the tests themselves, and what counts as a bug. WTFCode does what it’s asked and keeps the proof: it runs one test at a time, records every run with its output and screenshots, accepts a bug only with the run that shows it, and starts a program only when you click.

Every decision is recorded as it’s made (the plan and each revision, each level and why, each run, each skip and why, each bug), so a hunt can be played back later exactly as it went.

Start a hunt#

  1. Open Find Bugs.

    Use its icon in the left rail, Open Find Bugs in the command palette, or Find bugs in Code Review’s Next steps. From a review, the box arrives filled with every claim on the review page, numbered, and the range’s requirements. Nothing is sent until you send it.

  2. Trust the folder.

    The first time, the hunt column asks “Let coding agents work in this folder?” Choose Trust this folder only for a folder you trust.

  3. Say what to test.

    Under What should I test?, describe it, or press Enter on an empty box to test the changes under review. Type @ to point at the pull request (@pr), your uncommitted changes (@changes), a requirement or a file.

  4. Pick how much the agent may do.

    By default the agent asks before each command. Use Full access for this hunt lets it run without asking, for this hunt only.

The plan: the cheapest check that proves each change#

Before it runs anything, the agent writes a plan: one line per change, each with a level and why. Existing tests that cover the changed files run first, and it goes up a level only when the lower one can’t see the behavior, or you ask.

LevelWhat runs
UnitYour project’s own test framework, on the changed logic.
IntegrationYour project’s own harness across a boundary (a route, the database), or a request to the running backend.
UIA headless browser with Playwright, or a phone or simulator with Maestro, for what only the screen shows.

Unit and integration tests are written in your test folders, in your framework, so they show up in your diff to keep or drop. They run with your project’s own command, read from its files, as a runner in the Run panel with a live log and Stop. Web tests go in .playwright/ and phone flows in .maestro/.

Frameworks read case by case: Vitest, Jest, Gradle and Maven (JUnit), pytest, Deno, Go, Cargo, XCTest and Swift Testing, and Python’s unittest. Any other test command still runs and is judged by its exit code.

Read the report#

The Report tab opens with a sentence from the counts (“1 change is broken.”), a bar of the changes by state, and the figures: changes by level, runs, bugs and time taken. Then each change of the plan with its state.

StateMeans
PlannedIn the plan, not run yet.
WorksIts runs passed.
BrokenA run failed on the app’s behavior.
FlakyIt failed after passing.
BlockedThe setup failed, not the app: the build broke before the tests, nothing answered, a sign-in was missing.
Not checkedThe agent skipped it and says why.

Open a change to see its test, its bugs and each run. For your project’s tests, every failed case shows its message, expected beside actual, and its file:line, which opens the editor. Passed cases fold to their count. The exact command is there to copy. For a browser or device run, its screenshots and Show on the screen.

How it went lists every decision and run from the start. The replay bar above the report plays the hunt back: from the start, step by step, or click a step to see the report as it stood then. Now returns to the present.

Watch it live, and stay in charge#

The Live tab puts each run on the screen as it happens, in a device frame: Chrome, or a booted phone or simulator chosen at its top. Every run the agent makes is headless; you watch it through the screen.

  • Programs start on your click. When a test needs your app running, the agent asks for a runner: a saved one, or one it wrote, with its command shown. Start runs it in the Run panel; Not now tells the agent, which then says what it couldn’t test.
  • You sign in yourself. When a test needs a sign-in no test can make, you sign in in a fresh Chrome window on this Mac that opens at your app’s local address. What’s kept is that browser’s state, owner-only, and it never goes to the page or the model.
  • No test reaches Google. A signed-in test starts from a saved session instead of signing in through a third party every time.

Bugs, fixes and the tests you keep#

A bug is accepted only with a run that ran. Its card shows what was expected, what happened, the screenshot of the run that proves it, the test that reproduces it, and the places in the code where the agent found the cause. When the bug breaks a requirement, the card quotes it under Breaks, and WTFCode checks the quoted words are really there.

When the agent suggests a fix, the card shows it change by change with Apply fix; then Run the test or Undo.

The tests stay under Tests with their last verdict. They’re code, so Run and Run all run them again without the agent. When a test fails because it, not the app, is wrong, Rewrite with AI hands it and the failed run to the agent, which decides whose fault it is: it rewrites a wrong test and reports a bug when the app is wrong. It never bends a test to pass.

Continue a hunt that stopped short#

If the agent was cut off, or ended with changes neither run nor skipped, the report says so (“Ended with 3 changes not checked.”) and offers Continue the hunt. It sends the agent on in the same session with what’s left of the plan.

Use it from any terminal#

The same commands serve an agent you run yourself. Ask Claude Code or Codex in your terminal to run wtfcode find-bugs guide and follow it. With WTFCode open on the same folder, its runs, bugs and runner requests show live in the app.

wtfcode find-bugs changes .          # the range and its changed files
wtfcode find-bugs plan . plan.json   # record the plan
wtfcode find-bugs test . tests/test_cart.py --check pay
wtfcode find-bugs hunt .             # each line of the plan with its state

Troubleshooting#

A change is Blocked, not Broken

The run never reached your app: the build failed before the tests, the app wasn’t answering, or a sign-in was missing. Open the run; its reason is written under its row and in How it went.

Send is greyed out

The folder isn’t trusted yet, no coding agent is installed, or the agent is still working on its last message.

The web test says ChromeDriver is missing

Only Maestro web flows need it. Click Install in the setup notice; Playwright specs drive your installed Chrome without it.

Next steps#

  • Code Review: give the hunt requirements to check first.
  • AI debugger: see the values the program had where a test failed.
  • Privacy and data: see what the agent can reach and what stays on your Mac.

Something unclear or out of date? Tell us; a person on the team reads every note.

Search every guide: features, settings, keys and troubleshooting.

Try