Set a goal
Run/goal with the objective, the scope, and the check that proves it’s done:
@ mentions you attach to /goal <objective> go with the goal’s first turn.
Set a token budget
To cap how much work a goal can use, ask for a goal with a token budget in chat, in Act or Debug mode:/goal clear first. Only automatic turns count toward a goal’s time, tokens, and budget. Your own turns and Plan mode turns don’t.
Check and control a goal
Stopping a turn while a goal is active pauses the goal. So do rewinding, running
/clear, and reopening the conversation from history. To replace an unfinished goal, run /goal with a new objective and confirm Replace the current goal?.
/goal reports one of these statuses. Read the reason before you resume:
Switching to Plan mode suspends automatic turns, but the goal stays active. To continue, return to Act mode and send a message, or run
/goal resume.
Create a bounded loop
Run/loop to open the designer, then answer its questions. /loop takes no arguments.
- Goal: choose Current objective, Investigate a question, or Monitor a condition, or describe a different outcome and the evidence to watch for.
- Workload: choose what each iteration may do. See the table below.
- Cadence: Every 15 minutes (the default), Every 5 minutes, or Every hour.
- Limit: 10 iterations (recommended), 3 iterations, or 24 iterations.
- Completion: Goal is demonstrated, Answer is complete, or Only I stop it.
- Mode transition, if the workload needs a different mode: Ask before switching, Stay in current mode, or Approve this transition.
- Research worker, for research loops: Current conversation, or a Codebase specialist, Documentation specialist, or Web specialist that runs the iterations in one separate session.
If you choose Stay in current mode, the loop runs with the current mode’s limits, and an Update a plan loop runs as research.
Loops don’t change your approval mode. In Manually approve mode, edits from an Edit software loop still wait for your approval, and the next iteration waits until you answer.
Loops can’t run shell commands, flash hardware, send device commands, start live captures, use GDB, MCP tools, or skills, or start subagents other than the research worker you chose. Use loops for repeated inspection or scoped edits. Use a hardware script for a soak test or a long measurement.
Set an interval and stopping condition
Iterations never overlap. A loop stops at its iteration limit or three days after you create it, whichever comes first. With Goal is demonstrated or Answer is complete, the loop stops early once an iteration shows the required evidence. With Only I stop it, it runs until you stop it or it reaches a limit. For example, to check a known issue for new evidence until you have a supported answer, choose Investigate a question, Research and report, and Answer is complete.Manage an existing loop
A session runs one loop at a time, and the loop runs only while the session stays open. Run/loop again to see the plan with its state, completed iterations, consecutive failures, and next run time. Then choose Pause or Resume, Stop, or Keep current state.
If the session is busy or waiting for your answer when an iteration is due, the loop waits one more interval. The loop pauses when:
- You stop a turn, rewind, or clear the conversation.
- An iteration needs your decision, new permissions, or a change outside the chat.
- Three iterations in a row fail.
- The project, workspace folder, conversation, or mode changes.
- You decline a mode switch. With Ask before switching, the first iteration asks Switch once or Pause loop.
/loop and choose Resume.