← Articles

27 Oct 2026

Make Claude Code keep going until the tests pass

Most people use Claude Code one prompt at a time. You ask, it answers, you read, you ask again. For work with a clear finish line, like “the auth tests pass”, that loop is you doing the waiting.

/goal removes the waiting. You give Claude a condition. After every turn, a separate model checks whether the condition is met. If not, Claude keeps working.

The command

/goal all tests in test/auth pass and lint is clean, or stop after 20 turns

The goal clears itself when the condition is met, when it is judged impossible, or when you hit an error only you can fix.

Write a condition the output can prove

The checker only reads the conversation. It does not run commands. So a good condition has three parts:

  1. A measurable result. “Tests in test/auth pass”, not “the code is good”.
  2. A clear way to check. For example: npm test exits 0.
  3. A constraint. For example: do not edit other test files.

Then add a stop sentence: “or stop after 20 turns”. Without it, a condition that can never be met just burns turns.

The trap

/goal does not change your permission mode. If Claude asks about every command, you are not really hands-off. Use it in Auto mode when you want it to run unattended.

Check status with /goal on its own. Cancel with /goal clear.

Get the cheat sheet

The one-page version is free: /goal cheat sheet. Source: the official /goal docs, verified 26 Oct 2026.

Free cheat sheet

/goal cheat sheet: let Claude Code run until it's actually done

The one-line condition, the three things it needs, and the trap that stops people using it. The article above is the full read. The one-page sheet with copy-paste commands and print-to-PDF comes by email.

See what is inside the sheet →