BuildGist

My coding agent crashed mid-task. How do I resume without starting over?

Kayvan Zahiri ·

Do not start the task again. First see what is on disk with git status and git diff, then reopen the same session (claude --continue, codex resume, or Cursor's agent resume) and ask it to finish from where it stopped. Run the tests before you trust anything. If the session will not reopen, a short note plus the diff is enough for a fresh one, in the same agent or another. BuildGist's Inbox and its Continue card help with both.

BuildGist is a Mac app for Claude Code, Cursor and Codex. Download for Mac.

1. See what the agent left

git status
git diff --stat
git log --oneline -5

A crash can leave a file half-written, a new file nothing imports yet, or a commit the agent made before it stopped. Look for those three. A file that no longer parses is one sign of an edit cut off midway. Do not run git checkout . or git reset --hard yet. They throw away the finished part along with the broken part.

2. Reopen the session

Then say what happened, in so many words:

The last run stopped partway (the process crashed). Check git status and git diff,
tell me which steps are complete and which file may be half-edited, then finish
from there. Do not redo finished work.

3. Roll back only the broken part

If one file is a mess, restore just that file with git restore path/to/file, or use the agent's own checkpoints:

Claude Code's options are covered in more depth in how to undo Claude Code changes.

4. Run the tests

A crashed run often did not get to the step where it ran the tests. Run them yourself before you continue. A failing test tells you where the agent stopped more reliably than its last message.

5. If the session will not reopen

Start a fresh one with a note:

Task: (what you asked for)
Done: (what the diff shows is finished)
Possibly half-done: (the file that looks cut off)
Next step: (what to do first)

Or switch agents. A crash is a natural point to move the task, and the note works in any of them.

Make the next crash cheaper

What BuildGist does after a crash

BuildGist explains each meaningful run in plain English in its Inbox, including uncommitted work, so you can read what the run before the crash did. It records the request you typed, the files changed with line counts, and the tests that ran with their result. When you start a new chat in Claude Code, Cursor or Codex in the same project, its card offers the task you were on, if it was active in the last 12 hours. Choose Continue to start with that context, or Start fresh. The explanation is written by AI, so check it against the code and the tests.

Questions

Does Claude Code save a session if it crashes?

Claude Code writes each message to a local session file as you work, so claude --continue or claude --resume can reopen it. Check the last turn against git diff, since it may not have finished.

Should I git reset after an agent crash?

Not first. Read git status and git diff, keep the finished work, and restore only the file that is broken.

Can a different agent finish the task?

Yes. Open it in the same folder with a short note. With BuildGist, choose Continue on the card in Claude Code, Cursor or Codex.

Sources

What you need

Codex needs you to approve BuildGist once, in Codex. BuildGist shows the steps. Setup is in Getting started.

To explain a run, your computer sends BuildGist what that run needs, and BuildGist passes it to Anthropic. BuildGist does not keep this material. It does not send your whole repository, files the run did not change, or files named like secrets, such as .env files and keys. It keeps the explanation and short cited excerpts of changed code, at most 12 lines each. Secret masking is best-effort. Privacy has the full list.

Every account gets 7 days of BuildGist Pro free, with no card. The 7 days start at your first explanation or Continue handoff. Nobody is charged when the trial ends. After that, BuildGist Pro is $12 per month, plus any applicable tax shown at checkout. See pricing.

Try BuildGist Download for Mac

Apple silicon, macOS 12 or later. United States, 18 or older.

Related

Questions: kayvanandre@gmail.com.