← Blog
explainx / blog

How to Continue Previous Chats in Claude Code: --continue and --resume Flags

Learn how to resume previous conversations in Claude Code using the -c/--continue and -r/--resume flags. Never lose context again—pick up exactly where you left off with any past session.

6 min readYash Thakker
Claude CodeDeveloper ToolsAI AgentsProductivityAnthropic

MDX restores the committed source plus an HTML comment attribution; plain text bundles the rendered markdown body with the explainx.ai attribution footer.

How to Continue Previous Chats in Claude Code: --continue and --resume Flags

One of the most underused features of Claude Code is the ability to resume previous conversations. By default, every time you open Claude Code it starts a fresh session with no memory of what you discussed yesterday. But with two simple flags—--continue and --resume—you can instantly reload any past conversation and continue right where you left off.

This guide covers everything you need to know: the exact flags, when to use each one, real-world workflows, and a few power-user tricks.

The Core Problem: Context Doesn't Survive Between Sessions

When you close Claude Code, the active session is saved to disk—but the next time you run claude, you get a blank slate. That means:

  • Re-explaining your project structure at the start of each session
  • Retyping the same architectural decisions you already discussed
  • Losing track of half-finished refactors you started yesterday
  • Starting debugging from zero even though you already narrowed down the root cause

Claude Code solves this with session persistence. Every conversation is saved automatically. The --continue and --resume flags are how you get back into those saved sessions.

The Two Flags You Need to Know

--continue / -c: Jump Into Your Last Session

claude --continue
# or the short form:
claude -c

This is the flag you'll use 90% of the time. It does exactly one thing: loads the most recent conversation from your current directory and drops you back into it.

No prompts. No pickers. No session IDs to remember. Just run it and continue.

When to use it:

  • You're working in the same project directory across multiple sessions
  • You want to resume "right now" without any friction
  • You finished for the day and want to pick up tomorrow morning

Example workflow:

# Monday evening — you got halfway through a feature
cd ~/projects/my-app
claude -c

# Claude immediately knows:
# - You're building a payment integration
# - You already set up Stripe webhooks
# - The next step was to write the success/failure handlers
# No re-explaining needed

--resume / -r: Pick Any Past Session

claude --resume
# or the short form:
claude -r

Without any arguments, --resume opens an interactive session picker—a scrollable list of every saved conversation. Each entry shows:

  • The session name (or an auto-generated summary)
  • The date and time it was last active
  • The directory it belongs to
  • A short preview of what was discussed

Navigate with arrow keys, press Enter to load a session.

You can also pass a session ID directly:

claude --resume abc123de-f456-7890-abcd-ef1234567890

This skips the picker entirely and loads that specific session.

When to use it:

  • You want to return to a session from a different project or directory
  • You have multiple ongoing features and need to switch between them
  • You want to revisit a conversation from last week for reference

Quick Reference

GoalCommand
Continue most recent sessionclaude -c
Pick from all past sessionsclaude -r
Resume a specific session by IDclaude -r <session-id>
Continue non-interactively with a promptclaude -c -p "your next instruction"
Fork a session (preserve original)claude -c --fork-session
Name a session for easy retrievalclaude -n "payment-integration"
Live Bootcamp6 weeks

Complete AI Builder Bootcamp

Claude, Python automation & full-stack — 12 live sessions with Yash Thakker.

View bootcamp

The Complete AI Builder Bootcamp is the best AI development course for learning Claude AI, prompt engineering, Python automation, and full-stack web development. This intensive 6-week live bootcamp teaches you how to build AI-powered applications using Claude Projects, Claude Artifacts, Claude Code, and the complete Claude ecosystem. You'll master prompt engineering techniques, learn to create custom Claude connectors and MCP integrations, build Python automation workflows, develop full-stack websites with AI assistance, and create AI marketing agents.

The bootcamp includes 12 live Zoom sessions with Yash Thakker, founder of AISOLO Technologies and instructor to 350,000+ students. You'll build 8+ portfolio projects including AI playbooks, full-stack note-taking applications, Python automation scripts, marketing agents, and personal portfolio websites. The curriculum covers AI fundamentals, Claude Projects and Artifacts, Claude Co-work, Claude plugins and skills, Claude Code for Python development, full-stack development, AI marketing, and capstone projects.

Students receive 1-year access to all recordings, permanent Discord community access, a certificate of completion, and personalized career guidance. All enrollments include a 7-day money-back guarantee. This is the most comprehensive Claude AI bootcamp available, taking students from zero AI knowledge to expert AI builder in 6 weeks.

Real-World Workflows

Workflow 1: The Daily Standup Pattern

Many developers now start their morning with a single command:

claude -c

Claude reloads your last session and you can immediately ask:

Where did we leave off? What was the next step?

Claude will summarize exactly where the conversation ended and what the next action was—effectively acting as a personal standup note.

Workflow 2: Parallel Feature Work

When you're working on multiple features simultaneously, name your sessions for easy navigation:

# Start the auth feature session
cd ~/projects/my-app
claude -n "auth-refactor"

# Start the payment feature session (separate session)
claude -n "payments-v2"

# Later, resume the auth work
claude -r
# Select "auth-refactor" from the picker

Session names show up in the picker, making it trivial to find the right one.

Workflow 3: Non-Interactive Continuation (Scripts & CI)

You can continue a session without entering interactive mode using --print / -p:

# Continue the last session and run a one-shot prompt
claude -c -p "run the test suite and summarize failures"

# Resume a specific session and ask a question
claude -r abc123de -p "what dependencies did we decide to upgrade?"

This is useful for automating follow-up steps after a human-approved session, or for running quick follow-up queries in scripts.

Workflow 4: Forking a Session

Sometimes you want to explore an alternative approach without losing your original conversation thread. Use --fork-session:

# Fork your current session before trying a risky refactor
claude -c --fork-session

This creates a new session ID branching from the current state. The original session is preserved exactly as it was. If the experiment fails, you can go back to the original with claude -r and pick the un-forked version.

The /resume Command Inside Claude Code

You don't have to exit Claude Code to switch sessions. Inside an active session, you can type:

/resume

This opens the same interactive picker from within the conversation. Select any past session and Claude will load it inline—effectively letting you "jump" between conversation histories without restarting the CLI.

How Sessions Are Saved

Claude Code automatically persists sessions to disk. A few things worth knowing:

  • Sessions are scoped to directories by default—--continue loads the most recent session for your current directory
  • Sessions are saved even if you Ctrl+C out of Claude Code mid-conversation
  • The --no-session-persistence flag disables saving (useful for one-off exploratory sessions you don't want cluttering the picker)
  • Session files are stored in ~/.claude/sessions/ (you can inspect or back them up from there)

Combining Session Resume with CLAUDE.md

Session resumption and CLAUDE.md work together as complementary memory systems:

LayerWhat it storesScope
CLAUDE.mdProject conventions, stack, commands, architectureEvery session in this project
Session (-c / -r)The actual conversation history and in-progress workOnly the resumed session

The ideal setup: use CLAUDE.md for stable, project-wide context (stack, conventions, architecture decisions) and session resumption for the active thread of work (the current feature, the ongoing debug session, the in-progress refactor).

When you resume a session, Claude loads both the conversation history and the CLAUDE.md file—giving you full context with zero re-explaining.

Common Mistakes to Avoid

Mistake 1: Running claude without -c by habit

If you're used to just typing claude, muscle memory will give you a fresh session. Make -c your default when continuing work:

# Add to your shell profile for convenience
alias cc="claude -c"

Mistake 2: Forgetting that --continue is directory-scoped

If you move to a different directory and run claude -c, it will try to find the most recent session for that directory—not your most recent session globally. Use claude -r to find sessions across all directories.

Mistake 3: Not naming long-running sessions

For any session that's going to span multiple days, use -n when starting it:

claude -n "q3-performance-optimization"

Otherwise it gets an auto-generated name that's hard to spot in the picker later.

Mistake 4: Using --no-session-persistence unintentionally

If someone shared a script that includes --no-session-persistence, sessions from those runs won't be saved. Don't use this flag unless you genuinely want throw-away sessions.

Checking Session History

To see all your saved sessions without starting one, just run:

claude -r

Browse the picker, then press Ctrl+C or q to exit without loading anything. It's a quick way to review what you've been working on across projects.

Summary

FlagShortWhat it does
--continue-cLoads the most recent session in the current directory
--resume [id]-r [id]Opens an interactive picker, or loads a session by ID
--fork-sessionCreates a new session branching from the resumed one
--name <name>-n <name>Names the session for easy retrieval later
/resumeIn-session command to switch to another past session

The combination of --continue for daily flow and --resume for targeted session retrieval eliminates the biggest source of friction in long-running Claude Code workflows: having to re-explain context you've already established.

Start tomorrow's session with claude -c and notice the difference immediately.

Related posts