Repository navigation
Description
What happened?
Environment
- Plannotator plugin:
@plannotator/opencode@0.27.11(installed 2026-09-02 via@latest) - Host: OpenCode 2,
opencode2 --version→v0.0.0-beta-18866(Linux) - OpenCode 1 (
1.18.25) is also installed on the machine; the affected session ran under OpenCode 2 - Flow:
/plannotator-last→command.execute.beforehook → embedded runtime (handleAnnotateLastCommand)
Summary
Since 0.27.10 (#1434 + #1435), the session URL notice posted into the transcript on OpenCode 2
(Plannotator session ready: <url>) wakes a model turn, even though it is injected with
resume: false. The agent starts reasoning about the notice text itself while the reviewer is
still annotating, and the feedback (delivered with delivery: "queue") then lands queued behind
that spurious turn.
Steps to reproduce
- OpenCode 2 (
v0.0.0-beta-18866) with@plannotator/opencode@0.27.11. - In a session, run
/plannotator-last. The annotation UI opens. - Do not submit anything. Within seconds, the agent starts a model turn on the message
Plannotator session ready: http://localhost:<port>— before the reviewer has clicked
"Send feedback". - Submit feedback: it arrives as a queued message behind the in-flight agent turn.
Reproduced twice in two independent sessions (different ports, 37893 and 32867).
Expected behavior
The notice renders in the transcript but never starts a model turn. That is the plugin's own
contract — native-commands.test.ts pins it:
Regression: without
resume: falseupstream callsexecution.wake(packages/core/src/session/session.ts),
so merely showing a URL would start a model turn the reviewer never asked for and burn tokens
on every command.
— test"the notice never wakes a model turn"
createSessionUrlNotifier (v2-client.ts) does call
synthetic({ sessionID, text, description, resume: false }), so the send side looks correct.
Actual behavior
- The synthetic notice is delivered to the model as a user-role prompt: the assistant received
the literal textPlannotator session ready: http://localhost:32867(byte-for-byte
formatSessionUrlNotice(url)) and began a turn reasoning on it. - The user's submitted feedback (
delivery: "queue", perFEEDBACK_DELIVERY) is then stuck
behind that turn — the whole point of posting the notice silently is defeated.
Analysis
I checked the current v2 branch of anomalyco/opencode:
-
The guard plannotator relies on exists in
packages/core/src/session/session.ts:if (input.resume !== false && !(yield* get(sessionID)).revert) yield* execution.wake(sessionID)
-
SessionInbox.admit() itself does not wake; only the explicit execution.wake calls do.
So on the current v2 source, a resume: false synthetic should be silent. Two hypotheses for
what breaks on beta-18866:
- The beta build predates that guard (I could not map beta-18866 to a public tag/ref to verify).
- The notice leaves delivery at the host default ("steer", per input.delivery ?? "steer" in
synthetic()), and on this beta a steer-pending admission interacts with the execution loop
(e.g. wake-on-idle for steers) independently of the resume guard. Feedback deliberately uses
delivery: "queue"; the notice is the only synthetic that rides the default.
Possible directions
- Plugin-side: pass an explicit non-waking delivery (e.g. "queue") to the notice's
synthetic() call, mirroring what feedback already does — cheap and host-version-proof. - Or feature/host-detect the beta and degrade to the old silent paths.
- Possibly an upstream fix if the wake indeed comes from steer admission on this beta.
Plannotator version
0.27.11
OS
Linux
Agent
Other
Where did it happen?
Annotate
Activity
backnotprop commentedon Sep 2, 2026
Thanks for an unusually well-researched report. Triage results:
One correction to the flow you named: on OpenCode 2 the plugin's command.execute.before hook and handleAnnotateLastCommand never run; that is the OpenCode 1 entry. OpenCode 2 loads the V2 adapter (dist/server.js), where /plannotator-last runs as a native command through the CLI bridge, and the URL notice reaches the transcript through createSessionUrlNotifier in v2-client.ts. The literal text you saw is produced only there, which confirms that path ran. It does pass resume: false, and the pinned test drives that exact chain, so this is not a case of the test pinning one injection site while the bug rides another.
We verified the upstream guard against anomalyco/opencode origin/v2 as of 2026-08-30: the resume check is present, and nothing on that snapshot wakes an idle session after a resume: false synthetic is admitted. Our checkout predates your beta-18866 build, so a change between Aug 30 and the beta cut cannot be ruled out. Your hypothesis 2 matches the mechanics we see: resume: false only skips the immediate wake, and the notice previously sat in the inbox at the host default delivery (steer), where any later wake promotes it first. Something on that beta wakes the idle session; the steer row then becomes its own model turn.
Mitigation is up as #1460: the notice now passes an explicit delivery: "queue", mirroring what feedback already does, pinned in both wake tests. Queue rows never ride steer-scoped promotion, so the notice renders and waits for a genuinely user-initiated turn; no behavior change on hosts where the guard works. It will ship in the next release. If you still reproduce after that, the wake on your beta is input-scoped and the remaining fix is upstream; we plan to file an issue with the OpenCode project either way, since their own resume: false synthetics would burn a turn under the same conditions.
Two things that would help:
Also useful if you have it: any way to map beta-18866 to an upstream commit or build date.
backnotprop commentedon Sep 2, 2026
The mitigation is merged (#1460) and will ship in the next release. After updating, if the spurious turn still reproduces on your beta, reopen this and we will take the remaining half upstream with the evidence from your answers to the two questions above.
Naasha commentedon Sep 3, 2026
Hello,
I update both opencode2 and plannotator to the latest version and the problem is still there.
The only change is that now the behaviour is the following:
Info:
opencode2 v0.0.0-beta-18999
plannotator 0.27.12