Repository navigation
Closed as duplicate
Closed as duplicate
Copy link
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Request a native /goal command for opencode with the same semantics as OpenAI Codex and Claude Code, for long-horizon autonomous work.
Reference behavior:
- Codex
/goal(experimental,goals = trueunder[features]):
/goal <objective>sets one durable objective,/goalshows status,/goal pause//goal resume//goal clearcontrols the run.- Stays active across turns for multiple hours until achieved, paused/cleared, blocked, or budget-limited (
pursuing,paused,achieved,unmet,budget-limited). - Intended for code migration, large refactors, prototypes where the contract defines objective, non-goals, validation commands, and stop condition.
- Docs: https://developers.openai.com/codex/use-cases/follow-goals
- Claude Code
/goal(native since v2.1.139):
/goal <condition>//goal//goal clear(aliases:stop, off, reset, none, cancel). One goal per session,◎ /goal activeindicator, restored on--continue/--resume, cleared on/clear.- After each turn a small fast model (Haiku by default) judges the condition against the conversation transcript only (no independent tool calls).
Not yet met-> continue with reason as guidance;Met-> clear + achieved entry;Impossible-> clear + failed entry. - Does not change permission mode; use auto-accept for unattended runs. Works in interactive,
-p, and remote control. - Docs: https://code.claude.com/docs/en/goal , https://code.claude.com/docs/en/commands
Current gap in opencode:
Today a 200-file migration or full test-suite fix requires typing "keep going" every few minutes. Custom slash-command templates cannot do persistence, runtime continuation after turn end, token/time accounting, evaluator loop, or TUI/desktop status sync.
I am aware of #27167 (native session goals, open, 200+ reactions). This request explicitly asks for parity with the Codex/Claude evaluator-loop semantics above, not just goal text storage:
/goal <objective>//goal//goal pause//goal resume//goal clear- session-scoped single active goal with status projection (turns elapsed, tokens spent, last evaluator reason)
- per-turn evaluator using a configurable small/fast model against transcript, with
met / not-yet-met / impossiblehandling - idle continuation in TUI +
opencode runnon-interactive parity, human input always wins,/clearclears goal - optional per-goal token budget + wall-clock cap and
budget-limitedstate (cf. Codextoken_budgetdiscussion) - model-visible goal tools with restricted mutation (complete only after verification), shared server API so TUI/desktop stay in sync
Benefits:
- Removes the human-enter bottleneck for long runs.
- Verifiable "done" contract instead of model claiming done.
- Competitive parity: users coming from Codex / Claude Code expect
/goalto work the same way.
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Sep 15, 2026
This issue might be a duplicate of existing issues. Please check:
/goal— covers the same feature including persistent goal per session,/goalcommand variants (set/status/pause/resume/clear), server API for TUI/desktop sync, token budgets, runtime continuation, and model-visible goal tools with restricted mutation semantics. The scope described there appears to encompass the evaluator-loop semantics requested here as well.If you believe this request adds something meaningfully distinct from #27167, please clarify in a comment there rather than opening a new issue, so discussion stays consolidated.