[FEATURE] Interactive incognito/ephemeral session — extend --no-session-persistence beyond --print
Preflight Checklist
- [x] I have searched existing requests and this specific feature hasn't been requested yet (closest related: #80905, which is about cross-session memory isolation for unbiased code review — different motivation/mechanism from this request)
- [x] This is a single feature request (not multiple features)
Problem Statement
--no-session-persistence exists and disables saving a session's transcript to disk so it can't be resumed — but per claude --help, it "only works with --print" (single-shot, non-interactive mode). There's no way to have a normal, multi-turn interactive claude session that never gets written to ~/.claude/projects/** and simply disappears when it's closed.
Proposed Solution
Allow --no-session-persistence (or a new dedicated flag, e.g. --incognito) to work with regular interactive sessions too: the session behaves normally (full tool use, multi-turn conversation) but nothing is written to disk — no .jsonl transcript, no entry in the session/resume picker, no ~/.claude/session-env/<id> directory. Closing the terminal leaves no trace, the same way an incognito/private browser window doesn't save history.
Alternative Solutions
Today the only workaround is to delete the transcript file manually after the session ends, which requires knowing the session ID and remembering to do it every time.
Priority
Medium - Would be very helpful
Feature Category
CLI
Use Case Example
- Run
claude --incognito(orclaude --no-session-persistencewithout--print). - Have a normal back-and-forth interactive conversation, using tools as usual.
- Close the terminal / exit the session.
- Nothing is left behind: no transcript file, no resumable session, no trace in
--resumepicker.
Useful for one-off sensitive questions, quick throwaway experiments, or just not wanting a session cluttering project history.
Additional Context
Related but distinct: #80905 asks for a session with no access to other sessions' memory/context (bias isolation for code review). This request is about a session's own transcript not persisting to disk at all (privacy/cleanup), regardless of cross-session memory sharing.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗