description: "The human-facing /goal slash command for users and maintainers choosing, composing, or debugging goal control in UI command planes."
English | 中文
dsh-command-goal gives users the /goal command to create, edit, pause, resume, clear, and inspect the current goal directly in an interactive UI. Commands and their direct output stay in the UI and do not enter model requests. Accepted changes persist, and ordered image or file attachments on a create or edit become one ordinary user message that later goal rounds can read. Use this package in interactive deployments with a command adapter; headless and automation apps without one do not need it.
Use dsh-command-goal in interactive deployments that mount a command adapter — the shipped Web client is the reference. It gives users direct control over the goal lifecycle without a model turn: commands execute in the UI command plane and the adapter renders their results directly.
Every sub-command runs against the current goal of the invoking agent; a bare /goal shows usage when no goal exists.
| Input | Result |
|---|---|
/goal |
Shows the current objective, durable phase, round count and cap, process-local activation, and valid next commands; a blocked goal also shows its policy code and explanation |
/goal <objective> |
Creates and arms a goal, or replaces a completed goal with a fresh identity |
/goal edit <objective> |
Edits the current objective without changing its phase or activation |
/goal pause |
Pauses an active goal and disarms continuation |
/goal resume |
Resumes a stopped goal, or rearms an active goal after session resume or fork, subject to its remaining round cap |
/goal clear |
Clears the current goal while retaining its durable history |
Control words (clear, pause, resume, edit) are recognized only when they occupy the complete input; any other non-empty suffix is an objective, so /goal pause after verification creates that literal objective. edit takes its replacement inline and refuses to replace an unfinished goal directly. Expected domain rejections become stable, direct command errors without exposing branded ids or revisions; unexpected implementation failures still fail dispatch so adapters can report them as command failures.
/goal declares attachment support. Attachments accompany only an objective: after a successful create or edit, the command submits one user followup carrying the admitted image and file blocks in selection order plus the fixed text Reference attachments for the goal objective. Later goal rounds read that ordinary session history; the goal domain stores no attachment state. Every other sub-command, and any refused create or edit, returns a direct error before a domain mutation and leaves the dispatching composer's draft and cards intact.
The command injects the commands registry and the goal service. A custom app mounts their owners plus this plugin; automatic continuation remains an independent choice:
- id: commands
name: '@deepseek-ai/dsh-commands'
- id: goal
name: '@deepseek-ai/dsh-goal'
- id: command-goal
name: '@deepseek-ai/dsh-command-goal'
The shipped dsh base enables the persisted-goal stack and this command. The Web bundle keeps the goal service and driver on the Host, disables the base command producer, and mounts the producer in the standard, code, and cordis agent presets; minimal omits it. The ACP automation app enables the domain and model tools without a command adapter. The standalone sdk-minimal profile omits the complete goal stack so its result API still settles one correlated physical turn.
The command is a thin adapter over the goal domain; read these pages for the state it mutates and the registry it plugs into.
/goal controlThe slash input, mutation, and direct status/error output are absent from model requests. The goal domain records the mutation as goal/change; an enabled same-session driver may expose the resulting state in a later continuation prompt. Presentation text is never logged. When a create or edit carries attachments, the model sees one ordinary user message: the ordered image and file blocks followed by the text Reference attachments for the goal objective. It precedes the next goal round in session history.
Reading status, mutating a goal, or receiving a direct command error adds no model tokens. An enabled same-session driver may add later goal-round prompts. An objective's attachments add one ordinary user message with the normal text, image, and file-handle costs.
Command discovery, mutations, and direct output do not affect the cache. Later continuation prompts follow the driver's ordinary request history.
These limits define when the command is a poor fit or needs special care. They are current package constraints, not a task backlog.
defaultMaxGoalRounds remains deployment config, while a direct human request may ask the model to edit max_goal_rounds through the separately authorized goal tool./goal is the portable observation API; no adapter-specific badges or reconnectable command output are provided.ctx.commands. Ordinary prompts can still authorize model-facing goal tools when those are composed.