[Bug] Anthropic API Error: Invalid message content after agent interruption
Resolved 💬 3 comments Opened Feb 4, 2026 by levnikolaevich Closed Feb 15, 2026
Bug Description
I ran into this issue twice in the latest agent version. If I stop the agent while it’s reasoning and then add more to the question, it crashes with the API error:
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages: text content blocks must contain non-whitespace text"},"request_id":"req_011CXoJND5P7Lu3DGn8A9KfG"}
Environment Info
- Platform: win32
- Terminal: cursor
- Version: 2.1.31
- Feedback ID: bc2e35bb-ed32-4f67-90a4-09288958b3da
Errors
[{"error":"Error: Tool mcp__Ref__ref_search_documentation not found\n at IAI (B:/~BUN/root/claude.exe:1715:5774)\n at Wf (B:/~BUN/root/claude.exe:691:20767)\n at CW (B:/~BUN/root/claude.exe:691:39159)\n at Xe (B:/~BUN/root/claude.exe:691:49778)\n at zj (B:/~BUN/root/claude.exe:691:86028)\n at Ne (B:/~BUN/root/claude.exe:691:85002)\n at uc (B:/~BUN/root/claude.exe:691:84827)\n at Sc (B:/~BUN/root/claude.exe:691:81250)\n at VA (B:/~BUN/root/claude.exe:691:6398)\n at tH (B:/~BUN/root/claude.exe:691:4900)","timestamp":"2026-02-04T15:54:39.542Z"},{"error":"Error: Tool mcp__Ref__ref_read_url not found\n at IAI (B:/~BUN/root/claude.exe:1715:5774)\n at Wf (B:/~BUN/root/claude.exe:691:20767)\n at CW (B:/~BUN/root/claude.exe:691:39159)\n at Xe (B:/~BUN/root/claude.exe:691:49778)\n at zj (B:/~BUN/root/claude.exe:691:86028)\n at Ne (B:/~BUN/root/claude.exe:691:85002)\n at uc (B:/~BUN/root/claude.exe:691:84827)\n at Sc (B:/~BUN/root/claude.exe:691:81250)\n at VA (B:/~BUN/root/claude.exe:691:6398)\n at tH (B:/~BUN/root/claude.exe:691:4900)","timestamp":"2026-02-04T15:54:39.543Z"},{"error":"Error: Tool mcp__Ref__ref_search_documentation not found\n at IAI (B:/~BUN/root/claude.exe:1715:5774)\n at Wf (B:/~BUN/root/claude.exe:691:20767)\n at CW (B:/~BUN/root/claude.exe:691:39159)\n at Xe (B:/~BUN/root/claude.exe:691:49778)\n at zj (B:/~BUN/root/claude.exe:691:86028)\n at Ne (B:/~BUN/root/claude.exe:691:85002)\n at uc (B:/~BUN/root/claude.exe:691:84827)\n at Sc (B:/~BUN/root/claude.exe:691:81250)\n at VA (B:/~BUN/root/claude.exe:691:6398)\n at tH (B:/~BUN/root/claude.exe:691:4900)","timestamp":"2026-02-04T15:54:39.543Z"},{"error":"Error: Tool mcp__Ref__ref_search_documentation not found\n at IAI (B:/~BUN/root/claude.exe:1715:5774)\n at Wf (B:/~BUN/root/claude.exe:691:20767)\n at CW (B:/~BUN/root/claude.exe:691:39159)\n at Xe (B:/~BUN/root/claude.exe:691:49778)\n at zj (B:/~BUN/root/claude.exe:691:86028)\n at Ne (B:/~BUN/root/claude.exe:691:85002)\n at uc (B:/~BUN/root/claude.exe:691:84827)\n at Sc (B:/~BUN/root/claude.exe:691:81250)\n at VA (B:/~BUN/root/claude.exe:691:6398)\n at tH (B:/~BUN/root/claude.exe:691:4900)","timestamp":"2026-02-04T15:54:39.544Z"},{"error":"AbortError: The operation was aborted.\n at unknown\n at abortChildProcess (node:child_process:947:42)\n at onAbortListener2 (node:child_process:35:24)\n at abort (unknown)\n at <anonymous> (B:/~BUN/root/claude.exe:3096:209)","timestamp":"2026-02-04T15:54:40.138Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages: text content blocks must contain non-whitespace text\"},\"request_id\":\"req_011CXoJND5P7Lu3DGn8A9KfG\"}\n at generate (B:/~BUN/root/claude.exe:362:8698)\n at makeRequest (B:/~BUN/root/claude.exe:379:5435)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-02-04T15:54:48.014Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗