Claude Code on Mac: temporary tool output and session retention
Turning off session history does not decide which project files you should keep. Claude Code 2.1.323 fixes cleanup of long tool results on specific exit paths. If you use its non-persistent print mode, save the final findings you need separately and review local files by their purpose.
What changed in Claude Code 2.1.323?
Anthropic fixed long tool results remaining on disk after a session run with --no-session-persistence. The release notes say those results are now removed on normal exit, Ctrl+C or SIGTERM.
Know what the option controls
Anthropic’s CLI reference, linked below, documents --no-session-persistence for print mode only: the session is not saved to disk and cannot be resumed. Decide whether you need a resumable conversation before choosing that mode. Keep any final report or project deliverable you need separately; do not rely on a temporary tool result remaining after exit.
Expired-session cleanup has separate fixes
The same release fixes temporary files left behind when a session had changed directory and later expired under cleanupPeriodDays. It also changes that cleanup to count unreadable folders as errors. These are separate release notes from the non-persistent-session exit fix.
Use the documented exit conditions as the boundary
The verified cases are normal exit, Ctrl+C and SIGTERM. The announcement does not establish what remains after a crash or forced shutdown. It also does not establish removal of every file a command creates in your project. Let active work finish, save needed outputs, and inspect leftover files before deciding they are disposable. A setting name or an old timestamp alone is insufficient reason to remove a file.
Review supported files with AI Agent Clean 1.0.9
Scanning and result review are free. Inspect each candidate’s tool, path and size before selecting it. Our team has not verified cleanup coverage for Claude Code 2.1.323’s temporary output behavior. Cleanup, uninstallation and file recovery depend on the app’s access and recovery checks. Eligible recovery does not require an active membership. Binary thinning, startup changes and maintenance actions are currently unavailable.
Check compatibility and your regional price
AI Agent Clean requires macOS 14 or later and supports Intel and Apple silicon Macs. The US lifetime reference price is US$29.99 as a one-time purchase. Check the Mac App Store for regional prices and offer eligibility.