When a user opens Claude Code in a project directory, they almost always want continuity with their last session there. The current design inverts this: every session starts fresh, and resuming requires an explicit --resume <uuid> flag. This treats continuity as exceptional when it should be the default.
Proposed change
claude with no flags resumes the most recent session for the current working directory
claude --new starts a fresh session explicitly
This mirrors the behavior of editors (restore last open files), terminals (restore history), and IDEs (restore workspace state). Claude Code is currently the odd one out by defaulting to amnesia.
The UUID friction illustrates the problem
When Claude Code quits, it displays a --resume <uuid> suggestion. If the user closes the terminal or starts a new session without noting that UUID, there is no obvious way to recover it — even though it is already persisted in local files:
~/.claude/history.jsonl — contains sessionId per entry with project path
~/.claude/projects/<project-path>/<uuid>.jsonl — the UUID is the filename itself
A user who wants to resume must have manually recorded a value the tooling already knows. This is avoidable friction that penalizes the common case.
Workaround (until fixed)
claude-resume () {
local prev_session=$(jq -r 'select(.project == env.PWD) | .sessionId' ~/.claude/history.jsonl | uniq | tail -2 | head -1)
if [[ -z "$prev_session" ]]; then
print -ru2 "claude-resume: no previous session found for $PWD"
return 1
fi
echo "Resuming session: $prev_session"
claude --resume "$prev_session"
}
When a user opens Claude Code in a project directory, they almost always want continuity with their last session there. The current design inverts this: every session starts fresh, and resuming requires an explicit
--resume <uuid>flag. This treats continuity as exceptional when it should be the default.Proposed change
claudewith no flags resumes the most recent session for the current working directoryclaude --newstarts a fresh session explicitlyThis mirrors the behavior of editors (restore last open files), terminals (restore history), and IDEs (restore workspace state). Claude Code is currently the odd one out by defaulting to amnesia.
The UUID friction illustrates the problem
When Claude Code quits, it displays a
--resume <uuid>suggestion. If the user closes the terminal or starts a new session without noting that UUID, there is no obvious way to recover it — even though it is already persisted in local files:~/.claude/history.jsonl— containssessionIdper entry with project path~/.claude/projects/<project-path>/<uuid>.jsonl— the UUID is the filename itselfA user who wants to resume must have manually recorded a value the tooling already knows. This is avoidable friction that penalizes the common case.
Workaround (until fixed)