Cmd. /goal
Set, inspect, pause, resume, or clear a persistent long-running task goal.
Key takeaways
- Set, inspect, pause, resume, or clear a persistent long-running task goal.
- Check the input surface and availability before using the examples below.
Purpose
Set, inspect, pause, resume, or clear a persistent long-running task goal.
/goalAvailability
| Field | Value |
|---|---|
| Input surface | Running CLI prompt |
| Kind | Built-in |
| Status | Current reference |
| Aliases | — |
| Documented minimum | Not specified |
| Reviewed against | 2026-09-22 · Codex CLI 0.155.1 |
features.goals is currently stable and enabled by default; user or organization configuration can disable it.
Examples
/goal Finish the migration and keep the tests green
/goal/goal edit
/goal pause
/goal resume
/goal clearWhen to use it
- Use
/goal Finish the migration and keep tests greento state both outcome and verification. - Run
/goalafter resuming a long task to confirm the objective still matches. - Use
/goal clearwhen the scope changes.
Choosing related commands
| Command | Difference | Choose It When |
|---|---|---|
/goal | Persists an objective | Work spans many turns or interruptions |
/plan | Produces an implementation plan | You need steps before starting |
/status | Shows session state | You need policy, model, or token state |
Effects and persistence
Attaches an objective to the thread across turns. Update or clear it when the task scope changes.
/goal attaches a persistent objective to the active thread. The features.goals setting is stable and enabled by default; enabling an experimental toggle is no longer a prerequisite.
Cautions
Objective text must be non-empty and at most 4,000 characters. Reference a file for longer instructions. On v0.151.0+, nested-subagent token usage also counts toward the root goal budget.
- Check whether user or organization configuration has disabled goals.
- A goal should describe outcome and stopping criteria, not every execution step.
Official sources
Complete command list · Verification scope · History for this command