Guide Overview
After this guide, you’ll be able to:- Fork contexts to explore different flows
- Rollback when things go wrong
- Create safe copies for experimentation
Why Fork & Clone contexts?
We’ve all been there. You had a great conversation with Claude. It finally gets your codebase, the problem, the constraints. Then the conversation gets too long. It starts forgetting. Contradicting itself. You want to scream. What if you could capture that perfect moment? Fork right when the LLM still has all the context. Branch in new directions while keeping the original intact. Freedom to explore. Always being able to come back. Here is where UltraContext comes in.Forking
Create a copy of an existing context:In Python, use
from_ (with underscore) since from is a reserved keyword.create() without from creates a new empty context.
The version, before, and at params require from.By Version
Gets exact state after that update or delete.By Timestamp
Gets state at that moment (finds version + filters messages).By Index
Gets first N messages (indices 0 toat).
Using metadata to find index
Find a checkpoint marked with metadata, then fork up to that point:Combine All
When using
version and before together, version selects the base state, then before filters messages within that version.