Cookbook/Resuming Previous Claude Code Conversations
getting started
5 min

Resuming Previous Claude Code Conversations

sessions
continuity
basics

Resuming Previous Claude Code Conversations

What You'll Learn

Learn how to resume previous Claude Code sessions using the --resume flag, allowing you to continue work where you left off.

Prerequisites

  • Claude Code CLI installed
  • Previous Claude Code sessions to resume

Steps

Step 1: List Available Sessions

Start Claude with the --resume flag without specifying a session ID to see available sessions:

claude --resume

Claude will display a list of recent conversations you can resume, showing:

  • Session IDs
  • Creation dates
  • Brief context from each session

Step 2: Select a Session Interactively

From the list displayed, choose the session you want to resume by:

  • Using arrow keys to navigate
  • Pressing Enter to select
  • Or typing the number corresponding to the session

Step 3: Resume a Specific Session Directly

If you know the session ID, you can resume directly:

claude --resume abc123

Replace abc123 with your actual session ID.

Step 4: Continue with Additional Commands

You can also provide a new prompt when resuming:

claude --resume abc123 "continue working on the authentication feature"

Example Usage

Interactive Resume

# Show list of sessions and select interactively
claude --resume

# Output example:
# Recent sessions:
# 1. [2025-07-05] Session ID: xyz789 - Working on React components
# 2. [2025-07-04] Session ID: abc123 - Database migration scripts
# 3. [2025-07-04] Session ID: def456 - API endpoint development
# 
# Select a session (1-3):

Direct Resume with Command

# Resume specific session with new instructions
claude --resume xyz789 "add unit tests for the Button component"

Tips & Variations

  • Session Management: Claude stores session data in the .claude/ directory of your project
  • Cross-Directory Resume: You can resume sessions from different directories if you have the session ID
  • Combine with Other Flags: Use --resume with other flags like --model or --add-dir

Troubleshooting

  • Issue: Session not found Solution: Ensure you're using the correct session ID and that the session data still exists

  • Issue: Can't see session list Solution: Check that you have previous sessions in your .claude/ directory

  • Issue: Session context seems incomplete Solution: The session may have been too old or the context files may have been modified

Important Notes

  • Session data is stored locally in your project's .claude/ directory
  • Sessions are project-specific unless you're using global sessions
  • Very old sessions may have degraded context quality
  • The --resume flag is different from --continue which continues the most recent interaction

References

Master Claude Code with Expert Training

These recipes are from our comprehensive 2-day training course. Learn directly from experts and transform your development workflow.