Complete reference for /goal subcommands, arguments, statuses, and behaviors
/goal is used to set a persistent goal for the current session, allowing the Agent to continuously and autonomously execute around it. This page lists all subcommands, parameters, and state behaviors. For a guide on using Goal mode, see Continuously Achieve Goals.
Running /goal directly (without a subcommand) is equivalent to /goal status, which displays the current goal status.
Subcommands
| Subcommand | Parameters | Description |
|---|---|---|
/goal set | <description> [--turns <N>] | Creates or updates a goal. Automatically switches to the auto Permission Mode once set. |
/goal status | None | Displays the description, status, Elapsed Turns, and Elapsed Time of the current goal. |
/goal clear | None | Removes the current goal and restores the Permission Mode used before the goal was set. |
/goal pause | None | Pauses the current goal and restores the Permission Mode. |
/goal resume | None | Resumes a paused goal and re-enters the auto Permission Mode. |
/goal take | None | Claims a goal owned by another session, transferring ownership to the current session. |
set Parameters
/goal set <description> [--turns <N>]
<description>(required): The natural language description of the goal. Omitting the description prompts the usage.--turns <N>(optional): Maximum Interaction Turns.Nmust be a positive integer; invalid values are ignored. Once the limit is reached, the goal transitions to theTurnLimitedstate.
Status Fields
Goal status is persisted and includes the following fields:
| Field | Description |
|---|---|
objective | Goal description. |
status | Status: Active / Paused / TurnLimited. |
maxTurns | Maximum Turn Limit (optional). |
turnsUsed | Elapsed Turns. |
timeUsedSeconds | Elapsed Time (in seconds). |
ownerSessionId | Session ID owning the goal (used for multi-session collaboration). |
planWasActive | Whether it was in Plan Mode before the goal was activated (used for restoration). |
Key Behaviors
- Automatic Permission Mode Switching:
/goal setand/goal resumeautomatically switch to theautoPermission Mode and lock Shift+Tab switching while the goal is active;/goal clearand/goal pauserestore the previous mode (only if it is stillauto). - Cross-session persistence: Goals are persisted with the session. If the process is unexpectedly terminated while the goal is
Active, it will automatically downgrade toPausedon the next startup, and can be reactivated using/goal resume. - Ownership: The goal records the Session ID that owns it. Other sessions must first use
/goal taketo claim the goal before they can update it. This prevents a new window from silently inheriting an unfinished goal from another session. - Plan State Restoration: If the goal was in Plan Mode before activation,
/goal resumewill also restore Plan Mode after a process restart. - Turn limit: When
--turnsis set, the goal transitions toTurnLimitedafterturnsUsedreachesmaxTurns.
Next Step
- Goal mode guide: Continuously Achieve Goals.
- Permission Mode description: Permissions and Directory Trust.
- All slash commands: Slash Command.