Skip to content

Release 0.10.0: plan-guard and title fixes, cost cap, literal flags, agent authority, pinned installs - #70

Merged
willytop8 merged 10 commits into
mainfrom
wr/0.10.0-defects-and-fork-ports
Sep 7, 2026
Merged

Release 0.10.0: plan-guard and title fixes, cost cap, literal flags, agent authority, pinned installs#70
willytop8 merged 10 commits into
mainfrom
wr/0.10.0-defects-and-fork-ports

Conversation

@willytop8

Copy link
Copy Markdown
Owner

Summary

Release 0.10.0: two defects reproduced on live OpenCode 1.18.25/1.18.29, two ported fork contributions, a new agent-authority option, and install docs that explain why an unpinned plugin never updates.

Fixes

  • Plan-mode guard on a session's first command. command.execute.before runs before any chat hook and the SDK Session has no agent, so the 0.9.0 session-record fallback could never learn the agent for a fresh session's first /goal. chat.message (which carries the agent) now re-evaluates the restriction for the goal that command created, holds it, rewrites the turn as a read-only control turn, and blocks tools. Applies when the goal command does not pin an agent; with "agent": "build" OpenCode runs the turn as build (cmd.agent ?? input.agent), documented in the README. Pinned by a new mutation-contract entry.
  • Stale title after completion with sessionTitleStatus: now ✅ <objective> · N turns · elapsed · tokens; /goal clear still restores the original.

Ported (with credit)

  • maxCostUsd / --max-cost cost cap (@NiklasTR).
  • Fenced ``` spans in /goal args are literal text (@NiklasTR).

New

  • agentGoalAuthority: "full" | "status""status" stops agent tools from replacing, editing, or clearing the user's goal (prompted by @felores' fork). Default unchanged.

Docs / chores

Verification

  • npm run release:check exit 0: 429 tests, 69/69 mutants, type/packed/smoke contracts, 0 vulnerabilities.
  • Live canaries against real opencode serve 1.18.25 and 1.18.29 with a deterministic provider: auto-continue → evidence-gated completion, blocker, /goal status, title after completion, and (with an unpinned command agent) a first-turn Plan goal held with the turn rewritten as a control turn. Harness in reports/willytop8__OpenCode-goal-plugin/canary-2026-09-06/ (not part of the package).

🤖 Generated with Claude Code

willytop8 and others added 10 commits September 6, 2026 23:05
…agent

OpenCode runs command.execute.before before any chat hook for the turn and
its Session record has no agent field, so the 0.9.0 session-record fallback
never fired for a goal created by a fresh session's first command: the goal
started live and the routed text told the model to begin work. chat.message
does receive the agent; re-evaluate the planning-only restriction there for
the goal the command started, hold it, and re-route the turn as a read-only
control turn. Reproduced on live OpenCode 1.18.25 and 1.18.29.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…running line

Completion archives the goal, and the title sync returned early with no live
goal, so the last ▶ render stayed on the session until /goal clear. Render
✅ <objective> · N turns · elapsed · tokens for an achieved result the process
already titled; clear still restores the original.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… text

Double-dash tokens inside a ```fence``` are no longer parsed as goal
flags and a fence is never consumed as a flag value, so a command line can be
quoted inside an objective. Ported from NiklasTR's fork.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pause the goal, with the usual wrap-up prompt, once the cumulative API cost
OpenCode reports reaches the cap. Surfaces in /goal status, the continuation
progress budget, the near-limit warning, the compaction summary, and the
goal_set/set_goal tools. Idea and first implementation by NiklasTR.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…iting goals

"status" mode lets tools complete, block, pause, resume, and create a goal
when none is live, but refuses replace/edit/clear so a model cannot rewrite
the user's objective. Default "full" is unchanged. Prompted by felores' fork.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Supersedes dependabot #60 and #69.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
OpenCode resolves an unpinned plugin to @latest once, caches it, and never
re-resolves while the cache directory exists, so users following the old
npm-install instructions stayed on their first-installed version. Pin the
version in the install snippet and examples, document the upgrade path, add
a stale-cache warning to the verify script, document ledgerFilePath, and add
a 1.18.29 compatibility row.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Attach the settle handler before the barriers so an early loser's rejection
is never reported as unhandled, and never wait at a barrier for an acquirer
that has already settled. This was the known-flaky Windows CI test.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
OpenCode runs a command under its configured agent (cmd.agent ?? input.agent),
so with the recommended "agent": "build" the /goal turn executes as build and
a hold can only come from a previously reported planning-only agent.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@willytop8
willytop8 merged commit dfefe47 into main Sep 7, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant