You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Subscriber-driven attach for never-activated local daemon sessions uses attachOnly: true. On pre-v31 daemons that ignore attachOnly, createOrAttach can return isNew: true (accidental spawn). The adapter retires that spawn with an immediate kill and throws SessionNotFoundError so the accidental shell is not published as a successful attach.
If that kill fails, the failure is only console.warn’d. The accidental shell can remain as an untracked orphan on the daemon host.
attachOnly: true + session size from getAppliedSize
on result.isNew: kill with immediate: true, catch → console.warn('[daemon] attach-only retire of accidental legacy spawn failed', …), then throw SessionNotFoundError
Impact
Rare: only pre-v31 / legacy daemon protocol paths
Correctly does not pin a sticky “attach succeeded” for a blank stream (degraded-provider refusal is separate)
Worst case: one orphan shell per failed retire, diagnosable only via logs unless operator inspects daemon sessions
Suggested fix
Surface a structured runtime/telemetry event (not only warn) so support can find orphans
Retry kill once with backoff, or schedule a best-effort reaper for known accidental session ids
Activity
fix(daemon): surface failed attach-only orphan retire for support