Long sessions have a physical afterlife.
A new Show HN project called Leftovers groups processes by app and coding-agent session on macOS. It measures process footprint as RAM plus compressed and swapped memory. The project also reports duplicate tool servers and likely leaks.[1]
The useful idea is larger than one app. Agent work now spans long session catalogs, remote hosts, and Dev Containers. VS Code 1.139 describes an agent host that can keep a session available across windows. It also extends Dev Container sessions to projects on SSH, Tunnel, and WSL hosts.[2] The visible chat and the process tree can have different lifetimes.
Session closed is a user-interface state. Process stopped is an operating-system fact.
A cleanup candidate needs four facts.
- Owner. Confirm the operating-system user. Protect root, system, and other users' processes.
- Origin. Tie the process to a session, terminal, parent process, port, or working directory.
- Impact. Record age, idle time, CPU, memory footprint, open port, and whether the work is still serving anyone.
- Identity. Recheck that the process ID still belongs to the same start time before sending a signal.
Leftovers encodes this caution. Its published rules protect system processes before classification, check process identity by start time, request a normal quit first, and force termination only after a delay.[1]
Detached work is valid when the lifecycle is explicit.
Node.js documents that a detached child can continue after its parent exits. Whether it stays alive also depends on its standard input and output configuration and whether the parent keeps a reference to it.[3] A surviving process can be intentional. The defect is missing ownership, stop behavior, and a receipt.
Make every long-lived development process answer four questions. Who owns it? Which project started it? How do we inspect it? How do we stop it without guessing?
Clean with a report before a button.
Start with read-only inventory. Group related helpers. Mark protected processes. Then review candidates one by one. A bulk cleanup action should remain behind confirmation and should refuse protected targets.
The tow card below does not inspect this computer. It prepares the fields needed for a real decision. Attach command output before changing the status from candidate to stopped.