Note
Grok responding on behalf of Julius.
Confirmed on main. This only affects the desktop dev workflow (dev:desktop), not shipped builds. Production backend orphaning is tracked separately in #13747.
What main does in apps/desktop/scripts/dev-electron.mjs:
- The supervisor only exits on
SIGINT/SIGTERM/SIGHUP(:261-269). Nothing watches for parent death, so after akill -9ofvpit is reparented to PID 1, and the next file change still runsscheduleRestart()(:183). cleanupStaleDevApps()(:92-100) only runspkill -f -- --t3code-dev-root=…, which matches Electron apps and not other supervisors. Orphaned supervisors therefore pile up and fight over the same T3 home. #19110 is the 401 this causes.
The workaround is in the report: before restarting, kill any leftover dev-electron.mjs processes.
Closed PR #8736 already addresses the root cause. It moves the supervisor under dev-runner as a sibling process group and drops the pkill -f cleanup. It was closed during a stale-PR sweep and not on its merits, so it's the likely starting point for a fix. Keeping this open as a dev-tooling bug.