Use Cases
- Experimentation: Try different approaches without affecting the original conversation
- Checkpointing: Save progress at key decision points
- Branching workflows: Explore parallel conversation paths from a common starting point
- Template sessions: Reuse successful session patterns
Basic Usage
Async Python SDK
What Gets Copied
When you copy a session, the following are duplicated:- Messages: All messages with preserved parent-child relationships
- Tasks: All tasks with their order, status, and data
- Configurations: Session configs and settings
- User association: The copied session belongs to the same project
What Doesn’t Get Copied
- Asset files: S3 assets are shared (not duplicated) between sessions for efficiency
- Message processing status: Copied messages are marked as “pending” for reprocessing
- Task-message links: These are cleared and will be reassigned by the core service
Independence
The copied session is completely independent:- Changes to the original session don’t affect the copy
- Changes to the copy don’t affect the original
- Each session can have different messages, tasks, and configs going forward
Limitations
Size Limit
Sessions with more than 5,000 messages cannot be copied synchronously. You’ll receive an error:Error Handling
Common Patterns
Experiment and Compare
Copy a session to try different approaches, then compare results:Checkpoint Before Major Changes
Create a checkpoint before making significant changes:Template Sessions
Create a base session as a template and copy it for each new conversation:Performance
Copy operations typically complete in:- < 1 second: Sessions with < 100 messages
- < 3 seconds: Sessions with < 1000 messages
- < 5 seconds: Sessions with < 5000 messages