Skip to main content
Reference

Goal Command Reference

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

SubcommandParametersDescription
/goal set<description> [--turns <N>]Creates or updates a goal. Automatically switches to the auto Permission Mode once set.
/goal statusNoneDisplays the description, status, Elapsed Turns, and Elapsed Time of the current goal.
/goal clearNoneRemoves the current goal and restores the Permission Mode used before the goal was set.
/goal pauseNonePauses the current goal and restores the Permission Mode.
/goal resumeNoneResumes a paused goal and re-enters the auto Permission Mode.
/goal takeNoneClaims 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. N must be a positive integer; invalid values are ignored. Once the limit is reached, the goal transitions to the TurnLimited state.
Example:
/goal set fix all failing unit tests and commit
/goal set complete login module refactoring --turns 20

Status Fields

Goal status is persisted and includes the following fields:
FieldDescription
objectiveGoal description.
statusStatus: Active / Paused / TurnLimited.
maxTurnsMaximum Turn Limit (optional).
turnsUsedElapsed Turns.
timeUsedSecondsElapsed Time (in seconds).
ownerSessionIdSession ID owning the goal (used for multi-session collaboration).
planWasActiveWhether it was in Plan Mode before the goal was activated (used for restoration).

Key Behaviors

  • Automatic Permission Mode Switching: /goal set and /goal resume automatically switch to the auto Permission Mode and lock Shift+Tab switching while the goal is active; /goal clear and /goal pause restore the previous mode (only if it is still auto).
  • Cross-session persistence: Goals are persisted with the session. If the process is unexpectedly terminated while the goal is Active, it will automatically downgrade to Paused on 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 take to 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 resume will also restore Plan Mode after a process restart.
  • Turn limit: When --turns is set, the goal transitions to TurnLimited after turnsUsed reaches maxTurns.

Next Step