Answers

The session died. Two hours of decisions died with it.

A crash, a restart, a closed terminal. What you lose is not the code. It is everything that was decided while the code was being written.

Last updated

Your files are fine. The conversation is what died, and the conversation is where the reasoning lived: what you tried, what you rejected, what half of the feature was still missing.

Resume does not bring that back reliably, and it is not meant to. Sessions are independent by design. So the answer is to stop keeping the state of the work inside a conversation, and start keeping it somewhere a crash cannot reach.

Below: what people actually lose, why the tool behaves this way, and the three things worth writing down outside the chat.

It is not just you

"A multi-hour or multi-day session worth of context, file contents read, architectural decisions, in-progress work state, is irrecoverable."

claude-code issue #43696, titled "Session context lost: --continue and --resume do not restore prior conversation context". Closed as duplicate, which means it keeps being reported.

"/resume only recovers 20-40% of the conversation."

claude-code issue #23800, titled "Chat history loss after PC restart, /resume recovers only 20-40% of context". Closed as not planned.

Why it happens

A session is designed to be independent

This is not a bug report, it is the documentation. Anthropic's own page on how Claude Code works says it plainly:

"Sessions are independent. Each new session starts with a fresh context window, without the conversation history from previous sessions."

code.claude.com, How Claude Code works

Read that as a design decision rather than a failure and the rest follows. A fresh window is a fresh window. Anything you needed to carry across had to be somewhere else.

Rewind saves you inside a session, not after one

Worth being fair about what checkpoints do, because they are good. While a session is alive, rewind can put back the code, or the conversation, or both. That covers the everyday accident where a change went the wrong way.

It is a different tool from the one people reach for after a crash. The documentation says what it was built for:

"Checkpoints are designed for quick, session-level recovery."

code.claude.com, checkpointing

Session level. When the session itself is what you lost, you are back on resume, and resume is exactly where the two reports above land. There is also a clock on it: checkpoints are deleted along with sessions after 30 days.

The state was living in the wrong place

Under all of it is one habit. The plan, the decisions, the next step and the thing you were worried about were all held in the conversation, because that is where the work was happening. A conversation is a working surface. It was never storage.

The fix, with any tool

Three things need a home outside the chat window. You can do all of them by hand, in a text file, today.

1. The next step, written before you stop

One sentence, specific enough to act on. Not "continue the payments work". Something like "the webhook handler is written, the retry path is not, the test file is empty". Write it while you still know it, because in the morning you will not.

2. The decisions, separated from the chatter

Most of a session is noise. A few lines are not: the thing you chose, and why you did not choose the other one. Those few lines are what takes twenty minutes to reconstruct and two minutes to record.

3. The warnings

What is half done, what is failing, what will bite whoever opens this next. This is the part people skip, and it is the part that turns a lost session into a lost day.

Do that by hand and you have solved most of the problem. The reason people do not is that it depends on remembering to do it at the exact moment the session is about to die, which is the one moment nobody is thinking about record keeping.

What that looks like as machinery

Mission HQ is those three notes, kept on a server instead of in the conversation, and written without anyone remembering to write them.

The record is written as you go

A checkpoint is posted on every prompt and at the end of every turn. Nothing waits for a tidy goodbye at the end of a session, because sessions rarely end tidily.

The next session opens with one next action

Starting a session returns the current state, the single next action, and the warnings that matter: failing tests, tasks that have gone stale, decisions still waiting on you. One action, not four competing suggestions.

The last agent leaves its own account

Every session closes with a summary, the current state, the next steps and the warnings, in the words of the agent that was actually there. The next one reads that instead of guessing from the code.

It lives outside every context window

The record sits on a server, so compaction, a crash, a closed terminal and a switch to a different editor all leave it untouched. Your source code stays on your machine.

Try it on the project you are afraid to lose

14 days, no credit card. Connect the editor you already use and close the terminal on purpose.

What the record actually holds

Worth being precise, because this is the part that decides whether the next morning is calm. The record holds what was written while the work was happening: the checkpoints posted during the session, the summary and warnings left at the end, the tasks that moved, and the decisions someone chose to save.

When you open the project again, you are reading that. Not a reconstruction, and not an attempt to remember a conversation. A document, with dates on it, that was being written the whole time.

The opening view hands you the last four sessions in full. Everything before that is still there and still searchable, it just does not arrive uninvited.

Questions people ask about this

Why does Claude Code lose my session after a crash or restart?

+
Because sessions are independent by design. The documentation states that each new session starts with a fresh context window, without the conversation history from previous sessions. Resume reopens a session file, but developers report it recovering only 20 to 40 per cent of the conversation after a machine restart.

Do checkpoints and rewind protect me from losing a session?

+
They protect you inside a living session. Rewind can restore the code, the conversation, or both, up to 100 checkpoints back. The documentation calls it quick, session-level recovery, and checkpoints are deleted along with sessions after 30 days. When the session itself is what you lost, you are back on resume.

How do I make an AI coding session survive a crash?

+
Keep the state outside the conversation. Three things need a home: one specific next step, the decisions you made and rejected, and the warnings about what is half done. Written down anywhere durable, they survive whatever happens to the terminal.

What does a session handoff actually contain?

+
In Mission HQ it returns the current state of the project, one unambiguous next action, and the warnings that matter, such as failing tests, tasks that have gone stale, and decisions waiting on you. It also carries the previous session summary written by the agent that was there.

Does this work if I switch editors or models?

+
Yes, because the record lives on a server rather than inside one client. Mission HQ connects over MCP, the open protocol that the major AI coding tools support, so the plan, the memories and the session history stay put when the tool changes.

Does my source code get uploaded?

+
No. Mission HQ stores project metadata: plans, tasks, decisions, memories and session summaries. The code stays on your machine.

Two things you can do now

Measure your own gap, free

Open a project you have not touched for a week and ask your agent what the next step is. Time how long it takes before the answer is useful. That number is what a dead session costs you every time, and you can measure it in five minutes with no account.

Then write those three notes by hand and measure again.

Or stop keeping state in the chat

Start a 14-day trial, no credit card. The record writes itself while you work, and the next session opens on the state instead of on a blank page.

Start free trial

Related answers