Repository navigation
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).