Repository navigation
Releases
v1.5.3
Docs and release tooling only. The shipped src/ and dist/ are unchanged from v1.5.2.
Changed
- On npm.
npx -y opencode-goal-pro-max-complete-plugin installis now the main install command. Thegithub:form still works and is listed as the alternative in the README,docs/install.mdand the installer's help. - Releases publish themselves. Each
v*tag runs the release gate, then publishes the verified tarball to npm through trusted publishing, with provenance. A version npm already has is skipped.
v1.5.2
Contributor-facing release. The shipped src/ and dist/ are byte-identical to v1.5.1, so upgrading changes nothing at runtime.
Changed
- Bun 1.3.14 is the development runtime. Tests, coverage, the mutation contract, smokes, benchmarks,
verify,checkandbundlerun under Bun. Install withbun install --frozen-lockfile;bun.lockreplacespackage-lock.json. - The
npxinstaller stays on Node. CI keeps aNode installer (npx path)job on Node 18, theenginesfloor. The Node 18/20/22/24 unit-test matrix is gone. - Mutation contract: a mutant only counts as killed when a test really fails, and each run stops at the first failure. One old mutant never compiled; it now does, and is killed.
- Audit:
bun audit --prod --audit-level=highreplacesnpm audit. - Windows is not supported. The Windows CI job is gone and the docs say so.
Full details in CHANGELOG.md.
v1.5.1
Use this instead of v1.5.0. The v1.5.0 bundles were built from a stale install, so dist/ carried zod 4.4.3 instead of the lockfile's 4.6.7. That undid the 1.4.1 security update (GHSA-mrhx-c7xc-m3w5, high).
Rebuilt from a clean npm ci with the pinned Bun 1.3.14. No other change. See the v1.5.0 notes for forced compaction, the feature these releases add.
v1.5.0
Use v1.5.1 instead. This build carried
zod4.4.3, undoing the 1.4.1 security update.
Goal sessions now compact themselves. OpenCode never auto-compacts a model that reports limit.context: 0, so a long goal on such a model kept growing (638,078 tokens in the case that prompted this).
Added: forced compaction, on by default at 200,000 tokens
--compact-at <n>andcompactAtTokensset the threshold;0turns it off. It applies on every model, so a 1M-window model also compacts at 200k unless you raise it.- Checked after every finished step, so one long turn is caught mid-turn. The idle check is the backstop.
- Never two compactions for one crossing. On a model with a real
limit.context, the host's own check gets one step first. - A failed compaction does not block the goal: the plugin deletes the failed compaction message, because the host would otherwise re-run it on later prompts.
- Bounded: 3 failed requests stop forcing until the next compaction, and forcing is held when two compactions in a row leave the context over the threshold.
- Goal sessions only. Forcing never pauses or stops a goal.
Added: npm run smoke:forced-compaction, which runs the feature against a real OpenCode host with a mock model.
Checked against OpenCode 1.19.0 (running) and the v1.19.5 source. Full details in CHANGELOG.md and docs/reference.md.
v1.4.1
- Fixed: context fullness no longer stops a goal or tells it to wrap up. On 1.4.0 a goal with 7.2M of 100M tokens spent and 18m of 8h elapsed paused with "budget wrap-up requested" because peak context reached 80% of the model's 128,000-token window. OpenCode compacts the session on its own when context fills, so context is not a budget. The
context window reachedstop, the context branch of the 80% wrap-up, the "context token(s) remaining" warning and thecontext_remainingline in the continuation prompt are gone. Token spend (maxTokens) and the clock (maxDurationMs) keep both their 80% wrap-up and their hard stop.- A wrap-up names its budget. The stop reason is
token budget wrap-up requestedortime budget wrap-up requested, and the prompt opens "Token budget limit near" or "Time budget limit near". - Status and panel show current context.
/goal statusand the sidebar show the latest message's context, which drops on compaction, instead of a lifetime high-water mark. The status label isContext:and says where the window size came from:configured (--context-window)orauto (host catalog: <provider>/<model>). - The auto-detected window prefers
limit.inputwhen the model reports one, as OpenCode's own overflow check does (checked against OpenCode v1.19.4session/overflow.ts). contextWindowTokensand--context-windoware display only. Still accepted; they no longer stop or nudge anything.
- A wrap-up names its budget. The stop reason is
- Security: bundled
zodupdated from 4.4.3 to 4.6.7 (GHSA-mrhx-c7xc-m3w5, high).
v1.4.0
- Changed: a goal stops only when you stop it, when it finishes, when a budget runs out, or when the model is genuinely hard-blocked. Every other automatic stop now records what happened and keeps going.
docs/reference.mdhas a single "When a goal stops" section.- Compaction is not a human. OpenCode writes a user-role message for each compaction (a
compactionpart, then a synthetic "Continue if you have next steps" text). The plugin counted those as human turns, so withnoInterruptOnUserMessage: false(the default before 1.2.0) every compaction paused the goal with "user intervention".isHostSyntheticUserMessagenow excludes them. - Your messages steer, never pause.
noInterruptOnUserMessageis deprecated: accepted, ignored, always on. No more "Stopped: user intervention". - Turn-ending host events end the turn, not the goal. Permission rejections, aborted turns (Escape), provider errors and attachment-resolution errors are recorded and the goal continues after the cooldown. Repeated provider errors back off 5 s, 10 s, 20 s … up to 5 minutes.
- Loop brakes nudge instead of stopping. Stalled compactions (no longer aborting the session), low-progress turns and tool-free turns add a "Stalled:" re-plan instruction to the next continuation, and the cooldown backs off exponentially (
minDelayMs × 2^strikes, up to 64×). Format-validation and auto-continue failures keep retrying with backoff. - New option
promptRetryWakeMs(default5000). A failed auto-continue prompt starts no turn, so no idle follows it; the plugin now retries on its own after this delay (or the backed-off cooldown, if longer). - A rejected completion audit keeps the goal active and sends the auditor's reason with the next continuation.
- Planning-only agents defer, not stop. Under Plan the goal's clock freezes; it resumes under the next executing agent, with that agent's context.
- Restart keeps a running goal running. A goal that was active before a plugin restart continues at the next idle; downtime does not count against its duration budget. A newer pause or halt in the lifecycle ledger still wins over a stale snapshot, and a goal rebuilt from the ledger alone still loads paused.
- Compaction is not a human. OpenCode writes a user-role message for each compaction (a
- New:
/goal halt, the user's stop (an alias of/goal pause, resumable with/goal resume)./goal statussuggests halt/resume/clear while a goal runs. - Removed: the
goal_pausetool (13 tools now).update_goaland the canonical update path refusestatus: "paused"withpause_user_only. Pausing is user-only. - Changed: blocking is deterred.
goal_blockand[goal:blocked]still work with a concrete blocker, but every prompt surface, tool description, the shipped skill and the docs now say that blocking stops the whole goal and is only for input that only you can give; a mid-goal message from you is steering, not a reason to block. - Unchanged: budget ceilings,
/goal pauseand/goal clear, completion, queued/backgrounded goals, and the two-process persistence fences (terminal persistence failed,continuation claim persistence failed).
v1.3.0
- Fixed: "Goal plugin is locked by another opencode process" no longer pins a session to whichever process touched it first. Before this release, a process took a session's lease the first time any hook saw that session, even an ordinary chat message with no goal, and kept it until the process exited. A second OpenCode process opening the same session was passive for good. Now a process holds a session's lease only while it is driving it. That means an active or queued goal, a
/goalturn, a continuation, a prompt, a session load, or a hook or tool call still running for it. After the session has been idle foridleLeaseReleaseMs(new option, default3000;0restores the old keep-until-exit behaviour), the owner persists, drops its in-memory copy, and releases the lease. Paused, stopped, and finished goals do not hold it. Goals in different sessions already ran concurrently, one shard per session. Two processes can now also hand a single session back and forth. A session with a running goal stays exclusive to its owner, and forking (opencode --continue --fork) remains the way to run two goals at once from one conversation.- New: lease heartbeat and stale reclaim. Each claim records
heartbeatMsand its mtime is refreshed everyleaseHeartbeatMs(default15000). A heartbeating claim older thanmax(leaseStaleAfterMs, 4 × heartbeat)(leaseStaleAfterMsdefaults to120000) is reclaimable whatever its pid or host. A crashed process, a reused pid, or a claim left by another machine on a shared filesystem no longer pins the session. Claims from older releases, which carry noheartbeatMs, keep the earlier pid/host rule, and also become reclaimable after 24 hours when they come from another host. The claim layout and protocol (claims-v2) are unchanged, so 1.2.x and 1.3.0 processes interoperate. A 1.2.x owner still never releases early, though. - New: writes are fenced after a lost lease. Before each persist, ledger append, and goal-driving prompt, the owner checks that its claim is still there. If it was reclaimed or removed, the process stops touching that session, logs a warning, and unloads it, so two processes never write one shard. Behaviour change: a host that sleeps for longer than the stale window (about 2 minutes by default) can wake to find another process has taken over its session. It then stands down instead of writing.
- Changed: the passive-mode message says what to do. It now explains that an idle owner releases the session within a few seconds, so you should retry, and that
opencode --continue --forkis the way to work in parallel. - New:
npm run smoke:multi-process. It runs two realopencode serveprocesses on one project. It asserts that goals in distinct sessions run at once, that a session left idle by process A is taken over by process B, and that a session with a running goal stays with its owner. Like thesmoke:todo-*rungs, it needs theopencodebinary and is not part ofrelease:check. Against 1.2.0 the takeover arm fails, and against 1.3.0 all three arms pass. - Types and docs.
index.d.tsadds the three options toGoalPluginOptions.docs/reference.md(state and persistence, options table, troubleshooting) anddocs/compatibility.mddescribe idle release, the heartbeat and stale rule, and the sleep caveat.
- New: lease heartbeat and stale reclaim. Each claim records
Install: opencode-goal-pro-max-complete-plugin@github:sblattj/opencode-goal-pro-max-complete-plugin#v1.3.0 (see docs/reference.md).
v1.2.0
- Changed: a human message no longer stops a running goal.
noInterruptOnUserMessagenow defaults totrue. When you type a message while a goal is running, the goal keeps going: OpenCode answers your message, and the next auto-continue picks up with it as the latest instruction. Before this change the goal paused withstopReason: "user intervention"and waited for/goal resume./goal pauseand/goal stopare now how you halt a goal. To get the old behavior back, setnoInterruptOnUserMessage: false. An explicitfalseis the only value that turns pausing back on, so a non-boolean such as"yes"now also counts astrue. Theindex.d.tsJSDoc,docs/reference.md, and the shipped skill describe the new default.
Install: opencode-goal-pro-max-complete-plugin@github:sblattj/opencode-goal-pro-max-complete-plugin#v1.2.0 (see docs/reference.md).
v1.1.0
- New: OpenCode 2 hosts are supported, alongside OpenCode 1. The package's default export is now the dual-method object
{ id, server, setup }. OpenCode 1.x keeps callingserver(input, options)exactly as in every earlier release, and OpenCode 2.x calls the newsetup(context)entrypoint, which rebuilds the same plugin — the goal tools, the event-driven continuation engine, persistence and leases, and the sidebar status — on the v2 host API and returns the dispose finalizer the v2 host awaits at shutdown. Both hosts load the same bundled module through the same package exports (.and./server; both host generations resolve./server), the hosts self-select by which method they call, and an install upgraded from 1.0.1 needs no config change and keeps its goals, persisted state and wire identifiers. The v1 hook surface, the 14 tools, the/goalcommand semantics on v1 hosts, the persisted-state format, and themetadata.goalpayload (v: 3) are all unchanged.engines.opencodewidens from>=1.17.15 <2to>=1.17.15 <3: OpenCode 1.x enforces the field at load time, while OpenCode 2 ignores it (verified live), so the widened bound gates 1.x loads and documents the supported span rather than restricting 2.x.- What OpenCode 2 does not provide, and how the plugin fails soft. v2 has no equivalent for a handful of host surfaces, and every affected call site is individually guarded, so each gap degrades that one surface and nothing else — none of them fails the plugin or interrupts a running goal. No
command.execute.beforeequivalent: v2 has no pre-execution command interception and no noReply-style suppression of the command turn's assistant echo. A typed/goal …still reaches the plugin as prompt text — the v2 adapter re-runs the v1 command handler for its state side effects (set, pause, resume, stop, clear, ledger, persistence) inside the prompt hook, on by default and disableable with the v2-sidev2CommandTextBridgeplugin option — but the deterministic framed reply cannot be injected into the turn, so thegoal_*agent tools remain the surface whose result reaches the model verbatim, with an exact tool equivalent for every state change/goalperforms. No TUI toast orapp.logroutes: the lifecycle and audit advisories that route throughclient.tui.showToastandclient.app.logfail soft (the dispatch is advisory and swallows the failure), and notices still reach the user through the session title and tool results. Nosession.todo,session.children,session.statusorconfig.providersroutes: the<existing_todos>offer is skipped,noContinueWhileChildrenActivefails open (continuation proceeds when the host cannot report children), and the auto-detected context-window ceiling stays off unlesscontextWindowTokensis configured explicitly. The full caveat list, and what "supported" is verified against, is indocs/compatibility.md, rewritten this release from "not supported, and not yet tested" to supported-with-caveats. - The published type declarations carry the new entrypoint.
index.d.ts's default export gains the optionalsetup?: (context: unknown) => Promise<() => Promise<void>>besideserver, with the v2 context kept loose (unknown) like the hook payloads;GoalPluginHooks,GoalPluginOptions, and both payload-schema version strings (GoalSidebarStatus.v,GOAL_PANEL_PAYLOAD_VERSION) are unchanged.npm run type:check's consumer fixture andnpm run smoke:packed-hostnow require all three export keys —id,serverand a callablesetup— so a build that drops the v2 entrypoint fails the gate instead of a v2 host. - Docs follow the widened claim.
README.mdand thedocs/reference.mdcompatibility table now state>=1.17.15 <3with the 1.x-and-2.x span;docs/providers.mdmarks its matrix as 1.x evidence records and points 2.x rows at the compatibility policy; the install specs throughoutdocs/reference.mdandexamples/pinv1.1.0. The five-step "what a supported v2 claim would require" checklist indocs/compatibility.mdis retired — its conditions are the release's own bar now.
- What OpenCode 2 does not provide, and how the plugin fails soft. v2 has no equivalent for a handful of host surfaces, and every affected call site is individually guarded, so each gap degrades that one surface and nothing else — none of them fails the plugin or interrupts a running goal. No
Install: opencode-goal-pro-max-complete-plugin@github:sblattj/opencode-goal-pro-max-complete-plugin#v1.1.0 (see docs/reference.md).
v1.0.1
- New: the session's native Todo list is drawn from the goal plan. While a plan exists the plugin rewrites the arguments of the model's own
todowritecall intool.execute.before, so the host performs exactly one write and the checklist every client renders is the plan: one row per action in plan order, contenta3 · rebuild dist(the action id,·, and the title bounded to 120 characters), and a plan past 20 actions ending in one counted+N more actions — /goal statusrow. The status map exists to stop the native[✓]asserting something the plugin's own evidence gate refuses — adoneaction becomescompletedonly once it is verified, adoneaction without a passing verdict mirrors asin_progresswith— needs claim/evidence/verdict, and ablockedaction mirrors asin_progresswith— BLOCKED: <reason>, which is what the host's own todo contract asks for. Rows the model wrote itself are kept, below the plan rows, at most 10 of them and each bounded to 120 characters; nothing of the model's is silently deleted, and the tool result names how many were kept and how many the cap trimmed.todowrite({todos: []})is the refresh idiom and it is a redraw, never a delete: with a live plan it re-emits the projection and leaves the kept rows alone, with no live plan it re-emits the last mirrored rows or the terminal snapshot taken when the goal ended, and only in a session that never mirrored anything does an empty call reach the host as an empty list. A stale mirror is nudged at most three times per goal run —Todo panel is stale — call todowrite({todos: []}) once; the plan is copied into it for you.— shared across the auto-continue block andgoal_action_update's result, and/goal resumerefunds the budget in full./goal stop,/goal clearand a genuine completion each hand the list back in one line, because the mirror is one-way and the rows outlive the goal.- New option
mirrorTodos:"plan"(default) or"off"."off"restores 1.0.0 exactly: all threetodowritehooks return before touching anything, every prompt surface that mentions the mirror is silent, andgoal_plan_set's,goal_action_update's andtodowrite's descriptions are the stock bytes — the<existing_todos>offer below is skipped along with the host read that produces it, so an"off"instance makes nosession.todocall at all. The option is static and instance-wide by construction, so it cannot introduce cross-session skew. - There is no "adopt" mode. A session that already has native todo rows when
/goal setruns gets them described back to the model once, in an<existing_todos>block on the goal's first continuation, with the instruction to either record them as the plan throughgoal_plan_set— rewritten as falsifiable claims — or ignore them. The read is best-effort and read-only: nothing is adopted,goal.mirror.extrastarts empty, and a failing or absent host call is logged and skipped rather than blocking/goal set. - The Goal panel becomes an exception list while the mirror is on, because the Todo section is already showing the plan: unverified
doneactions first, thenblocked, thenin_progress, each group in plan order, andpendingactions are not repeated. Adoneaction without a verdict gains the same— needs claim/evidence/verdictsuffix on its panel line that its mirrored row carries, and the progress line gains· todo mirror fresh (5),· todo list stale, or· mirror drift (7≠5)when the panel's own live read of the host's list disagrees with the payload. Under the exception list+N morecounts only the exception rows the 12-row cap dropped, over the published actions rather than the whole plan, so a server-capped plan cannot promise rows the payload does not carry. A payload with noplan.mirror, or one whose state isoff, renders exactly as it did in 1.0.0. metadata.goalpayload is nowv: 3, adding two keys:plan.mirrorandplan.actions[].verified.plan.mirrorcarriesstate("fresh","stale"or"off"),rowsandextra(how many rows the last mirrored write held and how many of those were the model's own), andat(when that write landed,0for never).verifiedis the server's own CEV verdict on each published action —doneand a claim and evidence andverdict: "pass"— and it exists because a consumer cannot re-derive it:claimandevidenceare goal-private prose that never go on the wire, andgoal_plan_setaccepts adoneaction with a passing verdict and no ledger (onlygoal_action_updateenforces the gate), sostatusplusverdictrenders exactly that action as finished. The Goal panel now reads the flag rather than inferring it, which is what puts such an action back in the exception list with its— needs claim/evidence/verdictsuffix, agreeing with the mirrored todo row and the progress count that already named it unverified. Every v2 key is still written and both keys are purely additive. Skew warning, unchanged in shape from the v1→v2 one: the two halves are registered separately (opencode.jsonandtui.json), and the panel never readsvat all, so a 0.11.0 panel against a v3 payload simply lists every action and shows no mirror suffix, and the current panel against a v2 payload does the same. Upgrade both halves together.- Two new hooks:
tool.execute.afterandtool.definition. The freshness stamp lives in the after hook because only that hook proves the host actually wrote the list — between the two hooks the host decodes the arguments and asks for permission, and either can abort the call, so a mirror stamped fresh for a write that never landed would suppress the very nudge that repairs it.tool.definitionappends a static paragraph to the builtintodowritedescription telling the model what the tool now does in a goal-bearing session; it is never gated on goal state, because the hook carries no session id.scripts/verify.mjsrequires both, so the hook surface it checks is now eleven names. A host that does not knowtool.definitionsimply never fires it. - The
todowritedescription suffix is stamped at most once per object. Thetool.definitionhook returns early when the description it was handed already carries the mirror paragraph, so a host that re-triggers the hook against the same output object — or a second registration of this plugin in one directory — cannot double it. OpenCode 1.18.29 rebuilds the description object on everyToolRegistry.tools()call, so this is defensive rather than a fix for an observed host; it is pinned by a unit that stamps one object twice and by a mutation anchor that deletes the guard. - Seven hazards are documented rather than fixed, in
docs/compatibility.md: the suffixedtodowritedescription reaching goal-less sessions in the same project,todowrite: "ask"turning every refresh into a permission modal, hosts wheretodowriteis denied (the mirror never becomes fresh, so the panel reads stale for the whole run and the nudge self-suppresses), another plugin'stool.execute.beforeoverwriting the mirror with no way to detect it, the host's second and hooklesstodowriteimplementation,/undonot rewinding todos, and one deliberate departure from the host's one-in_progressconvention. The same document records the transcript bubbles — which the mirror reaches through theargsrewrite rather than through a plugin slot, so on 1.18.29 they show the mirrored rows andnpm run smoke:todo-safetyre-measures that every run — and thatpriorityis wire-only in the TUI. - The published type declarations carry the whole surface.
index.d.ts:GoalSidebarStatus.vbecomes3,plan.mirror({ state: "fresh" | "stale" | "off"; rows; extra; at }) andverified: booleanon every published action joinGoalSidebarStatus,mirrorTodosjoinsGoalPluginOptions, andtool.execute.afterandtool.definitionjoinGoalPluginHooks.tui.d.ts:GoalPanelModelgains an optionalmirror(state,rows,extra,liveTodoCount,drift), andgoalPanelModelgains a second parameter —goalPanelModel(raw, options?: { liveTodoCount?: number }). That parameter is optional, so a 1.0.0 call site that passes only the payload still typechecks and simply renders no drift comparison. Reading a payload is likewise unchanged; only code that constructs aGoalSidebarStatusliteral has to grow the three new required fields, since that type describes what the server writes. One deliberate asymmetry between the two files: the panel'smirror.stateis declaredstringrather than the server's three-value union, because the panel forwards whatever state the payload carried — a newer server can invent one — and it stands the progress suffix and the drift comparison down for a state it does not recognise, while still treating the mirror as active. Both files are typechecked as a consumer sees them, under NodeNext and Bundler resolution, bynpm run type:check. - The packed type contract exercises the 1.0.1 surface, not just the 1.0.0 one. The
npm run type:checkfixture now setsmirrorTodos: "plan"in itssatisfies GoalPluginOptionsobject with a@ts-expect-errornegative case for an invalid value, callstool.execute.afterandtool.definitionbesidetool.execute.before, readsplan.mirror.stateandplan.mirror.rowsoff aGoalSidebarStatus, and callsgoalPanelModelboth with and without its new options argument — so a declaration that stops compiling for a consumer fails the gate instead of waiting for the next reader.
- New option
- New: two real-host smokes and a benchmark for the mirror.
npm run smoke:todo-mirrorboots a realopencode serveagainst a mock model and asserts the plan is redrawn over a divergent list, with two controls — the same run undermirrorTodos: "off", and a session wi...