Environment
OpenShell 0.1.1 (Homebrew tap), macOS 15 Apple Silicon, local Docker driver, gateway via brew services.
Reproduction
openshell sandbox create --name web --from python:3.13-alpine -- python3 -m http.server 8080 --bind 0.0.0.0
openshell forward start 18080 web
# × ssh exited before local forward listener opened on 127.0.0.1:18080
Observed
- The CLI exits with the readiness error above.
- Despite the error, the listener is live:
lsof -nP -iTCP:18080 -sTCP:LISTEN shows an ssh process (started with ~/.ssh/control/<hash> [mux]), PPID 1, holding the port.
openshell forward list shows "No active forwards" — the leaked mux is invisible to the registry, so forward stop cannot reclaim it; only a manual kill <pid> cleans up. Retrying forward start on the same port then fails with the (accurate) "Port 18080 is already in use" diagnostic naming the orphan.
Expected
- The readiness race should either be resolved (wait for the listener before reporting failure) or the tracked forward should be torn down before exiting with the error.
- On failure, no orphaned ssh mux should survive detached at PPID 1; if one does, it should remain in the forward registry so
forward stop (or the next forward start with a prompt) can reclaim it.
Related but distinct: #2999 (SSH-session cleanup ordering), #3051 (structured errors).
Environment
OpenShell 0.1.1 (Homebrew tap), macOS 15 Apple Silicon, local Docker driver, gateway via
brew services.Reproduction
openshell sandbox create --name web --from python:3.13-alpine -- python3 -m http.server 8080 --bind 0.0.0.0 openshell forward start 18080 web # × ssh exited before local forward listener opened on 127.0.0.1:18080Observed
lsof -nP -iTCP:18080 -sTCP:LISTENshows ansshprocess (started with~/.ssh/control/<hash> [mux]), PPID 1, holding the port.openshell forward listshows "No active forwards" — the leaked mux is invisible to the registry, soforward stopcannot reclaim it; only a manualkill <pid>cleans up. Retryingforward starton the same port then fails with the (accurate) "Port 18080 is already in use" diagnostic naming the orphan.Expected
forward stop(or the nextforward startwith a prompt) can reclaim it.Related but distinct: #2999 (SSH-session cleanup ordering), #3051 (structured errors).