Before you stop an AI coding session, capture seven things: the goal, current state, decisions already made, changed files, open risks, validation status, and the exact next prompt. The packet should be short enough to read in one minute and specific enough that a new session can continue without guessing.
The Hidden Cost of Restarting Cold
AI tools are good at entering a codebase quickly, but they are not magic memory. When a session gets interrupted, compressed, or handed to another tool, the important reasoning can disappear into a long transcript: why one approach was rejected, which file is intentionally untouched, which test is still failing, and what the human has already approved.
Starting again without that context creates a familiar loop. The assistant rereads the same files, proposes an approach you already rejected, changes the wrong boundary, or "fixes" a partial diff by widening the scope. It is not laziness. It is missing state.
A resume packet is the antidote. It is a small note written for the next session, not a diary of the old one. Its job is to preserve decision state, not every detail.
The Seven Fields That Matter
- Goal: the single outcome this session was trying to ship.
- Current state: what is done, what is half-done, and what is not started.
- Decisions: choices already made, including rejected approaches.
- Changed files: the files touched and what each change is meant to do.
- Open risks: uncertainty, edge cases, missing context, or likely regressions.
- Validation: commands run, manual checks done, failures still present.
- Next prompt: the first instruction the next AI session should receive.
The value is not in the formatting. The value is in making the unfinished work explicit. If a field is empty, that is useful too. "No validation run yet" is much better than silently implying that the diff is safe.
Keep the packet close to the work. For a short task, it can live in the chat. For a longer task, put it in an issue comment, PR description, scratch note, or project log. The format matters less than whether the next person or model can find it before touching code.
A Copy-Paste Prompt
"Before we stop, write a session resume packet. Include: goal, current state, decisions made, changed files, open risks, validation status, and the exact next prompt. Keep it concise. Do not invent completed work or hide failed checks."
That last sentence is important. AI has a habit of smoothing the story when it summarizes. You want a packet that is accurate, not flattering. Failed commands, uncertain assumptions, and "not checked yet" notes are part of the handoff.
What a Good Packet Looks Like
Imagine you asked AI to add password reset telemetry, but the session ended after the implementation and before final validation. A useful packet might look like this:
Goal: add telemetry for password reset request and completion events without changing auth behavior. Current state: events are emitted from the reset request route and reset completion route. Decisions: use existing analytics helper; do not add a new dependency; do not log email addresses. Changed files: auth.routes.ts emits events, analytics.ts adds event names, auth.test.ts adds two assertions. Open risks: completion event may double-fire if retry logic repeats the request. Validation: unit tests pass for auth route; no manual staging check yet. Next prompt: review the diff for PII leakage and double-emission risk, then suggest the smallest validation step.
Notice what it does not include. It does not paste the whole diff. It does not recap every prompt. It does not claim production readiness. It tells the next session where to look, what to protect, and what remains unproven.
Capture Decisions, Not Just Files
File lists are useful, but they are not enough. The most expensive thing to lose is usually the reasoning behind the current shape of the change.
If you rejected a schema migration, write that down. If you chose a local fix over a shared utility change, write that down. If the product owner said the empty state copy must stay unchanged, write that down. Otherwise, the next assistant may "improve" the work by undoing the constraints that made it safe.
Decision Notes Worth Keeping
- Rejected paths: "Do not move this into middleware; it affected unrelated routes."
- Scope boundaries: "This task only covers display behavior, not API response shape."
- Human approvals: "The fallback copy was approved; do not rewrite it casually."
- Known tradeoffs: "We accepted a small duplicate check to avoid a larger refactor."
- Missing facts: "Need staging env value before validating webhook behavior."
The Changed-Files Section Should Explain Intent
A bare list like src/api.ts, src/form.tsx, tests/form.test.ts is only marginally better than nothing. The next session needs to know why those files changed.
src/api.ts: adds retry classification for 429 responses; should not change response parsing.src/form.tsx: preserves typed input after a recoverable submit error.tests/form.test.ts: covers retryable error state and confirms validation errors still clear on edit.
Those one-line intentions make review easier. If the diff changes response parsing, the packet tells you that something drifted. If the test only covers the happy path, the packet exposes the gap.
Validation Status Must Be Boringly Honest
The validation section is where summaries often get too polished. Avoid vague phrases like "mostly done" or "should work." Use plain status instead.
- Run:
npm test -- authpassed. - Run:
npm run lintfailed on pre-existing warnings in unrelated files. - Not run: browser checkout flow, because the dev server was not started.
- Still failing: duplicate-email test fails with old error copy.
- Manual check: reset form keeps the email after server error in Chrome desktop.
That kind of note is wonderfully unglamorous. It gives the next session a reliable starting point. More importantly, it prevents the next assistant from treating an unvalidated patch as finished work.
The Next Prompt Is Part of the Artifact
A resume packet should end with the first instruction for the next session. This is not theater. It controls the re-entry angle.
Without a next prompt, the assistant may choose the most obvious task, which is often "continue coding." But the right next step might be review, validation, a narrower investigation, or asking the human for a missing decision.
Good Next Prompts
- "Review the current diff against the stated goal before editing anything."
- "Run the validation command first and only fix failures related to this task."
- "Check whether this changed public API behavior; do not refactor yet."
- "Read the changed files and tell me whether the open risk is real."
- "Ask for the missing product decision before implementing the fallback."
When to Write One
You do not need a formal packet for every typo fix. Use one when the work has enough state that losing it would cause rework or risk.
The task crosses files, touches auth, data, billing, deployment, tests, migrations, product copy, shared components, or anything that might continue in another session. Also use one before switching tools or asking a different AI assistant to review the same work.
For small tasks, a three-line version is enough: goal, current state, next step. The habit matters more than the ceremony.
Resume Packets Make AI Less Forgetful
The point is not to make AI remember everything. The point is to stop depending on memory in the first place. A good packet externalizes the session state: what we are doing, why we chose this path, what changed, what remains risky, and how to continue without widening the work by accident.
That makes long AI-assisted work calmer. You can pause without losing the thread. You can hand off without replaying the whole conversation. You can ask a new model to review the work without letting it reinvent the task.
Pair this with The AI Plan Before Code, The AI Bug Report That Actually Helps, Why Small Diffs Win With AI, and How to Hand Off a Vibe-Coded App to a Developer.