[Bug] CLI auto-upgrade orphans background PTY host processes, leaving sessions input-deaf

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Aug 5, 2026

Bug Description
Title

▎ CLI auto-upgrade orphans parked claude agents sessions — session goes permanently input-deaf while its host process stays alive

Body (full text in the file above) — the shape of it:

  • Symptom — parked FleetView session ignores all keystrokes, in the original tab and in a fresh one; Ctrl+C and Esc included.
  • Cause — 2.1.220 → .221 → .222 upgrades each restart the daemon; the claimed bg-pty-host/bg-spare pair is neither migrated nor killed, so it survives reparented to init. Host was healthy (main thread idle in kevent64), still holding rv/<session-id>.sock. New daemon doesn't know it exists.
  • Why it looks attached — scrollback renders from the transcript JSONL, so the UI shows a live-looking session with no input path.
  • Consequence — last message stuck as queue-operation, never processed. No error, no reconnect, no "unavailable" state. Manual kill + --resume was the only way out, and resuming without killing first would double-write the transcript JSONL.
  • Expected — adopt surviving hosts on daemon restart, or kill them and mark the session resumable; and fail loudly when input can't be routed.
  • Repro sketch — 3 steps.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.221
  • Feedback ID: 7523d5e7-a00e-4133-8a23-e8642be3b036

Errors

[]

View original on GitHub ↗