DEV Community

JessYT
JessYT

Posted on • Originally published at jessinvestment.com

Claude Code Stops Pausing Every Turn: /goal, /loop, /batch, /background

Claude Code no longer pauses every turn. /goal, /loop, /batch, /background

The official docs bundled four commands. /goal · /loop · /batch · /background — the default model of waiting for the user every turn just split into four autonomous modes: condition, interval, isolation, and parallel. Here's what changed and when to reach for which.

  • 4 autonomous modes
  • /goal — condition-driven
  • /loop — v2.1.72+, interval-driven
  • /batch — parallel PRs
  • /background — v2.1.139+, isolated session

01 · From "pause every turn" to "autonomous until a condition"

Claude Code used to stop at the end of every turn. You typed "continue" each time. Migrations and other tasks needing N replies couldn't be left unattended. These four commands rewrite that default assumption.

Before — default behavior (turn-by-turn)

  • Waits for user every turn
  • 1 migration = N inputs
  • Long jobs stall the moment you leave

After — autonomous runtime (auto × 4)

  • Condition · interval · isolation · parallel
  • Until the goal is met / on an interval
  • Out-of-session / 5–30 parallel PRs

02 · The four commands at a glance

The docs spell out, per command, how the next turn begins and what stops it. The biggest axes of difference are token cost and operational overhead.

Command Mode Notes
/goal condition Haiku eval, 4000 chars
/loop interval v2.1.72+, 1m–1h
/batch parallel 5–30 PRs, worktree
/background isolation v2.1.139+ agent view

03 · Autonomy comes with a price tag

"Running several sessions or subagents at once multiplies token usage." — official docs

The point: /batch spawns 5–30 background subagents at once, so token spend multiplies. It also requires a git repo — each subagent works in an isolated worktree and then opens a PR. /goal runs a fast evaluation model (Haiku by default) every turn to check the condition, but the docs note that "evaluation tokens are negligible compared to main-turn spend."

/background pauses after 1 hour of inactivity, but its state lives on disk and can be resumed with claude respawn --all. /loop only runs while the session stays open and auto-expires after 7 days.

04 · Which command for which job

Recommended scenarios from the docs:

  1. /goal — Migrate a module until tests pass, implement a design doc until acceptance criteria are met, drain a backlog until the queue is empty — anything with a clear stop condition.
  2. /loop — Poll a deploy, watch a PR for review, check on long builds — anything you want re-run on a cadence. Omit the interval and Claude picks one dynamically between 1 minute and 1 hour.
  3. /batch — Codebase-wide migrations and mechanical refactors like "migrate src/ from Solid to React." Claude auto-splits the work into 5–30 independent units, each producing a PR from its own worktree.
  4. /background — Push long-running work like "run the tests and fix the failures" out of the foreground so you can use the terminal for something else. Monitor progress with the claude agents view.

These four aren't mutually exclusive. You can nest /goal inside /background so a background session keeps running until the condition is met, or use /loop to poll the progress of a /goal periodically.


"The era when pausing every turn was the default is over. Now you pick one of four autonomous modes instead."

This isn't just a feature drop. Claude Code's underlying execution model itself just forked. Map your work onto the right autonomous mode in advance and you're set.

References

Official docs (primary):

Disclosure: Summary based on official docs. No first-hand usage report. No ads or affiliate links.

Canonical: https://jessinvestment.com/claude-code-stops-pausing-every-turn-goal-loop-batch-background/


Original with full infographics and visual structure: https://jessinvestment.com/claude-code-stops-pausing-every-turn-goal-loop-batch-background/

Top comments (0)