claude-code - 💡(How to fix) Fix Edit tool returns '[Tool result missing due to internal error]' — silent freeze, no retry possible [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#57793Fetched 2026-05-11 03:25:15
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

The Edit tool intermittently returns [Tool result missing due to internal error] with no further detail. When this happens, the assistant retries the same Edit call, which fails again identically — causing a ~30-minute freeze per retry as the user waits.

Error Message

The Edit tool intermittently returns [Tool result missing due to internal error] with no further detail. When this happens, the assistant retries the same Edit call, which fails again identically — causing a ~30-minute freeze per retry as the user waits.

  • No PreToolUse hook blocked it (edit-size-guard passed; a hook block would show a reason, not "internal error") PostToolUse(Edit) hook that detects the error string and injects a systemMessage telling the assistant to fall back to Write. Works, but shouldn't be necessary. Edit should either succeed or return a diagnostic error. "Internal error" with no detail and no recovery path is the worst outcome — the assistant has no signal to change strategy and loops.

Root Cause

The Edit tool intermittently returns [Tool result missing due to internal error] with no further detail. When this happens, the assistant retries the same Edit call, which fails again identically — causing a ~30-minute freeze per retry as the user waits.

Fix Action

Workaround

PostToolUse(Edit) hook that detects the error string and injects a systemMessage telling the assistant to fall back to Write. Works, but shouldn't be necessary.

RAW_BUFFERClick to expand / collapse

Description

The Edit tool intermittently returns [Tool result missing due to internal error] with no further detail. When this happens, the assistant retries the same Edit call, which fails again identically — causing a ~30-minute freeze per retry as the user waits.

Reproduction

  • File: a regular .md file (~4.4KB, not a symlink)
  • Edit: replacing ~5 lines of content (well within normal limits)
  • The exact same change applied via the Write tool succeeds instantly
  • No PreToolUse hook blocked it (edit-size-guard passed; a hook block would show a reason, not "internal error")
  • File was open in VS Code IDE at the time (may or may not be relevant)
  • Observed twice in sequence on the same file in one session

Environment

  • Claude Code CLI on Linux (Pop!_OS / Ubuntu-based)
  • Model: claude-opus-4-6 (1M context)
  • File contained markdown with template syntax ([placeholder] patterns) inside a fenced code block

Workaround

PostToolUse(Edit) hook that detects the error string and injects a systemMessage telling the assistant to fall back to Write. Works, but shouldn't be necessary.

Expected behavior

Edit should either succeed or return a diagnostic error. "Internal error" with no detail and no recovery path is the worst outcome — the assistant has no signal to change strategy and loops.

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…

FAQ

Expected behavior

Edit should either succeed or return a diagnostic error. "Internal error" with no detail and no recovery path is the worst outcome — the assistant has no signal to change strategy and loops.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING