Repository navigation
Sandboxes stuck in Error after Podman machine restart — no recovery path #2179
Description
Agent Diagnostic
- Loaded
debug-openshell-clusterskill andopenshell-cliskill context - Ran
openshell sandbox list— all 4 sandboxes showErrorphase after Podman Desktop stopped and restarted the Podman machine - Ran
podman ps -a— all sandbox containers exist inExited (143)state (SIGTERM from machine shutdown), meaning the containers are recoverable - Ran
brew services restart openshellto triggerresume_persisted_sandboxes()— sandboxes remain in Error - Inspected
crates/openshell-server/src/compute/mod.rs:750(resume_persisted_sandboxes) — the function skips sandboxes already inErrorphase (line 775:if !sandbox_phase_should_be_running(phase) { continue; }) - Inspected
sandbox_phase_should_be_runningat line 1978 — onlyUnspecified,Provisioning,Ready, andUnknownphases are considered resumable;Erroris excluded - Root cause: The initial Podman machine restart marked sandboxes as Error (containers exited). On subsequent gateway restarts, the resume sweep skips Error-phase sandboxes, so they can never be recovered — even though the underlying containers still exist and could be restarted
- The agent could not resolve this — there is no CLI command (
sandbox restart,sandbox resume) or API to transition a sandbox out of the Error phase without deleting and recreating it
Description
When a Podman machine is stopped (e.g. via Podman Desktop) and restarted, all running sandbox containers receive SIGTERM (exit code 143). The gateway's reconciliation loop or startup resume marks them as Error with reason BackendResourceMissing or similar.
After restarting the Podman machine and the gateway, the sandboxes remain permanently stuck in Error because resume_persisted_sandboxes() explicitly skips sandboxes in Error phase. The underlying Podman containers still exist (Exited (143)) and could be restarted with podman start, but there is no mechanism to bring the gateway's sandbox state back to Ready.
Expected behavior: After a Podman/Docker machine restart followed by a gateway restart, sandboxes whose containers still exist should be recoverable — either automatically by the resume sweep, or via a CLI command like openshell sandbox restart <name>.
Actual behavior: Sandboxes are permanently stuck in Error. The only recovery is openshell sandbox delete + recreate, which loses sandbox state, uploaded files, and configuration.
Reproduction Steps
- Create one or more sandboxes with a Podman-backed gateway:
openshell sandbox create --name test - Wait for sandboxes to reach
Readyphase - Stop the Podman machine (e.g. stop Podman Desktop, or
podman machine stop) - Restart the Podman machine (
podman machine startor restart Podman Desktop) - Restart the gateway (
brew services restart openshellon macOS) - Run
openshell sandbox list— all sandboxes showError - Run
podman ps -a— containers still exist asExited (143) - Restart the gateway again — sandboxes remain
Error(resume sweep skips them)
Environment
- OS: macOS 26.5.2 (Darwin 25.5.0)
- Podman: 6.0.0 (via Podman Desktop)
- OpenShell CLI: 0.0.79-dev.1+gf7aa3aa3
- OpenShell Gateway: 0.0.77 (Homebrew service)
- Compute driver: Podman
Logs
$ openshell sandbox list
NAME CREATED PHASE
ai-beacon 2026-07-02 14:48:08 Error
examinator 2026-07-08 08:15:29 Error
s1 2026-07-08 08:42:40 Error
sonarr-drone 2026-07-08 09:49:08 Error
$ podman ps -a --format '{{.Names}} {{.Status}}'
openshell-sandbox-ai-beacon Exited (143) 2 hours ago
openshell-sandbox-examinator Exited (143) 2 hours ago
openshell-sandbox-s1 Exited (143) 2 hours ago
openshell-sandbox-sonarr-drone Exited (143) 2 hours ago
$ openshell logs ai-beacon --since 5m
[1783510768.375] [gateway] [WARN ] [openshell_server::compute] Container exited with code 143Agent-First Checklist
- I pointed my agent at the repo and had it investigate this issue
- I loaded relevant skills (e.g.,
debug-openshell-cluster,debug-inference,openshell-cli) - My agent could not resolve this — the diagnostic above explains why
Activity
fbricon commentedon Jul 8, 2026
manually restarting the containers in podman works BTW, but openshell could certainly do better
r3v5 commentedon Jul 10, 2026
Hey @fbricon ! I would want to work on this issue unless you have already digged into it. How does it sound?
fbricon commentedon Jul 10, 2026
@r3v5 thanks, please knock yourself out :-)
fix(compute): recover Error-phase sandboxes on gateway startup (NVIDI…
fix(compute): recover Error-phase sandboxes on gateway startup (NVIDI…
github-actions commentedon Jul 25, 2026
This issue has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. Comment or remove the state:stale label to keep it open.
fix(compute): recover Error-phase sandboxes on gateway startup (NVIDI…
fix(compute): recover Error-phase sandboxes on gateway startup
fix(compute): recover Error-phase sandboxes on gateway startup
politerealism commentedon Aug 31, 2026
What is the status fo this issue exactly?
fix(compute): recover Error-phase sandboxes on gateway startup (NVIDI…