Skip to content

[origin-review] anomalyco/opencode#50968 — LIMITED #14

Closed as duplicate

Description

@kvnloo

Why this matters

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

  1. Is mkdir-flock + heartbeat the permanent multi-process session lease, or should V2 SessionRunCoordinator become the single owner with this as a V1 bridge?
  2. 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?


Fork mirror of a sealed OSS review draft. Not posted upstream.

  • origin: fix(opencode): run one session loop at a time across processes anomalyco/opencode#50968
  • 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)
  • pack: 02 draft 001
  • dedupe_key: anomalyco/opencode#50968
  • github_writes_origin: 0

Activity

  1. kvnloo commented on Sep 25, 2026

    @kvnloo
    OwnerAuthor

    Factory QA: duplicate mirror of #13 for anomalyco/opencode#50968. Continue all current-head evidence/status updates on #13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions