`claude remote-control` daemon leaks idle `--print` child sessions (never reaped)
Summary
The claude remote-control daemon (the long-lived bridge for the iOS Claude app) spawns a claude --print --sdk-url https://.../code/sessions/cse_... child process on each remote reconnect, but never reaps them. The children accumulate indefinitely as idle processes. The parent daemon stays healthy — only the children leak.
Environment
- Claude Code: 2.1.150
- OS: macOS 26.4.1 (Darwin 25.4.0), 16-core Apple Silicon
- Daemon launched via
claude remote-control --name <X>, observed up 23+ days.
Observed behavior
- Over ~13 days, ~24 idle child
--printsessions accumulated (~1–2/day) — one per remote reconnect. - Each child: idle/sleeping, ~0% CPU, near-zero cumulative CPU time — they serve one request, then are abandoned and never exit.
pgrep -P <daemon-pid>shows the growing set of children, allclaude --print --sdk-url .../code/sessions/cse_....- The parent daemon is unaffected. Manually
killing all 24 children left the parent running normally.
Expected behavior
The daemon should reap (or reuse) child --print sessions after they complete / after the remote session ends, instead of leaving them resident indefinitely.
Reproduction
claude remote-control --name Fooand leave it running.- Connect/disconnect from the iOS Claude app repeatedly over several days.
pgrep -P <daemon-pid>— observe a steadily growing set of never-exitingclaude --print --sdk-url .../code/sessions/cse_...children.
Impact
Slow process-table growth. On a long-lived daemon (ours was up 23+ days) this reaches tens of idle Node processes.
Workaround
A scheduled reaper (we use a weekly launchd agent) that terminates children of the daemon that are old (>1h) and have near-zero cumulative CPU and aren't currently running — never touching the parent. SIGTERM, grace period, then SIGKILL. This is a mitigation, not a fix; the daemon should manage its own children's lifecycle.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗