[Bug] Destructive Context Reset Overwrites User's Unversioned Work File
Resolved 💬 3 comments Opened Sep 18, 2025 by dragoschioran Closed Jan 6, 2026
Bug Description
DETAILED INCIDENT REPORT
Subject: CRITICAL BUG - Claude Code destroyed 3 days of user work during context reset recovery
What happened:
- Context Reset Issue: Claude Code lost context and all memory of user's 3-day development work on scripts/orizon-essentials-worker-v3.js
- Catastrophic Recovery: During recovery attempt, Claude Code ran cp scripts/orizon-essentials-worker.js scripts/orizon-essentials-worker-v3.js
- Data Destruction: This overwrote the user's working file containing 3 days of fixes
- Unrecoverable Loss: No backup existed, file was never committed to git, completely destroyed
Timeline:
- 12:21 PM: Working v3 worker successfully completed kerry.com scan
- 13:12 PM: Context reset, Claude lost all memory
- 13:29 PM: Claude overwrote working file during "recovery"
- Result: 3 days of work permanently destroyed
Lost Work Included:
- Database schema fixes (hostname vs domain field mapping)
- HTTPx parsing improvements
- Dashboard metrics calculation fixes
- Real-time progress updates
- All other improvements over 3 days
Evidence:
- Successful kerry.com scan at 12:21 PM
- Failed rheinmetall.com scan showing database schema errors
- Git commit history showing wrong version committed
This is a catastrophic failure of Claude Code's context management and recovery procedures that resulted in permanent data loss.
Environment Info
- Platform: darwin
- Terminal: windsurf
- Version: 1.0.117
- Feedback ID: 15af9100-5de3-4f75-834c-9a20e2232ba6
Errors
[{"error":"MaxFileReadTokenExceededError: File content (31051 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n at r4B (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1784:432)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Object.call (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1779:1036)\n at async xG5 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:18661)\n at async dwB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:14973)\n at async B6B (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1784:3422)\n at async tIB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1969:1767)\n at async _G5 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:14166)\n at async SG5 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:13107)\n at async hO (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:10212)","timestamp":"2025-09-18T08:32:54.445Z"},{"error":"Error: Request was aborted.\n at N51._createMessage (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1000:7955)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-18T08:35:43.632Z"},{"error":"Error: Request was aborted.\n at AP.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1009:3864)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-09-18T08:42:27.350Z"},{"error":"Error: Shell 40e548 is not running, so cannot be killed (status: completed)\n at Object.call (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3423:1642)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async xG5 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:18661)\n at async dwB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:14973)\n at async B6B (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1784:3422)\n at async tIB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1969:1767)\n at async _G5 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:14166)\n at async SG5 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:13107)\n at async hO (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3345:10212)\n at async P3 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3410:37942)","timestamp":"2025-09-18T08:42:58.042Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n at Module.readSync (node:fs:742:18)\n at Object.readSync (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:719:6908)\n at lJ (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3556:270)\n at UV (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3558:476)\n at oG5 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:3356:16115)\n at K (file:///usr/local/lib/node_modules/@anthropic-ai/claude
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗