Resume
aichat resume lets you continue sessions with
lineage-based chaining for better control than
compaction alone. Compaction preserves full history on
disk but reduces the active API context to a lossy
summary. With aichat resume, you get a fresh session
that links back to every ancestor with explicit lineage
pointers and tools to recover any detail on demand.
Resume strategies
Section titled “Resume strategies”When you resume a session, you choose one of these strategies:
| Strategy | What it does | When to use |
|---|---|---|
| Resume as-is | Open the session directly with claude --resume | Still have context headroom |
| Clone | Copy session file, resume the clone | Want a safety copy first |
| Trim | Truncate bloated tool outputs and early messages | Quick fix, frees 30-50% |
| Smart trim | AI decides what is safe to cut | Surgical precision needed |
| Rollover | Fresh session with lineage pointers | Clean slate, full history preserved |
Rollover is the most frequently used strategy. See Rollover Details for a deep dive on how it works.
Three ways to access the resume options
Section titled “Three ways to access the resume options”While inside a Claude Code session, when you are close to filling up context, type:
>resume(Or >continue, >handoff — the > prefix is
required.)
This triggers a UserPromptSubmit hook that
blocks handling by Claude Code (no further tokens
consumed), copies the current session ID to your
clipboard, and shows instructions to quit and run
aichat resume <paste>.
Requires the aichat
plugin.
Run aichat search, select a session, then choose
a resume action from the menu:
aichat search "my topic"See the Search page for details.
Use the resume subcommand directly:
# Resume the latest session for this projectaichat resume
# Resume a specific session by IDaichat resume abc123-def456CLI usage
Section titled “CLI usage”# Auto-find latest session for current project/branchaichat resume
# Resume a specific session (opens resume menu)aichat resume <session_id>The resume menu presents the strategy options listed above. Pick one and the tool handles cloning, trimming, or rollover automatically.
Rollover options
Section titled “Rollover options”The rollover subcommand gives direct access to
rollover with more control:
# Interactive rollover (shows lineage, pick options)aichat rollover
# Quick rollover -- lineage only, no summarizationaichat rollover abc123 --quick
# Rollover with custom context-extraction promptaichat rollover abc123 -p "Focus on the auth changes"Related commands
Section titled “Related commands”| Command | Description |
|---|---|
aichat lineage [session] | Show the parent lineage chain |
aichat trim [session] | Trim session (interactive or direct) |
aichat rollover [session] | Rollover to fresh session |
aichat clone [session] | Clone a session file |
How lineage works
Section titled “How lineage works”Every resumed session carries metadata linking it back to its parent:
{ "continue_metadata": { "parent_session_file": "/path/to/parent.jsonl", "parent_session_id": "abc123-...", "continued_at": "2025-12-19T..." }}This creates a linked chain that the agent can traverse to recover any prior context. For the full technical details, see Rollover Details.