[BUG] Uncaught Exception: File Edit Operation Fails Silently
Bug Description
triggerUncaughtException during agent editing, losing context and all previous effort; this is an p0 bug from my perspective. same experiences found here:https://www.reddit.com/r/ClaudeCode/comments/1lzkns6/claude_code_keeps_crashing/
error msg:
node:internal/process/promises:394
triggerUncaughtException(err, true / fromPromise /);
^
Error: String not found in file. Failed to apply edit.
at gk (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1766:728)
at K78 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2741:10940)
at J (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2741:9918)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2741:10184
at bI (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:21377)
at wJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:40875)
at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:39071
at ju1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:61:78952)
at Immediate.Lu1 [as _onImmediate] (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:61:79371)
at process.processImmediate (node:internal/timers:505:21)
Environment Info
- Platform: darwin
- Terminal: cursor
- Version: 1.0.58
- Feedback ID: a4724966-f7c0-465d-a13e-5b914a5cc554
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at F7 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:844:5958)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:756:48658\n at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:653:14408)\n at LW (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:756:46369)\n at eK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:756:45236)\n at dB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:756:51284)","timestamp":"2025-07-24T02:38:28.663Z"},{"error":"Error: 1: ENOENT \n at jw6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1324:4814)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Pw6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1324:2187)","timestamp":"2025-07-24T02:38:29.110Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗