[Bug] Claude Code: Fails to Complete Basic Code Editing Task

Resolved 💬 16 comments Opened Aug 26, 2025 by mattgodbolt Closed Feb 3, 2026
💡 Likely answer: A maintainer (wolffiex, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
Claude having terible trouble making a simple edit


● Update(assembler_source.asm)
  ⎿  Error editing file

● Update(assembler_source.asm)
  ⎿  Updated assembler_source.asm with 1 addition and 1 removal
       164    STAZ 09     ; Store low byte
       165    LDA# 00
       166    STAZ 0A     ; Clear high byte
       167 -  JMP  :WRITE_INST   ; Jump to WRITE_INST
       167 +  RTS         ; Return to caller
       168    
       169    @0540       ; Align READ_WORD routine
       170    ; Read two-byte operand (little-endian)

● Update(assembler_source.asm)
  ⎿  Error editing file

● Let me check the exact text:

● Read(assembler_source.asm)
  ⎿  Read 3 lines (ctrl+r to expand)

● Update(assembler_source.asm)
  ⎿  Error editing file

● Update(assembler_source.asm)
  ⎿  Error editing file

● Let me check the exact spacing:

● Bash(head -150 assembler_source.asm | tail -10 | cat -A)
  ⎿  CMP# 01     ; Type 1: single byte$            
     BNE  :CHECK_TYPE_2   ; Not 1, check type 2$
     JMP  :READ_BYTE   ; Type 1: jump to READ_BYTE$
     … +7 lines (ctrl+r to expand)

● Update(assembler_source.asm)
  ⎿  Error editing file

● Let me use MultiEdit to make both changes at once:

● Update(assembler_source.asm)
  ⎿  Error editing file

● Let me check the file again:

● Bash(grep -n "jump to read_BYTE" assembler_source.asm)
  ⎿  No matches found

● Bash(grep -n "READ_BYTE" assembler_source.asm | head -5)
  ⎿  143:JMP  :READ_BYTE   ; Type 1: jump to READ_BYTE
     150:JSR  :READ_BYTE   ; Call READ_BYTE
     160:@0500       ; Align READ_BYTE routine
     … +1 line (ctrl+r to expand)
  ⎿  Interrupted by user

> /bug 
  ⎿  Bug report submitted

> carry on

● Update(assembler_source.asm)
  ⎿  Error editing file

● Let me check if the comment changed:

● Bash(sed -n '143p' assembler_source.asm | cat -A)

Environment Info

  • Platform: linux
  • Terminal: gnome-terminal
  • Version: 1.0.92
  • Feedback ID: b140bcd0-bedd-4918-9f0a-ffab3e2ac903

Errors

[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at N3 (/$bunfs/root/claude:1606:1192)\n    at map (native:1:11)\n    at zK (/$bunfs/root/claude:1606:905)\n    at y5W (/$bunfs/root/claude:3128:11956)\n    at JF (/$bunfs/root/claude:187:19415)\n    at bb (/$bunfs/root/claude:189:42805)\n    at CY (/$bunfs/root/claude:189:38347)\n    at Gy (/$bunfs/root/claude:189:38275)\n    at wF (/$bunfs/root/claude:189:38129)\n    at PI (/$bunfs/root/claude:189:35208)","timestamp":"2025-08-26T12:06:46.597Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: asm\n    at N3 (/$bunfs/root/claude:1606:1192)\n    at map (native:1:11)\n    at zK (/$bunfs/root/claude:1606:905)\n    at E5W (/$bunfs/root/claude:3128:8960)\n    at JF (/$bunfs/root/claude:187:19415)\n    at bb (/$bunfs/root/claude:189:42805)\n    at CY (/$bunfs/root/claude:189:38347)\n    at Gy (/$bunfs/root/claude:189:38275)\n    at wF (/$bunfs/root/claude:189:38129)\n    at PI (/$bunfs/root/claude:189:35208)","timestamp":"2025-08-26T12:06:46.614Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: asm\n    at N3 (/$bunfs/root/claude:1606:1192)\n    at map (native:1:11)\n    at zK (/$bunfs/root/claude:1606:905)\n    at E5W (/$bunfs/root/claude:3128:8960)\n    at JF (/$bunfs/root/claude:187:19415)\n    at bb (/$bunfs/root/claude:189:42805)\n    at CY (/$bunfs/root/claude:189:38347)\n    at Gy (/$bunfs/root/claude:189:38275)\n    at wF (/$bunfs/root/claude:189:38129)\n    at PI (/$bunfs/root/claude:189:35208)","timestamp":"2025-08-26T12:06:46.616Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: asm\n    at N3 (/$bunfs/root/claude:1606:1192)\n    at map (native:1:11)\n    at zK (/$bunfs/root/claude:1606:905)\n    at E5W (/$bunfs/root/claude:3128:8960)\n    at JF (/$bunfs/root/claude:187:19415)\n    at bb (/$bunfs/root/claude:189:42805)\n    at CY (/$bunfs/root/claude:189:38347)\n    at Gy (/$bunfs/root/claude:189:38275)\n    at wF (/$bunfs/root/claude:189:38129)\n    at PI (/$bunfs/root/claude:189:35208)","timestamp":"2025-08-26T12:06:46.635Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at N3 (/$bunfs/root/claude:1606:1192)\n    at map (native:1:11)\n    at zK (/$bunfs/root/claude:1606:905)\n    at E5W (/$bunfs/root/claude:3128:8960)\n    at JF (/$bunfs/root/claude:187:19415)\n    at bb (/$bunfs/root/claude:189:42805)\n    at CY (/$bunfs/root/claude:189:38347)\n    at Gy (/$bunfs/root/claude:189:38275)\n    at wF (/$bunfs/root/claude:189:38129)\n    at PI (/$bunfs/root/claude:189:35208)","timestamp":"2025-08-26T12:06:46.649Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at N3 (/$bunfs/root/claude:1606:1192)\n    at map (native:1:11)\n    at zK (/$bunfs/root/claude:1606:905)\n    at E5W (/$bunfs/root/claude:3128:8960)\n    at JF (/$bunfs/root/claude:187:19415)\n    at bb (/$bunfs/root/claude:189:42805)\n    at CY (/$bunfs/root/claude:189:38347)\n    at Gy (/$bunfs/root/claude:189:38275)\n    at wF (/$bunfs/root/claude:189:38129)\n    at PI (/$bunfs/root/claude:189:35208)","timestamp":"2025-08-26T12:06:46.650Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at N3 (/$bunfs/root/claude:1606:1192)\n    at map (native:1:11)\n    at zK (/$bunfs/root/claude:1606:905)\n    at E5W (/$bunfs/root/claude:3128:8960)\n    at JF (/$bunfs/root/claude:187:19415)\n    at bb (/$bunfs/root/claude:189:42805)\n    at CY (/$bunfs/root/claude:189:38347)\n    at Gy (/$bunfs/root/claude:189:38275)\n    at wF (/$bunfs/root/claude:189:38129)\n    at PI (/$bunfs/root/claude:189:35208)","timestamp":"2025-08-26T12:06:46.682Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.162: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01CFfjBWCNwozobK1f7qD7y9. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CSWHwdnKCHcwPggXzBzkW\"}\n    at new nW (unknown:1:28)\n    at new r5 (/$bunfs/root/claude:764:1962)\n    at new 

Note: Error logs were truncated.

View original on GitHub ↗

16 Comments

mattgodbolt · 10 months ago

going around in circles doing seds and awks trying to work around a simple change. Not sure what's different about this

holstvoogd · 10 months ago

It's been having a hard time the last few days. It's almost as if they randomly switch to some smaller model for a few days every few weeks. I've been fighting its stupidity for days.

For me it takes 6 attempts to do any thing because it just refuse to use the correct paths, never being able to edit a file with out 4 attempts and then deciding it might need to read it first. It's driving me insane, it is Gemini level stupid today. I just asked it to remove one comment, it started to remove ALL comment from ALL code. It ignores it's own plans, reverts entire files instead of correcting one mistake.. i could go on, but it's like it just lost 40iq points orso.

I get that this is vague, un-debuggable behaviour and a worthless bug report, but that is what you get with LLMs and agents I guess.

I do want to note that the days where this is worst, i also seem to get A LOT of 529's & 500's so I am 100% convinced Anthropic is just throttling us

EDIT: Ok, now it's just down; Like only getting 500s, not even getting 529's anymore. this simply is not acceptable tbh, not what they charge.

mattgodbolt · 10 months ago

I've not had that experience honestly. This code is lots of similar-looking 6502 assembly so it's not _too_ surprisng it gets itself in knots. I've not seen any 5xxes so far (knock on wood)

mgoulet101 · 10 months ago

I think this may be the same thing as https://github.com/anthropics/claude-code/issues/5926. I commented there that disabling formatOnSave (in vscode) seems to have help me for now. But it's super intermittent and then persistent once it starts. Agree that for the price, it ought to be rock solid for basic file edits.

mattgodbolt · 10 months ago

I have no hooks, and I have no editor open (totally vibing from a terminal window). So there's nothing to interfere with claude's editing here.

mgoulet101 · 10 months ago
I have no hooks, and I have no editor open (totally vibing from a terminal window). So there's nothing to interfere with claude's editing here.

Yup. I'm seeing similar. Also, FWIW I disabled formatOnSave and it went back to doing this. Given others' experience this is a huge issue. It limps along with pretty complex grep/awk/sed/cat commands, but it sucks up tokens and takes much longer to complete what should be simple tasks.

mgoulet101 · 10 months ago

@wolffiex, could you comment how #6836 a dup of this? The two seem completely unrelated.

wolffiex collaborator · 10 months ago

Sorry @mgoulet101, this was an error in automation. The original report had the tool_use error in the uploaded JSON. I'll tweak my script to be a little more careful.

mgoulet101 · 10 months ago
this was an error in automation.

np; thanks!

lindseysoft · 8 months ago

I found the issue ... if I drag a file onto the claude window it refers to a file with forward slashes and update tool fails every time. If it uses backslashes it works - 100%
C:\source\web\test.md - no issues
C:/source/web/test.md - fails

raassild · 8 months ago

For me the issue was: The Read tool displays tabs as SPACES for readability, but I need to use actual TABS in my Edit commands

I made a note of it in claude.md and it has sort of resolved it for me.

github-actions[bot] · 7 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

rubmz · 6 months ago

Let me just comment that it is still happening on my Ubuntu 24.04 in PyCharm community editions - both Claude and Pycharm are up to date.

github-actions[bot] · 5 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

marcindulak · 5 months ago

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.