[BUG] '- c' flag silently starts new session when no prior session resolves instead of erroring
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 \claude - c\ is passed but no prior session can be found — or the flag is mistyped (e.g. \claude - c\ with a space) — Claude Code silently starts a new session. The user has no indication anything went wrong.\n\n## Expected behavior\n\nExit with a clear error: \error: --continue specified but no previous session found\.\n\n## Why it matters\n\nSilent fallback to a new session causes data loss (the user loses their conversation context) with no warning.
What Should Happen?
Claude should create an error for unknown flag, i.e. "- c". and ask to confirm.
Error Messages/Logs
Steps to Reproduce
claude - c
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.212 (claude code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
I shouldn't have to use github. my claude should be able to directly report to you the issues I flag.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗