← Back to Pull requests

docs: a scratch tmux command can't end the team, and how to bring seats back if one did #3832

Closed
unknown closed this pull request without merging on Nov 23, 2026 19:08 UTC
View on GitHub
unknown unknown commented on Nov 23, 2026 11:35 UTC
Author

What changed (text only)

A bare tmux kill-server run from inside a seat ends every agent on that tmux server. These docs make three things explicit.

Onboarding (packages/daemon/assets/onboarding/02-self-and-competent-action.md, the seat's tmux paragraph):

  • An unnamed tmux command in a pane follows its inherited TMUX, whatever TMUX_TMPDIR says. tmux sets TMUX in every pane, and OpenRig keeps it when it resets the pane's environment.

  • So in tmux experiments, every command needs a -L <name> or -S <path> that isn't the live server's.
  • docs/reference/tmux-servers.md:

  • terminal.tmux_server: isolated separates seats from your own tmux server. It doesn't protect the seats' server from its own agents: a tmux command an agent runs there without -L/-S, kill-server included, acts on the seats' server.

  • The setting is read once at daemon start, and a restart keeps the previous server while registered sessions remain on it. Changing it doesn't move running seats.

  • After the server dies, even leaving its socket file behind (as after kill-server):

  • - Resume: rig up <rig> --existing finds the seats' sessions gone, starts the tmux server again, and resumes each seat's conversation where provider history allows. A seat without usable history waits for an explicit fresh-start choice.
    - Blank replacement: rig seat launch <seat> --fresh --reason "<why>" can also reopen it, one seat at a time. That's a deliberate blank replacement, not a resume.

    No default, refusal or environment change.

    Checked against source


  • The resume path:

  • - routes/up.ts → existing-rig-restore.ts → restore-orchestrator.ts.
    - hasSession treats "no server running" as gone (tmux.ts), so the seats read stale, not unknown.
    - launchNode → createSession starts the server again (start-server before new-session), and tmux replaces a socket that refuses connections.
    - This was also exercised on real tmux 3.6a with a throwaway socket. After kill-server, chooseRestoreSnapshot + runExistingRigRestore brought the server back on the same socket, with the seat's own resume token.
  • The fresh path: seat-lifecycle-service.ts launchFresh (stale-socket check, then startServer()). --fresh and --reason are both required (seat.ts).

  • Checks:

  • - check-docs-guard, generate-context-packs --check, mirror-skills --check and check-first-run-references pass.
    - default-onboarding-pack and the starter-adapter tests pass.
    - The onboarding file is 4,994 of its 5,000-character limit.

    🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->
    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    Documentation
    Clarified that registered sessions can keep startup selection pinned to the previous server, and changing the server setting does not move running seats.
    Explained that unnamed tmux commands use the pane’s inherited TMUX value, regardless of TMUX_TMPDIR; use a separate server name or socket path for experiments.
    Documented recovery with rig up <rig> --existing and fresh launches with rig seat launch --fresh --reason; fresh launches are refused while the recorded process is running.
    * Warned that tmux kill-server ends every agent on the targeted server.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 432 lines (+324 / -108) across 5 files Reviewer: mvschwarz Review duration: 452m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 432 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.363
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3832"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 45.2% (MEDIUM) · Higher = larger blast radius
    45.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.8% · Safe to merge
    17.8%