- In short
- Summary injection for fresh sessions is the practice of distilling a prior session into a short structured brief, findings, decisions, open questions, files touched, and the next step, and seeding it into the initial context of a brand-new session. It delivers continuity without re-importing the stale tool results and noise that make a long resume unreliable.
What summary injection for fresh sessions means
Summary injection for fresh sessions is the deliberate art of leaving a transcript behind while keeping its value. When a session has grown too long or its tool results have gone stale, reopening it is a liability, as covered in the stale context problem. The alternative is not to lose your work; it is to distil the session into a compact, structured brief and seed that brief into the opening context of a clean session. You discard the noise and carry only the signal.
The Agent SDK documentation endorses this directly. Rather than relying on session resume, it advises capturing the results you actually need, the analysis, the decisions, the diffs, as application state and passing them into a fresh session's prompt, calling this often more robust than shipping transcript files around. This knowledge point sits at the apply Bloom level for a reason: you are expected to actually construct a good brief, not merely recognise that one exists.
- Summary injection
- Seeding a brand-new session with a hand-written, structured summary of a prior session, so the agent continues with the essential context but without the stale or bloated history. It is a controlled handoff of signal rather than a replay of everything.
How to build a brief worth injecting
A useful brief has shape. Dumping a paragraph of recollection is better than nothing, but the version that performs has named sections the agent can rely on:
- Findings, what the prior session established about the system, stated as conclusions rather than a play-by-play.
- Decisions, the choices already made and the reasons, so the new session does not relitigate settled questions.
- Open questions, what is still undecided or unverified, which keeps the agent honest about boundaries.
- Files touched, the concrete surface area, so the new session knows where the work lives.
- Next step, the single immediate action, which orients the very first turn.
The discipline is selection. Anthropic's context-engineering guidance frames the entire goal as finding the smallest set of high-signal tokens that maximise the likelihood of the outcome you want, and warns that overly aggressive compaction can drop subtle but critical detail. A good brief lives in that tension: short enough to avoid re-polluting the context, complete enough that nothing load-bearing is lost. Writing one is a skill you practise, which is why this knowledge point is apply rather than understand.
What to leave out, and why
The most common way to get summary injection wrong is to inject too much. Pasting the entire prior transcript, or the raw output of every tool call, re-imports exactly the bloat and staleness you were trying to escape, and the model is once again left to hunt for the decisions that matter inside a wall of low-value text. Verbose raw output is the enemy of a clean restart. The brief should read like an executive handoff, not a log file: conclusions, not keystrokes.
It is worth distinguishing this from /compact, which can look similar. Compaction is an in-session mechanism that automatically replaces history with a summary when the context window fills, and it is valuable, but it runs on the model's terms inside the same thread. Summary injection is the manual, deliberate counterpart: you decide what survives, you write it, and you place it into a fresh thread you control. When precision about what carries forward matters, the hand-authored brief wins because you, not an automatic summariser, choose the high-signal tokens.
A template you can reuse
Because this is an apply-level skill, it helps to carry a concrete template into the exam and into practice. A brief that performs reads roughly like this, in five labelled parts. Findings: "the flaky test traces to a timing race, not the network." Decisions: "we will add an idempotency key at the gateway, chosen over a database lock because of contention risk." Open questions: "the migration path for in-flight requests is unverified." Files touched: "gateway handler, retry middleware, two tests." Next step: "write the migration, then the feature flag." Notice that every line is a conclusion or an instruction, never a transcript fragment. Anyone, human or agent, can read it in fifteen seconds and know exactly where the work stands. That readability is the whole goal; if a section needs a paragraph to make sense, it is probably carrying detail that belongs in a file rather than in the brief.
Why injection beats resume across machines and CI
Summary injection is not only a remedy for stale or bloated sessions; it is also the robust way to move work across boundaries. Session files live on the machine that created them, keyed by working directory, so resuming on a different host, a CI worker, an ephemeral container, or a serverless function, is fragile: the file may not be there, and the working directory must match exactly. The Agent SDK spells out the more durable alternative directly, advising that rather than shipping transcript files around, you capture the results you need as application state and pass them into a fresh session's prompt. That is summary injection by another name. In a continuous-integration pipeline, where each run starts in a clean environment, injecting a compact brief is often the only sane way to give a new run the context of a previous one.
Pairing injection with persistent notes
The technique compounds with a habit from context engineering: structured note-taking. Anthropic describes agents that regularly write notes to durable memory outside the context window, so that critical findings survive even when the live conversation is reset. If an agent has been keeping such notes throughout a long task, writing the injection brief becomes almost mechanical, because the notes already hold the findings, decisions, and open questions in one place. This is the same instinct behind keeping scratchpad files for important results, and it turns summary injection from a scramble at the end of a session into a clean read off an external record. The two practices together, durable notes during the work and a curated brief at the handoff, are how long-running agent tasks stay coherent without ever leaning on a fragile resume.
How much to keep is the whole craft
The hardest part of a brief is deciding how much to leave out. Keep too little and the new session relitigates settled decisions or repeats a discarded hypothesis; keep too much and you have simply rebuilt the bloated transcript you were trying to escape. The guiding rule from context engineering is to aim for the smallest set of high-signal tokens that still makes the desired outcome likely, and to treat aggressive trimming with respect, because a single dropped constraint can send the next session down a wrong path. In practice this means erring toward including decisions and their reasons even when they feel obvious, while ruthlessly cutting raw output, narration, and abandoned detours. The signal lives in the conclusions; the noise lives in the journey to them.
Why this matters for the exam
Within Task Statement 1.7, summary injection is the constructive skill, the thing you do once you have decided a session is no longer worth resuming. In Scenario 4, Developer Productivity with Claude, an exam prompt may describe a long, degraded session and ask what to carry into a fresh one. The strongest answer is always a structured summary of findings, decisions, open questions, and next steps; the classic distractor is the full raw transcript, which sounds thorough but reintroduces the problem. The exam is checking whether you can apply the technique with judgment, choosing signal over volume.
This skill also rhymes with patterns from Domain 5. The idea of writing durable notes outside the live context appears in scratchpad files for persistent findings, and the failure mode of summarising too aggressively is the subject of the progressive summarisation trap. Summary injection is where those context-management instincts meet session management.
Worked example
An engineer ends a sprawling four-hour session and needs to continue tomorrow in a clean one.
After four hours, a session investigating a flaky payment flow has ballooned: dozens of file reads, several abandoned hypotheses, and a context window thick with old tool output. Resuming tomorrow would drag all of that back in. So the engineer writes a brief instead.
The findings section records that the flakiness traces to a race between the retry handler and the idempotency check, not to the network as first suspected. The decisions section notes that they will add an idempotency key at the gateway, chosen over a database lock because legal flagged lock contention risk. The open questions section flags that the migration path for in-flight requests is unverified. Files touched lists the gateway handler, the retry middleware, and two tests. The next step is a single line: write the idempotency-key migration, then a feature flag.
The next morning the engineer opens a fresh session and pastes this brief as the opening message. The agent starts with a crisp, accurate picture, no stale reads, no abandoned hypotheses, and proceeds straight to the migration. Had the engineer instead pasted the full transcript, the agent would have re-encountered the discarded network hypothesis and the outdated file snapshots, and the clean restart would have been clean in name only.
Common misreadings to avoid
Misconception
A good session summary just pastes the full prior transcript or the raw tool output into the new session.
What's actually true
Misconception
Summary injection and the /compact command are the same thing.
What's actually true
A long Claude Code session has degraded, with stale reads and bloated output, and a developer wants to continue the work in a fresh session without losing the important context. What is the best thing to inject into the new session?
People also ask
How do you write a session brief for Claude?
Is starting fresh better than resuming a long session?
What should a session summary include?
Watch and learn
Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.
Context Management in Claude Code
Why watch: Official source showing how /compact replaces raw history with a structured summary, the core mechanism behind injecting prior findings into a fresh session.
More videos for this concept
References & primary sources
Master this concept with Archie
Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.