Skip to content

feat: support safe multi-client session attachment #224

Description

@jasonsuhari

Problem

Issue #216 adds durable background sessions, but tmux also allows more than one client to observe a session and provides read-only attachment. Without an explicit multi-client model, a second GridBash UI could interleave input or resize the same PTYs unpredictably.

Requested behavior

Add safe multi-client attachment to daemon-owned sessions with read-only observers by default and an explicit renewable input lease for mutation.

Acceptance checks

  • Multiple clients can attach to one background session and receive ordered snapshots/events.
  • Additional clients default to read-only and cannot type, resize, restart, or change layout.
  • One client at a time can acquire, renew, release, and recover a mutation lease.
  • Client-local focus and scroll positions do not overwrite another client's view.
  • Disconnect and stale-lease recovery are bounded and tested.
  • CLI status shows attached clients and current lease ownership without secrets.
  • Reference/architecture docs and a devlog are updated.

Depends on #216.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:architectureArchitecture planning and long-term designenhancementNew feature or requeststatus:needs-triageNeeds maintainer review and routing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions