Skip to content

fix: claim saved-session resume ownership atomically #289

Description

@jasonsuhari

Problem

Resume selection checks the recorded owner PID but does not atomically claim the session. Two GridBash clients can pass the check concurrently, duplicate fallback terminals, encounter pane-host busy errors, and overwrite the same snapshot.

Related: #224 covers broader multi-client attachment; this issue is specifically about exclusive saved-session resume ownership.

Acceptance checks

  • Selecting a session for resume performs an exclusive, process-backed claim under a session lock.
  • A second concurrent resume receives a clear already-open error.
  • Failed startup releases or invalidates the claim so a later retry works.
  • Concurrency-focused tests cover the claim lifecycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstatus:needs-triageNeeds maintainer review and routing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions