Skip to main content

Overview

The --resume (or -r) option allows you to resume a previous Qwen Code session, continuing where you left off with full conversation history intact. This is useful for long-running projects, multi-day tasks, or picking up interrupted work.

Syntax

Basic Usage

Resume Specific Session

This restores:
  • Full conversation history
  • Context and token usage
  • Session statistics
  • Model selection
  • Configuration settings

Interactive Session Picker

Without a session ID, open the picker:
Displays:

Continue Most Recent Session

Use --continue for the latest session:

Session Storage

Where Sessions Are Saved

Sessions are stored in:
Each project (by directory path) has its own session storage.

Session Data

Each session stores:
  • Conversation history (messages)
  • Model configuration
  • Token usage statistics
  • Tool call history
  • Session metadata (start time, duration)
  • Project context

Session File Format

Use Cases

Multi-Day Projects

Interrupted Work

Context Preservation

Project Continuity

Finding Session IDs

View in Current Session

List All Sessions

Session Naming

Use custom session IDs:

Resume with Options

Resume with Different Model

Resume in YOLO Mode

Resume with Prompt

Resume in Headless Mode

Session Management

Delete Old Sessions

Export Session

Import Session

Clear Session History

Best Practices

Create meaningful session IDs:
For continuity, resume recent work:
Organize by feature or task:
Remove old sessions:

Session Limitations

Context Window

Resumed sessions still have token limits:

File Changes

Sessions don’t track external file changes:

Model Availability

Resumed sessions might use different model if original unavailable:

Troubleshooting

Session Not Found

Solutions:
  1. Check session ID:
  2. Use session picker:
  3. Verify project directory:

No Sessions Available

Causes:
  • No sessions created yet
  • Chat recording disabled
  • Sessions deleted or expired
Solution:

Corrupted Session

Solution:

Advanced Usage

Session Migration

Session Analytics

Automated Resume

See Also

--continue Option

Quick resume of most recent session

--session-id Option

Create custom session identifiers

Session Management

Complete guide to sessions

Context Management

Managing conversation context