Repository navigation
fix(agent): /acp must not wake the model under OpenCode V2 - #875
ranxianglei merged 1 commit into
Conversation
OpenCode V2's session.synthetic defaults to delivery="steer" and, unless resume:false, calls execution.wake(sessionID) — every /acp invocation started a model turn on behalf of a status query. Observed live in TUI: the model answered its own injected status panel with an unprompted assistant message. Pass resume:false so rendering stays inert.
0f1cba9
into
2026-09-15_opencode-native-plugin
Review of #875 — verified, LGTM to merge (after #850). Diff (1 commit
Clean and minimal, no unrelated churn. No small issues to fix directly. Why it's correct. Independent preflight on head
Matches your reported preflight exactly. Stacking & CI. Parent of Merge order: #850 first → this → #880, as noted in the body. Nothing for me to change. 中文摘要:修复了 OpenCode V2 下每次 |
PR #878 was merged only into 2026-09-17_opencode-v2-acp-no-wake (tip 40c4970), so the #850 head was missing the panel-visibility fix. This fold makes 2026-09-15_opencode-native-plugin carry the complete /acp stack: register (11a82d7) + harden (f857ff1) + no-wake (d6d60f8, #875) + visible panel (304110a, #878).
Stacked on #850 (base = its head).
Fixes #876.
Every
/acpinvocation passed{sessionID, text}toctx.session.synthetic()and left OpenCode V2's defaults in place: deliverysteerandexecution.wake(sessionID)(coreSession.synthetic, packages/core/src/session/session.ts: resume!==false and !revert -> wake). Net effect: each /acp started a full model turn with no user input - spurious empty turns/loops, extra upstream forwards right after typing /acp.Pass
resume: false. Verified live against an opencode v2.0.4 TUI through bili: same render path, zero model requests after /acp (proxy forward count frozen), whereas before the fix it grew on every invocation.Preflight: typecheck clean; opencode-v2 suite green (assertions extended: the synthetic call must carry resume:false); full npm test green.
Suggested merge order: this first, then the stacked panel-visibility PR.