claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Incognito mode in Claude Code

Open benjaminjackson opened this issue 3 months ago • 2 comments

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When I run Claude code in --print mode, I usually don't need to refer to that conversation later.

For example, I often use it to automatically commit changes to my code.

These conversations aren't something I'll ever refer back to, BUT they end up cluttering up the conversation history when I try to find an earlier session using /resume.

Proposed Solution

I'd like to be able to run claude --print --incognito. This would prevent the conversation history from being stored in ~/.claude/projects.

Alternative Solutions

I can't think of any other way to accomplish this other than a native flag.

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

Example:

  1. I make some changes with Claude Code.
  2. I leave the session and run claude -p "/dev:commit" --incognito
  3. Claude Code commits the files
  4. I run claude -c
  5. Claude resumes the previous session where I made the changes
  6. The conversation history for the commit workflow is not stored

Additional Context

No response

benjaminjackson avatar Oct 06 '25 22:10 benjaminjackson

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Dec 08 '25 10:12 github-actions[bot]

id still love that feature for tons of haiku microagents doing their work without having to script-cleanup after them!

risenowrise avatar Dec 08 '25 17:12 risenowrise

I'd still prefer a proper command-line arg, but I found a workaround where you can capture the conversation id via the --output-format json argument and then clear out the conversation right away. Here is a bash wrapper in the meantime:

https://gist.github.com/superjax/5e4b9c78d42458d0c6b1d5a05aa66288

superjax avatar Dec 18 '25 00:12 superjax