⌨️--no-session-persistence Flag
Also known as claude --no-session-persistence, CLAUDE_CODE_SKIP_PROMPT_HISTORY
It stops claude -p from saving the session to disk.
Think of it like
It is like you write on a board, then wipe it clean when you are done.
Example
Lucy's script asks Claude about files with customer data. She adds --no-session-persistence. Then no copy of the chat stays on the build box.
Why it matters
Runs on private data leave no chat behind on the machine.
Definition
Example code
bash
claude -p --no-session-persistence "Check this log for secrets"Common mistake
Key takeaways
- 1Nothing saved. No transcript.
- 2No resume. Nothing to open.
- 3Print mode only. The env var works anywhere.