[BUG] `--fork-session` flag ignored when using `--resume` with TUI session picker
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When using claude --resume --fork-session without specifying a session ID, the interactive TUI picker opens as expected. However, after selecting a session from the picker, the session is resumed directly instead of being forked. The --fork-session flag is silently ignored.
What Should Happen?
When --fork-session is passed alongside --resume, selecting a session from the TUI picker should create a fork of that session (new session ID, preserving conversation history) rather than resuming the original session directly.
Error Messages/Logs
No error messages - the flag is silently ignored. The session resumes with the original session ID instead of creating a new forked session.
Steps to Reproduce
- Have at least one existing session (run
claudeand have a conversation, then exit) - Run
claude --resume --fork-session - TUI picker appears - select a session
- Check
/status- the session ID is the same as the original session, not a new forked session
Expected: New session ID (fork created) Actual: Same session ID (resumed directly, fork flag ignored)
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Workaround: Specify the session ID explicitly:
claude --resume <session-id> --fork-session
This works correctly and creates a fork. The bug only occurs when the TUI picker is used (no session ID specified).
Experiencing this issue as well.
But even worse, claude --resume <session-id> --fork-session also does not work for me. It does not create a new session.
Version: 2.0.76
Done! Fix going out with the next release:
claude --resume --fork-session
@bcherny I actually had Claude Code build a temporary picker while the fix was being rolled out.
The thing I love the absolute most about Claude Code implementation is that the primitives are exposed (like ~/.claude/projects)
Therefore I can use Claude Code itself to build bug workarounds or customize Claude Code capabilities by building on top (yes I know that it's unstable API to build on, upkeep cost is acceptable - just don't close it out)
Please keep this, this is so so valuable
Is there a way to fork a session until this is fixed?
Is there a way to fork a session until this is fixed?
I use https://github.com/Elijas/claude-fork-picker