1 min read
End Of Turn Hygiene
The agent owns every process it spawns and must leave the workspace in a legible state.
End-of-turn hygiene applies when the session started dev servers, test watchers, browser sessions, automation jobs, long-running scripts, or local services. Source: AGENTS.md Process & Resource Hygiene; Agent Process Tracking, Audit, And Cleanup
Closeout
- Identify processes spawned during the turn.
- Keep only servers Kevin is actively using.
- Stop duplicates, hung workers, and browser sessions opened for verification.
- Never kill the editor, agent runtime, user shell, or shared MCP servers.
- Report any intentionally retained server URL, PID, and purpose.
Useful Audit
Use the cleanup skill or Agent Broom scripts when available:
agent-hygiene.sh audit
If no long-running process was spawned, no special audit is required beyond normal judgment.
Failure Mode
Do not leave a watcher running because "it might be useful later." Future agents inherit CPU load, port conflicts, and unclear process ownership.
Timeline
- 2026-07-01 | Created the heartbeat closeout page for process, browser, dev-server, and long-running job hygiene. Source: User request, 2026-07-01; AGENTS.md