codemap icon indicating copy to clipboard operation
codemap copied to clipboard

watch: daemon keeps running after its project root is deleted (agent worktrees)

Open JordanCoin opened this issue 1 month ago • 0 comments

Symptom

`codemap watch daemon ` processes accumulate for roots that no longer exist, typically agent worktrees that were removed without a SessionEnd hook firing. They stay alive indefinitely (observed: two weeks).

Cause

The daemon has no check that its root still exists; it only exits on `watch stop` or a signal.

Fix

Periodically stat the root and exit cleanly when it is gone.

JordanCoin avatar Oct 30 '26 19:10 JordanCoin