persistent objectives with an explicit lifecycle
Standing goals
#/goal <objective> saves the objective and starts work in the terminal or editor. DGC continues an active goal across work cycles on native local/API and delegated subscription routes. Ordinary prompts do not create goals.
In the terminal, an active goal keeps a row directly above the composer: the objective, its status, and the work time counted so far — so what DGC is holding you to, and how long it has been at it, are visible without asking.
In VS Code/Cursor, entering /goal <objective> first saves the tagged goal and then immediately starts that exact objective as an agent turn. Its status, active time, review button, pause/resume button, and edit/delete controls stay above the composer. Editing preserves the goal's identity and accumulated work time. Reopening a saved session pauses its goal; time spent offline is not counted as work.
Picking /goal from the / menu attaches it to the composer as a chip and leaves the cursor after it, so you type the objective and press Enter to send — the same way $skills attach. A command that takes nothing, such as /help, still runs the moment you pick it.
/goalor/goal review— inspect the objective, status, work time, cycles, and evidence./goal pause— stop work and retain the goal for later./goal complete— retain the objective as an auditable completed record./goal blocked— stop automatic progress while an external blocker exists./goal resume— reactivate the goal and continue work immediately./goal clear— remove it.
How long an objective may be
#A standing goal is stated to the model in full once per context — and again after a compaction, which starts a fresh one — while later turns only refer back to it. That keeps the recurring cost of a goal to a few dozen tokens a turn rather than restating the whole objective every time.
Because the full statement has to fit the window it lives in, the limit is a share of your context rather than a fixed number: a quarter of it, leaving three quarters for the work. A 32k context allows about 32,000 characters, a 128k one about 131,000 — raise context_size and the allowance rises with it. If an objective is still too long DGC says so, gives you the text back, and keeps the goal you already had: nothing is truncated and nothing is lost.
Native models use update_goal with a summary and evidence. Delegated models submit a structured closing report that DGC validates and removes from the displayed answer. Completion is applied after the work cycle succeeds; failed or cancelled work cannot complete a goal. Three consecutive cycles without distinct tool progress block the goal for review. Cancellation or a runtime failure pauses it.
Use /goal --tokens 100000 <objective> for an optional token budget, or edit the budget in the goal card. Budgets are checked between native requests or delegated work cycles, so a request or concurrent/subagent work can take usage past the limit. A model route that does not report usage cannot enforce a token budget; DGC pauses instead of continuing with unknown usage. The goal review shows the reported usage and any budget pause. Ending one work cycle or finishing one milestone is not whole-goal completion.
When a turn stops on its own
#A goal is the instruction to keep working without someone watching, so a turn that stops on a recoverable fault does not end the goal. The most common one is the loop guard: a model that calls the same tool with identical arguments six times without using the result is looping, and DGC stops that turn. It then restarts the goal itself, passing the reason forward so the next attempt takes a different step rather than reissuing the call that failed.
Consecutive automatic restarts are capped at two. If changing approach twice does not help, DGC stops and says so, because a third identical failure is a signal for a person to look — usually a more capable model for that step, or a narrower instruction — not a reason to spend the rest of the context window retrying. Any prompt you send resets the budget, and cancelling a turn yourself is never overridden: that decision stands.
Autonomous gate
#On native local/API routes, --autonomous-gate "<cmd>" bounds an autonomous run by a real check command: the agent may not end a turn until that command exits 0. When the model tries to stop and the gate fails, DGC feeds the command's output back and keeps working; when it exits 0, the stop is allowed. Bounded by --autonomous-max-turns (default 30) failed attempts, so a persistently red gate can never loop forever. Unset (the default) leaves turn completion unchanged. e.g. --autonomous-gate "npm run check".
Set it live without restarting: /autonomous-gate "npm run check" in the classic or full-screen TUI (/autonomous-gate off clears it, no argument reports the current gate and retry bound). The gate command and its max-retry bound are also editable in the TUI settings screen (Behaviour). In the VS Code extension, set dgc.autonomousGate and dgc.autonomousMaxTurns in Settings. Delegated subscription turns bypass this native controller gate; selecting a vendor engine does not make the configured command run.