Skip to content

0.10.0 — Plan-guard and title fixes, cost cap, literal flags, agent authority, pinned installs

Choose a tag to compare

@william-ricchiuti william-ricchiuti released this 07 Sep 04:37
· 69 commits to main since this release
dfefe47

v0.10.0 — Plan-guard and title fixes, cost cap, literal flags, agent authority, pinned installs

Two defects reproduced against live OpenCode 1.18.25 and 1.18.29 are fixed, two contributions from forks are ported with credit, agent tools gain an authority setting, and the install docs now explain why an unpinned plugin never updates.

Fixes

Plan-mode guard fails open on a session's first command

OpenCode runs command.execute.before before any chat hook for the turn, and its Session record carries no agent field, so the 0.9.0 "session record fallback" could never learn the agent for a /goal <objective> sent as a fresh session's first turn. The goal started live and the routed text told the model to start working. Reproduced over the HTTP command API with agent: "plan" (the path opencode run --agent plan uses too).

The routed turn does carry the agent. chat.message now re-evaluates the planning-only restriction for the goal that command created and, when the agent is restricted, holds the goal (plan agent active, budget preserved), rewrites the turn as a read-only control turn, and blocks tools for it. A completion marker on that turn does not complete the held goal. Pinned by a new mutation-contract entry.

Stale ▶ in the session title after completion

With sessionTitleStatus, completion archived the goal and the title sync returned early, leaving the last running line on the session until /goal clear. A completed goal now renders as ✅ ship the release · 3 turns · 2m · 45k; /goal clear still restores your original title.

Ported from forks

  • Cost cap — maxCostUsd plugin option and --max-cost per-goal flag. The goal pauses with the usual wrap-up prompt once the cumulative API cost OpenCode reports reaches the cap (max cost reached ($5.00)). /goal status shows Cost budget: $spent/$cap, the continuation budget carries cost_remaining_usd, the near-limit warning fires within 10% of the cap, and goal_set/set_goal accept maxCostUsd. An unknown provider cost never trips the cap; one response may overshoot. Idea and first implementation by @NiklasTR.
  • Fenced literal flags — a ```fence``` in /goal arguments is objective text verbatim: /goal run ```pytest --maxfail=1``` and fix failures no longer rejects with Unsupported flag: --maxfail. Ported from @NiklasTR.

New option

  • agentGoalAuthority — "full" (default, unchanged) or "status". In "status" mode the agent tools may complete, block, pause, resume, and create a goal when none is live, but goal_set/set_goal refuse to replace an active goal (an agent_authority failure envelope on the canonical tool), update_goal refuses objective changes, and clear_goal refuses to clear — a model can no longer rewrite the objective you gave it. Prompted by @felores's fork.

Install docs: pin your version

OpenCode resolves an unpinned "opencode-goal-plugin" entry to @latest once, installs it under ~/.cache/opencode/packages/opencode-goal-plugin@latest/, and never re-resolves while that directory exists. Anyone who followed the old README is still on whichever version they first installed. The README now pins the version ("opencode-goal-plugin@0.10.0"), documents the upgrade path (bump the pin, or delete the cached directory), mentions opencode plugin <name>@<version>, and npx opencode-goal-plugin warns when the unpinned cache lags the package. npm install was never required and is gone from the instructions.

Also

  • zod 4.4.3 → 4.5.4; CodeQL action v4.37.9.
  • OpenCode 1.18.29 added to the compatibility table from a deterministic-provider canary against a real opencode serve process.
  • ledgerFilePath documented; file:// checkouts noted to need node_modules.

Upgrading

Set "plugin": ["opencode-goal-plugin@0.10.0"] and restart OpenCode. If you had an unpinned entry, also delete ~/.cache/opencode/packages/opencode-goal-plugin* (or run npx opencode-goal-plugin@0.10.0 to see whether a stale copy is cached).