What
claude purge now checks whether it is attached to a terminal (a window where someone can type) before it asks anything. If it is not, it stops with a message instead of waiting. This covers both the project picker and the -i interactive mode.
The message suggests other ways to run it:
- Name a project path, without
-i:claude purge <path>. - Add
--dry-runto see what it would delete without deleting anything. - Run without
-ito confirm the whole list once at a single yes or no prompt.
Why
This makes claude purge safe to use in scripts and automated pipelines, where a question nobody can answer would otherwise hang the run.
Names in the bundleclaude purge
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up claude purge, on Claude Code changelog.
* Fixed `claude purge` hiding its prompts when stdout is redirected, where one unseen Enter could delete a project's data; they now show on the terminalchangelog see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up claude purge, on Claude Code changelog.