Piping a past Claude Code session into a new one
The feature nobody else has: `recall context <id> | claude` hands a full earlier conversation to a fresh Claude session as starting context. Here is the tactical guide.
The single most useful thing Claude Recall does is the one line nobody else can give you:
recall context 0f3c9a11 | claudeThat pipes a distilled version of an earlier Claude Code session into a fresh one as starting context. You get a new agent that already knows what the old one figured out, without pasting transcripts by hand, without copy-paste truncation, and without manually scrubbing tool JSON.
This post is the tactical guide to that command. When to use it, which flags matter, and what it deliberately leaves out.
The core command
recall context <session-uuid-or-alias>By default this emits a condensed markdown block: user prompts, assistant replies, decisions that were actually reached. Tool calls and their raw JSON are stripped. ANSI codes are stripped. System wrappers and telemetry records are skipped. What is left is a readable narrative that a fresh Claude can actually absorb inside its context window.
Pipe it into a new session and you are off:
recall context billing-webhook-retry | claudeAliases work everywhere a UUID does, which is why aliasing is worth the ten seconds it takes.
When to reach for --full
recall context 0f3c9a11 --full | claude--full keeps the tool calls and the tool results. You want this when:
- The decision hinges on a file Claude actually read and you need the new session to see the same snippet.
- You are debugging an agent loop and need to show the next run the exact tool invocations that went wrong.
- The session was short enough that full fidelity still fits in a context window.
--full blows up fast on long sessions. Default to condensed; escalate to full when you specifically need it.
Windowing with --since
Often you do not want the whole session. You want the last two hours of it, because that is where the current problem lives.
recall context 0f3c9a11 --since 2h | claude
recall context 0f3c9a11 --since 30m --full | claude
recall context 0f3c9a11 --since 2026-04-18 | claude--since accepts relative durations (30m, 2h, 7d) or ISO dates. It is interpreted against the session's own timestamps, so --since 2h means "the last two hours of that session", not "the last two hours of wall clock time".
Prelude: tell the new agent what you want
Raw context dumps without framing leave the new Claude confused about what you actually want it to do. --prelude prepends a short instruction:
recall context 0f3c9a11 \
--prelude "continue the billing migration; focus on the webhook retry path" \
| claudeThe prelude is just a leading user message. Keep it one or two sentences. It is the difference between "here is a wall of text" and "here is a wall of text and here is what I want you to do with it".
Subagent sessions
If the original session spawned subagents, they wrote their own JSONLs. By default recall context emits only the parent. Pass --subagents to include them inline, correctly interleaved:
recall context 0f3c9a11 --subagents | claudeYou want this when the real decision was made by a worker subagent, not the orchestrator. Most sessions do not need it. The ones that do need it always.
The web UI equivalent
If you live in the web UI, every session detail page has a "Copy as context" button. It runs the same pipeline and puts the result on your clipboard. The keyboard shortcut is listed on the shortcuts page. Convenient for the case where you are not at a terminal, which is rare, but happens.
What is stripped, on purpose
The condensed mode is opinionated. It removes:
- Raw tool-call JSON (the model does not need to see it re-run; a summary is enough).
- Tool results that exceeded a size threshold (they bloat context for little gain).
- ANSI escape codes from terminal output.
- Internal Claude Code system wrappers (the init record, compaction summaries, telemetry).
If you want any of that, use --full. If --full is too much, use --full --since 1h. The flags compose.
Common gotchas
- Session not aliased yet. Run
recall alias <uuid> "name"first. UUIDs are awful to type. - Context window overflow.
recall context --fullon a 6-hour session will not fit. Use--since. - The new Claude ignores the prelude. Put it first. The prelude is prepended; if the context is long, some models treat the trailing user message as the live question. Consider splitting: pipe context, then immediately send your real question as the next turn.
- Subagent output missing. Pass
--subagents.
When this changes the game
The moment you realize you can hand an agent six hours of earlier work in one command, your Claude usage reshapes. You stop trying to finish everything in one long session. You checkpoint: do the research in session A, then start session B with A piped in and fresh context window. The long-session compaction problem mostly dissolves.
Full flag reference on the CLI doc, and the web UI doc covers the copy-as-context button. Get started at /install.