The complete reference for /goal subcommands, parameters, state, and behavior
/goal sets a persistent goal for the current session, letting the Agent keep executing autonomously around it. This page lists all subcommands, parameters, and state behavior. For the usage guide to Goal mode, see Working Toward a Goal.
Running /goal directly (without a subcommand) is equivalent to /goal status, showing the current goal status.
Subcommands
| Subcommand | Parameters | Description |
|---|---|---|
/goal | <description> [--turns <N>] | Create or update a goal; without arguments, shows the current goal status. Does not change the permission mode. |
/goal status | none | Show the current goal's description, status, turns used, and time used. |
/goal clear | none | Remove the current goal. |
/goal pause | none | Pause the current goal. |
/goal resume | none | Resume a paused goal. |
/goal parameters
/goal <description> [--turns <N>]
<description>(optional): a natural-language description of the goal. Omitting it shows the current goal status (equivalent to/goal status).--turns <N>(optional): the maximum number of interaction turns.Nmust be a positive integer; invalid values are ignored. When the limit is reached, the goal pauses automatically and can be continued with/goal resume.
State fields
Goal state is persisted and includes the following fields:
| Field | Description |
|---|---|
id | The goal's unique identifier. |
objective | The goal description. |
status | Status: active / paused / complete. |
maxTurns | The maximum turn limit (optional). |
turnsUsed | Turns used. |
timeUsedSeconds | Time used (seconds). |
createdAt / updatedAt | Creation and last-update timestamps. |
planWasActive | Whether Plan mode was active before the goal was activated (used to restore after resume). |
Key behaviors
- Permission mode is independent: Goal never changes the permission mode; tool approvals during execution follow the current mode. For uninterrupted execution, switch to
autooryolobeforehand. - Cross-session persistence: goals persist with the session. If the process is terminated unexpectedly while a goal is
active, the next launch automatically downgrades it topaused, and it can be reactivated with/goal resume. - Plan state restoration: if Plan mode was active before the goal,
/goal resumealso restores the Plan state after a process restart. - Turn limit: when
turnsUsedreachesmaxTurns, the goal pauses automatically (a built-in default limit applies when--turnsis not set). Resuming with/goal resumegrants a fresh turn budget to continue.
Next steps
- Goal mode usage guide: Working Toward a Goal.
- Permission modes: Permissions and Directory Trust.
- All slash commands: Slash Commands.