Stale worker entries in ~/.claude/daemon/roster.json survive process death, show as "Login required" ghosts

Status Open
Maintainer reply None cached
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 claude returns nothing).
  • The daemon's roster still lists workers.* entries for the dead processes.
  • Removing the stale workers.* entries from roster.json resolves the issue immediately.

Reproduction

  1. Start a long-running background task in Claude Code.
  2. Update Claude Code (e.g. via version bump) while that task is still active.
  3. Check ~/.claude/daemon/roster.json — stale worker entries remain for processes that no longer exist.
  4. Observe "Login required" ghost sessions in the UI.

Suggested fixes

  • Automatically prune workers whose PIDs no longer exist.
  • Validate procStart against the current process to detect PID reuse.
  • Provide a /doctor --repair-daemon command 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.

View original on GitHub ↗