Amplifier Feature

Session Forking

Branch your conversations at any point.
Explore alternate approaches without losing your place.

Active
January 2026
The Problem

Conversations are linear.
Thinking isn't.

"What if..."
You're 20 turns in and wonder what would have happened with a different approach. Start over?
Exploration Anxiety
Afraid to try risky ideas because you might break the good work you've already done.
Lost Context
Starting a new session means re-explaining everything. The AI doesn't remember where you were.
What if conversations worked like git branches?
The Solution

Fork any session via parent_id

Create a child session linked to its parent.
The fork inherits all context, then diverges independently.

How It Works

Git-style branching for conversations

Turn 1: "Build a login system"
Turn 2: Discusses OAuth approach
Turn 3: Fork point
Turn 4: Implements OAuth
Original session
Turn 4: Tries JWT instead
Forked session (parent_id set)
Kernel Mechanism

~15 lines of kernel code

# amplifier_core/session.py (474 lines) class AmplifierSession: def __init__(self, config, loader=None, session_id=None, parent_id=None): self.session_id = session_id or str(uuid.uuid4()) self.parent_id = parent_id async def initialize(self): # Emit session:fork event if child session if self.parent_id: await self.coordinator.hooks.emit( "session:fork", {"parent": self.parent_id, "session_id": self.session_id})
Pure mechanism, zero policy. The kernel tracks lineage and emits events. How forked sessions are configured and used is app-layer policy.
Full Lineage

Every fork knows where it came from

Tracked in Every Event
parent_id — which session this forked from

session:fork — emitted on child init

session:fork:debug — includes mount plan

session:fork:raw — untruncated debug data
main-session (original) ├── Turn 1: Setup ├── Turn 2: Design ├── Turn 3: Implementation │ └── fork-abc123 (alt approach) │ └── Turn 4: Different path └── Turn 4: Original path
Agent Delegation

Sub-agents inherit context via forking

Context Control
context_depth — how much: none, recent, all

context_scope — which: conversation, agents, full

context_turns — number of recent turns to include
# Delegate spawns a child session # with parent_id = current session delegate( agent="foundation:explorer", context_depth="recent", context_scope="conversation", context_turns=5 )
session.spawn capability: The delegate tool creates child sessions with parent_id linking. Each sub-agent gets its own forked session with controlled context inheritance.
Use Cases

When to fork

A/B Testing Ideas
Try two different architectural approaches from the same starting point. Compare results.
"What if we used Redis instead?"
Safe Exploration
Fork before trying something risky. If it breaks, your original session is untouched.
"Let me experiment without fear"
Parallel Agents
Delegate to multiple agents simultaneously. Each gets a forked session with the context it needs.
"Research this while I keep working"
Under the Hood

How forking works

The Mental Model

Git for conversations

branch = fork
Create alternate timeline from any point via parent_id
log = lineage
Trace session:fork events to see the full tree of sessions
checkout = resume
Switch between sessions, pick up where you left off
Development

Development velocity

2
Repositories
~7
Related commits
474
Lines in session.py
amplifier-core • amplifier-foundation
Primary contributor: Brian Krabach (100% of fork/spawn commits found)
Sources

Research Methodology

Data as of: February 20, 2026

Feature status: Active (kernel mechanism, used by delegate tool)

Research performed:

Timeline: First fork commit 2025-10-14, latest related 2026-02-07

Gaps: PR count not verified via gh pr list. Exact dev days not calculated. Previous deck's "6 PRs / 4 days" removed as unverified.

Primary contributor: Brian Krabach (all 7 fork/spawn commits)

Branch your thinking.

Explore without fear. Every path is preserved.

# Create a child session child = AmplifierSession( config=child_config, parent_id=parent.session_id )
github.com/microsoft/amplifier-core
github.com/microsoft/amplifier-foundation
More Amplifier Stories