Skip to content

Show spinner when waiting for sandbox lock#417

Merged
robinaugh merged 1 commit intomainfrom
jason/rwx-106-add-info-output-for-sandbox-cli-during-lock-wait
Mar 11, 2026
Merged

Show spinner when waiting for sandbox lock#417
robinaugh merged 1 commit intomainfrom
jason/rwx-106-add-info-output-for-sandbox-cli-during-lock-wait

Conversation

@robinaugh
Copy link
Contributor

Summary

  • When another CLI process holds the sandbox storage file lock, a spinner now shows "Waiting for another sandbox operation to complete..." instead of blocking silently
  • When the SSH agent-side exec lock is held, a spinner shows "Waiting for another sandbox exec to complete..." after a 500ms grace period to avoid flashing on uncontested acquires
  • Both spinners are suppressed in --output json mode

Test plan

  • New unit tests for lock wait output (TestService_LockWaitOutput)
    • Verifies no output when lock is uncontended
    • Verifies spinner message appears when lock is contended
    • Verifies message is suppressed in JSON mode
  • Manual: run two concurrent rwx sandbox exec commands and confirm spinner appears on the second

When another sandbox operation or exec holds a lock, the CLI now shows
a spinner instead of blocking silently. The file-based storage lock
uses a try-then-block pattern so the spinner only appears when
contended. The SSH directive lock uses a 500ms delay before showing
to avoid flashing on uncontested acquires. Both are suppressed in
JSON output mode.
@robinaugh robinaugh self-assigned this Mar 11, 2026
@robinaugh robinaugh marked this pull request as ready for review March 11, 2026 17:57
@robinaugh robinaugh merged commit 3f5b9d8 into main Mar 11, 2026
1 check passed
@robinaugh robinaugh deleted the jason/rwx-106-add-info-output-for-sandbox-cli-during-lock-wait branch March 11, 2026 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants