Auto Dream silently disabled forever if a dream crashes mid-run — stale `.consolidate-lock` never gets cleaned up
Summary
Auto Dream (autoDreamEnabled: true) stops running permanently after any hard kill of a dream sub-agent. The lock file at ~/.claude/projects/<slug>/memory/.consolidate-lock is never validated against a live PID, so a single crash disables the feature indefinitely with zero user-visible signal.
Repro
- Enable
"autoDreamEnabled": truein~/.claude/settings.json. - Let Auto Dream start (scheduled between sessions — writes lock with current PID).
- Hard-kill the dream process mid-run (on Snapdragon X Plus / any Modern Standby machine, S0 idle does this automatically when the laptop is left idle; elsewhere,
taskkill /Freproduces it). - Observe:
.consolidate-lockstill exists with the dead PID inside. - All subsequent dreams silently exit without doing anything.
Expected
A dream should check whether the PID inside .consolidate-lock is still alive. If the owning process is gone, treat the lock as stale, overwrite it, and proceed.
Actual
The lock is treated as authoritative proof another dream is running, regardless of whether the recorded PID exists. The feature dies silently with no error, no log entry, no statusline indication.
Evidence from my machine
- Lock birth: 2026-03-24 22:15
- Last successful consolidation: 2026-04-08 18:07 (files
user_profile.md,reference_modern_standby.mdupdated 2–3 min after lock, then process killed by Modern Standby) - Owning PID 52900 dead by at least Apr 9 (
tasklist /FI "PID eq 52900"→ no task) - Between Apr 8 and Apr 19 (11 days): zero dream activity despite
autoDreamEnabled: true - Second project on same machine has an identical stale lock from 2026-04-02 (PID 45260, also dead)
- Deleting the lock manually restores Auto Dream immediately
Proposed fix
When acquiring the lock:
if lock_exists:
pid = read_pid(lock)
if not process_alive(pid):
log("Stale lock from PID {pid}, removing")
remove(lock)
else:
return # real dream in progress
create_lock(my_pid)
Bonus: log Auto Dream runs to a visible location (e.g. ~/.claude/logs/auto-dream.log) so users can tell when the last one ran without reading lock mtimes.
Environment
- Claude Code 2.1.114
- Windows 11 Home 10.0.26200, Snapdragon X Plus (ARM64 under emulation)
autoDreamEnabled: true,autoMemoryEnabled: true
Note on feature status
Auto Dream / autoDreamEnabled does not appear in official docs or the changelog. This report is for the flag as it exists in the shipping client today — a fix here would be valuable whether the feature remains experimental or ships officially.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗