claude-code - 💡(How to fix) Fix [BUG] [BUG] Claude downtime mid-session caused all uncommitted work to be lost [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48695Fetched 2026-04-16 06:53:31
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×5commented ×1

Error Message

Error Messages/Logs

Root Cause

Claude Code experienced downtime in the middle of an active coding session. I was in the process of implementing significant features (landing page redesign, template selector UI overhaul) across multiple files. Because Claude went down before I could commit the changes, everything was lost — the modified files reverted and there is no recovery path.

Fix Action

Fix / Workaround

Claude Code should either:

  1. Auto-save a patch/diff of all file changes made during a session so work can be recovered after downtime
  2. Checkpoint commits periodically during long sessions
  3. At minimum, on reconnect, show the user what was changed and offer to re-apply or commit it
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude Code experienced downtime in the middle of an active coding session. I was in the process of implementing significant features (landing page redesign, template selector UI overhaul) across multiple files. Because Claude went down before I could commit the changes, everything was lost — the modified files reverted and there is no recovery path.

What Should Happen?

Claude Code should either:

  1. Auto-save a patch/diff of all file changes made during a session so work can be recovered after downtime
  2. Checkpoint commits periodically during long sessions
  3. At minimum, on reconnect, show the user what was changed and offer to re-apply or commit it

Error Messages/Logs

Steps to Reproduce

  1. Start a long coding session with Claude Code (Accept Edits ON)
  2. Claude makes changes across many files
  3. Claude goes down mid-session before changes are committed
  4. Reconnect — all file changes are gone, git history is unchanged

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

unknown (downtime happened mid-session, not a version regression)

Claude Code Version

 2.1.109 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Critical impact. I lost several hours of work and millions of tokens. My token budget is now nearly depleted and I have to rebuild everything from scratch. There is no way to recover what was built. I need refund of tokens and limit renewal/

This isn't a model behavior issue — it's an infrastructure/reliability issue. When a paid service goes down mid-session, users should not lose their work. At minimum there should be a session recovery mechanism or local change log.

extent analysis

TL;DR

Implementing an auto-save feature or periodic checkpoint commits in Claude Code can help prevent loss of work during downtime.

Guidance

  • Investigate the feasibility of integrating an auto-save mechanism that stores patches or diffs of file changes made during a session, allowing for recovery after downtime.
  • Consider implementing periodic checkpoint commits during long sessions to ensure that changes are regularly saved.
  • Review the current session management and recovery processes in Claude Code to identify potential areas for improvement.
  • Evaluate the possibility of displaying changed files and offering to re-apply or commit them upon reconnecting after downtime.

Example

No specific code example can be provided without more information on the internal workings of Claude Code. However, a general approach might involve using a temporary storage mechanism to save file changes at regular intervals.

Notes

The exact implementation details will depend on the internal architecture and design of Claude Code. It is essential to balance the need for reliability and session recovery with potential performance and complexity considerations.

Recommendation

Apply a workaround by requesting the development team to prioritize the implementation of an auto-save or periodic checkpoint commit feature to mitigate the risk of work loss during downtime. This is necessary due to the critical impact of losing several hours of work and the depletion of the token budget.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] [BUG] Claude downtime mid-session caused all uncommitted work to be lost [1 comments, 2 participants]