[FEATURE] Feature request: flag to hide chat history when using --fork-session
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
Use case
We run a nightly cron job that resumes a base session (claude -r <id> -p "...") to re-read our project and update documentation. Each morning, developers start an interactive session by forking from that base session (claude -r <id> --fork-session).
The fork correctly inherits all context/knowledge, which is great. However, the old chat messages are rendered in the TUI, cluttering the screen.
Desired behavior
A flag like --no-history or --clean that:
- Forks the session as usual (preserving context for the model)
- But does not render previous messages in the TUI
Workarounds attempted
- clear before launching Claude — TUI re-renders history
- --append-system-prompt — only affects Claude's output, not TUI rendering
- Dropping --fork-session entirely — clean screen but loses session knowledge
Proposed Solution
Add a flag like --clean or --no-history
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
We run a nightly cron job that resumes a base session (claude -r <id> -p "...") to re-read our project and update documentation. Each morning, developers start an interactive session by forking from that base session (claude -r <id> --fork-session).
The fork correctly inherits all context/knowledge, which is great. However, the old chat messages are rendered in the TUI, cluttering the screen.
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗