You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two TUIs/CLIs on one project can both ensureRunning the same session (per-process maps only). Loops then take turns answering one user message — dozens of finish: "stop" replies.
Evidence
Tip d970983c0bca86d840ac036e2403fe91bc398e69 (base dev):
Leaf: cross-process EffectFlock (tryAcquire / Held.verify / holder) wrapping SessionRunState.ensureRunning / startShell; runLoop checks owns(sessionID) each iteration; waiting opencode run can render the other process's assistant reply
Author: dual-graph + real opencode run process tests; mutation-killed lock/owns/dedupe
Evidence class: SOURCE here. Live cross-process suite on tip: UNKNOWN (not executed in this pass)
Invariant: one session loop owner across processes; waiters cancel cleanly; lock loss stops before the next provider turn.
Ask (design, light) — prospective; non-blocking
Is mkdir-flock + heartbeat the permanent multi-process session lease, or should V2 SessionRunCoordinator become the single owner with this as a V1 bridge?
For never-again: when a waiter stores a prompt under another holder, is “holder answers at next turn boundary” the contract, or should the harness expose an explicit cross-process enqueue/ack?
tip: d970983c0bca86d840ac036e2403fe91bc398e69
evidence: SOURCE — EffectFlock tryAcquire/verify + SessionRunState lock wrap + runLoop owns() + CLI remote-reply render; live cross-process suite UNKNOWN (not run here yet; author claims 3595/0 + mutation-killed tests)
One wording correction: do not state a strict fencing invariant. The PR explicitly says takeover is best-effort: a holder that loses the lease may finish its current in-flight turn/tool before the next owns(sessionID) check. The supported invariant is closer to:
with a healthy heartbeat, only one process enters successive provider turns; after lease loss, the old owner stops before its next provider turn.
That distinction matters if Civ/factory later models this as a concurrency guarantee.
Keep as CHECK/limited-confidence until current-head evidence is re-reviewed, but the old “SOURCE-only” limitation is no longer accurate.
Independent QA found one important follow-up that the PR body names as out of scope but does not appear to have a dedicated current issue: cross-process abort ownership.
Before posting, re-pin the current head and search origin for a newer issue/PR covering this exact case.
If still unowned, post a short design/review comment on anomalyco#50968:
One follow-up seems worth tracking as this becomes the cross-process session ownership model: abort remains process-local.
POST /session/:id/abort promises to stop ongoing processing, but SessionRunState.cancel() only cancels a runner in the current process. If process B is waiting on process A's lease, an abort handled by B can return success / set local status idle while A's provider or tool turn continues.
This looks like the cross-process analogue of anomalyco#29894, whose older same-process instance mismatch was fixed by 87c33b3. It need not block the duplicate-run fix if intentionally out of scope, but it seems worth an explicit follow-up/regression: hold the lease/run in process A, call the public abort path through process B, and require A's in-flight turn/tool to stop.
Keep it concise; OpenCode explicitly rejects AI walls of text. Do not open a duplicate issue if search finds an existing owner.
Return
Reply here with the upstream URL and whether this became (a) a PR comment, (b) an existing issue reference, or (c) a newly requested issue by maintainers.
Activity
kvnloo commentedon Sep 25, 2026
QA re-pin: this mirror is stale relative to the current PR.
Current origin head is
7b776f3ee34f0b99c40252c84c073d65f9b546c5, notd970983c…, and the candidate changed materially after the mirror pin.The PR now reports substantially stronger evidence than “SOURCE only”:
opencode runprocesses exercising cross-process behavior;packages/opencode: 3,594 pass / 2 timeout failures that pass alone;packages/core: 1,102 pass / one failure also present on cleandev;Please update evidence classification to origin-supplied behavioral/live proof present; independent factory rerun unknown.
One wording correction: do not state a strict fencing invariant. The PR explicitly says takeover is best-effort: a holder that loses the lease may finish its current in-flight turn/tool before the next
owns(sessionID)check. The supported invariant is closer to:That distinction matters if Civ/factory later models this as a concurrency guarantee.
Keep as
CHECK/limited-confidence until current-head evidence is re-reviewed, but the old “SOURCE-only” limitation is no longer accurate.kvnloo commentedon Sep 25, 2026
PROMOTE — Wave 1
Independent QA found one important follow-up that the PR body names as out of scope but does not appear to have a dedicated current issue: cross-process abort ownership.
Before posting, re-pin the current head and search origin for a newer issue/PR covering this exact case.
If still unowned, post a short design/review comment on anomalyco#50968:
Keep it concise; OpenCode explicitly rejects AI walls of text. Do not open a duplicate issue if search finds an existing owner.
Return
Reply here with the upstream URL and whether this became (a) a PR comment, (b) an existing issue reference, or (c) a newly requested issue by maintainers.