Goal Mode
Goal mode lets ZCode Agent keep working toward one clear objective on its own until it is confirmed done.
For long, complex work, the Agent normally stops after each stretch and waits for you to say "continue". With Goal mode, you state what "done" means with /goal, and the Agent works round after round: at the end of every round it checks whether the goal has been met, starts another round if it hasn't, and only wraps up once it has. All you do is set a goal and wait for the result.
- 01Set a goalWrite one checkable objective with
/goal. - 02Run a roundThe Agent edits files, runs commands, and updates to-dos.
- 03VerifyWhen the round ends, a separate check decides whether the goal is met.
- 04Wrap up when metOnce confirmed, it writes a summary and the task finishes.
Not met yet: the check produces the next step and goes back to step 2 for a new round
How to Use It
1. Write a checkable goal
Goal mode fits work that is easy to state in one sentence but takes many rounds to finish. The more specific and checkable the objective, the more accurate each round's verdict:
| Hard to verify | Better |
|---|---|
| Make it faster | Make pnpm test pass and keep first paint under two seconds |
| Clean up the code | Refactor the whole module and keep the tests passing |
| Fix some type issues | Fix all TypeScript compile errors |
| Speed up the page a bit | Get this page's Lighthouse performance score above 90 |
2. Set it with /goal
Type /goal in the composer followed by a sentence, and that becomes the session's objective. You can also type / and pick goal from the suggestion panel.
A session has one goal at a time. The usual forms:
| Command | What it does |
|---|---|
/goal <objective> | Set the goal; replaces the existing one if there is one |
/goal replace <objective> | Explicitly replace the current goal |
/goal resume | Resume a paused goal |
/targetis an alias of/goal.- If the composer has attachments or references,
/goalis not recognized as a command — remove them first.
3. Follow progress in the summary panel
Once the goal is set, a goal card appears at the top of the summary panel on the right, with the objective and elapsed time. Below it, finished checklist items are grouped by iteration, and the current round's progress and to-dos sit at the bottom. The research task below has been running for twenty rounds:
Each round's title comes from the next action the previous round's verification produced, so reading down the panel shows how the task got to where it is. A checklist item stays in the iteration where it first appeared, even if it is finished several rounds later, so each round's real output is never attributed to the wrong place.
How Each Round Is Verified
When a round ends, ZCode runs a separate check. If the goal isn't met, a divider appears in the conversation and the next round follows automatically — you don't have to ask it to continue:
Only when it is met does the task wrap up with a summary:
Verification looks for real evidence:
- Doesn't count: a plan, a checklist, a lot of elapsed effort, or a reply that merely sounds conclusive.
- Counts: changed files, command output, test results — things that can be checked.
- As long as any to-do is still unfinished, the check will not call the goal complete; it prioritizes finishing that item instead.
Stepping In
You can adjust a goal at any time: to change direction, send /goal again with the new objective; to hold off, click the pause button on the goal card (there is no pause command).
- Pausing loses nothing: completed rounds, tool-call history, and produced files all stay. The button on the card turns into resume; click it or send
/goal resumeto continue. - Stopping also pauses: stopping a running task pauses the goal automatically, so it won't quietly keep consuming quota while you aren't looking.
- It survives closing the session: goal state is stored by the system, so you can pick up where you left off when you reopen the session.
A goal stops advancing on its own in three cases: verification says it's complete; you pause it or stop the task; or it reaches the usage budget configured for that goal.
When a Goal Can't Be Set
A goal can't be set in Plan mode, and the interface tells you why:
- In Plan mode: Plan mode is for agreeing on an approach before anything runs, which conflicts with a goal's automatic continuation — switch to another execution mode first.
- While a task is running:
/goalis not rejected and does not interrupt the current work; it is queued and takes effect after the current task finishes.
Combine With Execution Modes
Goal mode and execution modes cover two different things: the goal defines when the work counts as done, and the execution mode defines how many actions need your confirmation along the way.
For long goal-driven tasks, Full access or Autonomous mode keeps interruptions down and iterations flowing. If the task touches files you care about, Ask before changes works too — it just means staying nearby to approve things.