Repository navigation
v1.0.0 — the goal loop is out
First public release. A durable, session-scoped goal loop for OpenCode v2, in the public domain.
What you get
/goalcommand surface —set | view | pause | resume | clear | complete | block | historyplustasksubcommands. Safe by default: 10-turn / 100k-token caps unless you pass--turns/--tokensor explicitly--unbounded.- Evidence-gated completion —
goal_completeonly accepts concrete, transcript-grounded evidence (path, number, test result, command output). Weak claims are rejected and the goal stays active. - Model-callable tools —
goal_set(refuses to clobber a live goal),goal_complete,goal_block,goal_clear(only on a transcript-grounded quote of your request — the model can't erase its tracks),goal_add_task/goal_update_task, and read-onlygoal_history. - Event-driven continuation — objective re-injected into every agent-loop call; exactly one continuation per idle boundary; stall suppression when a turn makes no tool call; distinct
budget_limitedoutcome when caps are hit. - Unattended permission sandbox — in-scope file paths auto-allowed, out-of-scope denied with a steer to
goal_block; configured denies are never widened. - Durable history — terminal and superseded goals are archived per session;
/goal historyrenders them newest-first. - Live sidebar widget — three sections: objective, aligned counter grid (
Status/Turns/Tokens/Tasks+ task progress bar), task list. Legible in dark and light themes.
Install (local directory — nothing on npm)
git clone https://github.com/wukrit/opencode2-goals.git ~/Projects/opencode2-goalsThen add { "package": "/Users/you/Projects/opencode2-goals" } to plugins in ~/.config/opencode/opencode.jsonc (and cli.json for the widget), followed by opencode api post /api/location/reload. Full docs in the README.
Known limitations (honest by design)
- Evidence gating is a heuristic, not semantic verification.
- Two loaded locations sharing one project id can race (no atomic claim in plugin storage) — keep locations on distinct projects, single server process.
- Non-path permission prompts (shell/URL) remain manual.
Requires OpenCode 2.x (live-verified on 2.0.16) and a local-directory plugin load. License: The Unlicense (public domain).