Session DNA: Cross-Agent Context Transfer
You started a feature in Cursor. Halfway through, you want to switch to Claude Code for a complex refactor. Without Nexus, you’d spend ten minutes re-explaining everything to the new agent.
Session DNA makes this a one-command operation.
What is Session DNA?
Session DNA is Nexus Prime’s context serialization format. It captures everything an agent knows about a task at a given moment:
- Active files and their current state
- Decisions made and rationale
- Patterns identified in the codebase
- Current worktree and branch state
- Memory entries written during the session
When you transfer a session, the receiving agent reads this DNA and picks up exactly where the previous agent left off.
How It Works
# In Cursor, mid-task
nexus-prime dna export --session cursor-session-123
# Switch to Claude Code
nexus-prime dna import cursor-session-123
# Claude Code now has full context
Under the hood, session DNA is a structured JSON blob stored in local SQLite. It’s not a prompt — it’s structured data that each agent’s Nexus adapter translates into its own context format.
Why Not Just Use Shared Memory?
Shared memory handles long-term context — architectural decisions, file conventions, past debugging patterns. Session DNA handles short-term context — what you’re working on right now, what decisions were made in the last hour.
The two are complementary. Session DNA reads from shared memory as part of its export, then imports it into the new agent’s working context.
Real-World Use Case
A common pattern we see:
- Use Cursor for fast iteration on UI components (Cursor’s autocomplete is fast)
- Switch to Claude Code for the complex state management logic (Claude’s reasoning is deeper)
- Handoff context with
nexus-prime dna transfer cursor → claude
No re-reading. No re-explaining. Full continuity.