# Daemon Cleanup

> Daemon footprint scope, reclaim persistence, and consent-gated cleanup of old artifacts.

- Skill: `lingtai-ai/daemon-cleanup` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lingtai-ai/daemon-cleanup`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lingtai-ai/daemon-cleanup/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: lingtai-ai (https://skillmd.com/u/lingtai-ai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/lingtai-ai/daemon-cleanup

---


# Daemon Cleanup Reference

Use this reference for a footprint audit or explicitly authorized deletion.
It does not own provider routing or cross-process recovery. There is no
automatic folder cleanup: `reclaim` stops processes but leaves evidence, and
molt clears conversation context while retaining durable stores, including
daemon run folders.

## Cleanup / Footprint

Each run leaves `daemons/em-*` with `daemon.json`, events, transcript/history,
result files, and token records. Do not delete an active run or evidence still
needed for a report, review, or cost audit.

Call `psyche(action="skills", input={}, reasoning="read cleanup guidance")`,
then read `reference/cleanup-footprint-contract.md` beside that installed manual.
Use its shared inspection recipe; combine
its definitions with this tool-specific selection in one task-owned script.
Inspection writes nothing. Appending `logs/cleanup.jsonl` is a separate,
explicitly selected audit step.

```python
agent = Path.cwd()
items = [p for p in (agent / "daemons").glob("em-*") if p.is_dir()]
rows, total = footprint_check(items, tool="daemon", top_n=20)
```

Before deleting old completed folders, show the dry-run output and obtain
explicit human consent. Then append an `apply` record to
`logs/cleanup.jsonl` with the deleted paths and bytes. Never delete outside the
approved selection or use cleanup to hide a failed run.

