Agent Diagnostic
- Loaded
debug-openshell-cluster skill and openshell-cli skill context
- Ran
openshell sandbox list — all 4 sandboxes show Error phase after Podman Desktop stopped and restarted the Podman machine
- Ran
podman ps -a — all sandbox containers exist in Exited (143) state (SIGTERM from machine shutdown), meaning the containers are recoverable
- Ran
brew services restart openshell to trigger resume_persisted_sandboxes() — sandboxes remain in Error
- Inspected
crates/openshell-server/src/compute/mod.rs:750 (resume_persisted_sandboxes) — the function skips sandboxes already in Error phase (line 775: if !sandbox_phase_should_be_running(phase) { continue; })
- Inspected
sandbox_phase_should_be_running at line 1978 — only Unspecified, Provisioning, Ready, and Unknown phases are considered resumable; Error is 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
Ready phase
- Stop the Podman machine (e.g. stop Podman Desktop, or
podman machine stop)
- Restart the Podman machine (
podman machine start or restart Podman Desktop)
- Restart the gateway (
brew services restart openshell on macOS)
- Run
openshell sandbox list — all sandboxes show Error
- Run
podman ps -a — containers still exist as Exited (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 143
Agent-First Checklist
Agent Diagnostic
debug-openshell-clusterskill andopenshell-cliskill contextopenshell sandbox list— all 4 sandboxes showErrorphase after Podman Desktop stopped and restarted the Podman machinepodman ps -a— all sandbox containers exist inExited (143)state (SIGTERM from machine shutdown), meaning the containers are recoverablebrew services restart openshellto triggerresume_persisted_sandboxes()— sandboxes remain in Errorcrates/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; })sandbox_phase_should_be_runningat line 1978 — onlyUnspecified,Provisioning,Ready, andUnknownphases are considered resumable;Erroris excludedsandbox restart,sandbox resume) or API to transition a sandbox out of the Error phase without deleting and recreating itDescription
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
Errorwith reasonBackendResourceMissingor similar.After restarting the Podman machine and the gateway, the sandboxes remain permanently stuck in
Errorbecauseresume_persisted_sandboxes()explicitly skips sandboxes inErrorphase. The underlying Podman containers still exist (Exited (143)) and could be restarted withpodman start, but there is no mechanism to bring the gateway's sandbox state back toReady.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 isopenshell sandbox delete+ recreate, which loses sandbox state, uploaded files, and configuration.Reproduction Steps
openshell sandbox create --name testReadyphasepodman machine stop)podman machine startor restart Podman Desktop)brew services restart openshellon macOS)openshell sandbox list— all sandboxes showErrorpodman ps -a— containers still exist asExited (143)Error(resume sweep skips them)Environment
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
debug-openshell-cluster,debug-inference,openshell-cli)