Six Old Processes Led Me to Build AgentDust
Описание и применение
AgentDust отслеживает процессы, связанные с сессиями Claude Code, и безопасно очищает устаревшие процессы, уменьшая нагрев и потребление ресурсов.
Задача
Uncontrolled background processes from AI coding sessions accumulate, causing system heat and resource waste.
Результат
AgentDust reduces lingering processes, lowers CPU heat, and provides a safe cleanup workflow for AI coding sessions.
Рабочий процесс
- 1. Install AgentDust via Homebrew and set it up.
- 2. Hook writes a random marker to Claude Code’s environment file at session start.
- 3. AgentDust records the marker and session identity in a local journal.
- 4. During cleanup, AgentDust hashes inherited markers and compares with recorded keys.
- 5. Classify processes as live, ended, suspect, or unknown.
- 6. Generate a four‑character approval code and re‑validate process identity before sending SIGTERM.
- 7. Execute cleanup via /agentdust:cleanup in Claude Code.
Доказательства
When my Mac started running hot, I looked at processes left around my AI coding sessions. I found six processes, each 7 to 9 days old: two development servers, a mock server, a browser driver, its MCP server, and a stale Node script.
I built AgentDust to associate a process with the Claude Code session whose marker it inherited.
Only processes owned by ended sessions and suspects can enter a cleanup plan. The doctor command only reads and reports.
I approve a cleanup by typing a generated four-character code. The approval form does not accept a code supplied through the model's tool call.
The hook's measured median latency is 2.5 ms per event on a macos-15 runner.
- Дата записи: 2026-10-05T15:55:53.220Z