[FEATURE] --continue should not fail when no session exists yet (fallback to new 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
For users who always launch Claude Code via --continue, the first interaction in a new repository becomes unnecessarily awkward:
- Run claude --continue
- Get an error because no session exists
- Run claude
- Send a throwaway message such as "hey"
- Exit
- Only now does claude --continue work
This creates unnecessary friction and encourages meaningless first messages whose only purpose is creating a session.
Proposed Solution
Other agent CLIs provide a smoother experience. For example, workflows like:
codex --resume latest
effectively behave as:
- resume the latest session if one exists
- otherwise start a new session
Users don’t need to care whether a previous session exists.
Proposed behavior
Change:
claude --continue
from: Resume latest session in current directory. If none exists, exit with error.
to: Resume latest session in current directory. If none exists, start a new session.
Alternative Solutions
_No response_
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
alias ccode='claude --continue --dangerously-skip-permissions'
now I can't use ccode for fresh repositories
Additional Context
Benefits
- Eliminates an unnecessary failure mode.
- Reduces user friction in new repositories.
- Removes the need for dummy first messages.
- Better matches user expectations for a “continue working” command.
- Saves model usage otherwise spent on meaningless bootstrap prompts.
From a UX perspective, “continue my work” is a valid request even when there is nothing to continue yet. The command should be idempotent and never require a throwaway prompt solely to bootstrap session state.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗