Repository navigation
0.9.0 — Plan-mode safety and a live status indicator
v0.9.0 — Plan-mode safety and a live status indicator
Both features in this release were verified against a live OpenCode 1.18.25 TUI, not unit tests alone.
Plan-mode safety
A goal set while a planning-only agent is active is now recorded but held instead of starting.
Auto-continue already paused when a session switched to Plan mid-goal. This closes the creation path: previously /goal <objective> typed in Plan mode created a live goal and ran the loop before any idle occurred, and the routed command text told the model to start working.
A held goal:
- records
stopReason: plan agent activeand keeps its full budget - sends zero auto-continues
- is announced through a read-only control turn that tells the model not to begin work
Run /goal resume after switching to an executing agent to start it.
The active agent is read from the host's execution context, falling back to the session record. That fallback is what makes the restriction work in practice: OpenCode runs command.execute.before before chat.message/chat.params, so the context is empty for the first command in a session — exactly the case a freshly opened Plan-mode session hits.
New options
| Option | Default | Controls |
|---|---|---|
restrictedAgents |
["plan"] |
Agent names treated as planning-only (case-insensitive). [] releases the restriction. |
allowGoalExecutionFromPlan |
false |
Allow creation and auto-continue while a restricted agent is active. |
The default-on behavior is pinned by the mutation contract.
Scope
The restriction stops the goal loop. It cannot stop a model acting on the single routed command turn, because OpenCode's command.execute.before does not fully intercept command text. A held goal's routed text explicitly instructs the model not to begin work, but a non-compliant model may still act once. Build-mode behavior is unchanged.
Session-title status indicator (opt-in)
Set sessionTitleStatus: true to mirror live goal status into the OpenCode session title, which the TUI renders persistently:
▶ ship the release · 3/10 · 2m · 45k/200k
Status icon, objective, auto-continues used / limit, elapsed, and context tokens / budget. ▶ running, ⏸ paused, ⛔ blocked — blocked outranks paused because it needs you, not just a resume.
- Off by default; it overwrites a user-visible field.
- The original title is captured before the first overwrite and restored by
/goal clear. - An unchanged render skips the API call, so read-only commands cost nothing.
- Refreshes on commands and on idle/compaction/interruption — never on the
message.updatedevents that stream during a turn, keeping API round-trips out of the response path. - Status lines written by a previous process are recognized as the plugin's own, so a restart followed by
/goal clearcannot promote stale goal status to the session's permanent title. - Failures log at debug level and never interrupt the goal loop.
No TUI plugin entrypoint, no @opentui dependencies, no build step.
Compatibility
OpenCode 1.18.25 added to the tested matrix, backed by a real run: the goal command and native goal agent register, session-sharded persistence works, a Plan-mode goal is held with zero auto-continues, and evidence-gated completion closes cleanly with [goal:evidence] + [goal:complete].
The >=1.17.15 <2 engine range already covered it, so no pin change.
OpenCode 2 is documented as unsupported and untested — not known-broken — with a concrete checklist of what a supported claim would require. This plugin is server-only, so its configuration lives entirely in opencode.json on any OpenCode line.
Verification
npm run release:check → exit 0
- 414 tests
- mutation contract 68/68 critical mutants killed
- behavior benchmark score 100
- type contract (NodeNext + Bundler), command hook smoke, packed host contract, packed tool contract (11 tools)
npm audit --omit=dev --audit-level=high→ 0 vulnerabilities
Artifact reproducibility: the local pack, the CI workflow artifact, and the published registry tarball are byte-identical — shasum 1294a0aa1120f669b8e159fa782aee14aa2da47a, 24 files, 479,273 bytes unpacked.
Install
npm install opencode-goal-plugin@0.9.0Full changelog: v0.8.2...v0.9.0