进阶 zcode.z.ai 2026-11-25 14:51:22 · 0 阅读

第16章 Goal Mode

Core FeaturesGoal 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 verifyBetterMake it fasterMake pnpm test pass and keep first paint under two secondsClean up the codeRefactor the whole module and keep the tests passingFix some type issuesFix all TypeScript compile errorsSpeed up the page a bitGet 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. 01Enter /goal followed by the objectiveEnter the command, then describe a verifiable objective. A session has one goal at a time. The usual forms: CommandWhat it does/goal Set the goal; replaces the existing one if there is one/goal replace Explicitly replace the current goal/goal resumeResume a paused goal /target is an alias of /goal. If the composer has attachments or references, /goal is 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: 01Goal and elapsed timeView elapsed time and goal controls.02Checklist by iterationEach iteration groups its tasks and completion count.03Current progress and to-dosReview completed work and the next task. 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: 01Iteration verification resultThe divider indicates that the goal has not yet been met.02Next iteration starts automaticallyWork continues in the next iteration after verification. Only when it is met does the task wrap up with a summary: 01Verification passed; goal completedThe completion status is followed by the final 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). 01Resume the goalUse the resume control in the goal card header. 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 resume to 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: 01Switch execution mode before setting a goalIn Plan mode, the interface prompts you to switch modes. 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: /goal is 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. Next Steps ZCode AgentLearn the prompt entry, model picker, and execution modes.Task & File ManagementOrganize your workbench with task groups and the file tree.CommandSave frequently used prompts as reusable commands.

评论 (0)