Stale worker entries in ~/.claude/daemon/roster.json survive process death, show as "Login required" ghosts
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 0 comments · opened Jul 17, 2026
Description
Updating Claude Code while long-running background tasks are active can leave stale worker entries in ~/.claude/daemon/roster.json. The daemon continues to believe these workers exist even after the underlying processes are gone.
Observed behaviour
- Sessions remain visible in the UI as "Login required", even though no Claude processes exist (
pgrep -af claudereturns nothing). - The daemon's roster still lists
workers.*entries for the dead processes. - Removing the stale
workers.*entries fromroster.jsonresolves the issue immediately.
Reproduction
- Start a long-running background task in Claude Code.
- Update Claude Code (e.g. via version bump) while that task is still active.
- Check
~/.claude/daemon/roster.json— stale worker entries remain for processes that no longer exist. - Observe "Login required" ghost sessions in the UI.
Suggested fixes
- Automatically prune workers whose PIDs no longer exist.
- Validate
procStartagainst the current process to detect PID reuse. - Provide a
/doctor --repair-daemoncommand to clean stale roster entries without manual file editing.
Workaround
Manually remove the stale workers.* entries from ~/.claude/daemon/roster.json. Recovery takes about a minute once you know where to look.