Skip to content

watch: multiple daemons accumulate for the same repo (4 on one checkout) #185

Description

@JordanCoin

Observed 2026-09-04 while diagnosing memory pressure on Jordan's machine:

4881  codemap watch daemon <repo:community-os>
53389 codemap watch daemon <repo:community-os>
66406 codemap watch daemon <repo:community-os>
66432 codemap watch daemon <repo:community-os>

Four daemons for one checkout, alongside single daemons for other repos and seven codemap mcp processes (one per open Claude session, expected). Each daemon holds its own graph and fsnotify watches, so duplicates multiply memory and file-descriptor use and can race on the state file.

Expected: codemap watch start (and the session-start hook) detect a live daemon for the same root via the PID/readiness file and reuse it, and a daemon exits when its owning session ends. Suggested exit test: start three sessions on one repo, pgrep -f 'codemap watch daemon <root>' returns exactly one PID; end all sessions, returns zero.

Related: #177 (readiness file), #184 (hygiene).

🤖 Generated with Claude Code

https://claude.ai/code/session_01TcyheQmM3HCvxF5wRL3s5t

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions