Sandbox stuck in unrecoverable Error phase after supervisor session drops (SSH disconnect); stop/start refuse to act
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 8.7k
- Forks
- 1.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 253
Description
Summary
When the SSH connection carrying a sandbox's supervisor session drops (e.g. client-side "Broken pipe"), the sandbox transitions to Phase: Error and there is no way to recover it short of sandbox delete + sandbox create. sandbox stop and sandbox start both refuse to act on an Error-phase sandbox, so the workspace inside /sandbox is unrecoverable.
Steps to reproduce
openshell sandbox create(image/policy runningopenclaw-startas main command)- Attach interactively over SSH and run through a long-running foreground process (e.g. an onboarding wizard)
- Let the SSH client disconnect mid-session (e.g. network blip →
client_loop: send disconnect: Broken pipe) openshell sandbox get <name>→Phase: Erroropenshell sandbox stop <name>→Error: sandbox must be Ready to stop (current phase: Error)openshell sandbox start <name>→Error: sandbox must be Stopped to start (current phase: Error)
Relevant logs
[1789391074.213] [gateway] [WARN ] supervisor session: stream error
[1789391074.213] [gateway] [INFO ] supervisor session: ended
(log capture was truncated at time of report)
Expected
Either:
- The supervisor session should be independent of the client SSH connection that carries it (a network drop on the client side shouldn't kill the sandbox), or
Errorphase should have a documented recovery path (e.g.sandbox stop --force/sandbox recover) that doesn't discard the workspace.
Actual
The only path out of Error phase is sandbox delete, which discards the sandbox's workspace with no export/backup step offered.
openshell version: 0.0.116
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the supervisor session handling and the sandbox phase validation behind the reported sandbox stop and sandbox start errors, using the provided gateway logs and reproduction steps. Done means a dropped SSH connection no longer destroys recoverability, or an explicit recovery path restores the sandbox without discarding /sandbox.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100