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
- Full conversation history
- Context and token usage
- Session statistics
- Model selection
- Configuration settings
Interactive Session Picker
Without a session ID, open the picker:Continue Most Recent Session
Use--continue for the latest session:
Session Storage
Where Sessions Are Saved
Sessions are stored in: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
Use Named Sessions
Use Named Sessions
Create meaningful session IDs:
Resume Recent Sessions
Resume Recent Sessions
For continuity, resume recent work:
Session Per Feature
Session Per Feature
Organize by feature or task:
Clean Up Periodically
Clean Up Periodically
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
-
Check session ID:
-
Use session picker:
-
Verify project directory:
No Sessions Available
- No sessions created yet
- Chat recording disabled
- Sessions deleted or expired
Corrupted Session
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
