[GH-ISSUE #15959] Bug: Claude code "API Error: Content block not found" kimi-k2.6:cloud #87852

Open
opened 2026-05-10 06:27:05 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @sergey-drpa on GitHub (May 4, 2026).
Original GitHub issue: https://github.com/ollama/ollama/issues/15959

What is the issue?

Claude code multiple "API Error: Content block not found"
on kimi-k2.6:cloud

ollama launch claude --model kimi-k2.6:cloud

Image Image

Paid subscription

Relevant log output

⏺ Bash(ls /Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/)
  ⎿  handler.ts
     presence.ts
  ⎿  API Error: Content block not found

⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/handler.ts)
  ⎿  Read 60 lines

⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/presence.ts)
  ⎿  Read 170 lines
  ⎿  API Error: Content block not found

⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/db/index.ts)
  ⎿  Read 47 lines
  ⎿  API Error: Content block not found
  ⎿  API Error: Content block not found
  ⎿  API Error: Content block not found

⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/handler.ts)
  ⎿  Unchanged since last read

⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/presence.ts)
  ⎿  Unchanged since last read

⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/index.ts)
  ⎿  Read 58 lines
  ⎿  API Error: Content block not found

⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/presence.ts)
  ⎿  Unchanged since last read
  ⎿  API Error: Content block not found

OS

macOS

GPU

Other

CPU

Other

Ollama version

0.17.7

Originally created by @sergey-drpa on GitHub (May 4, 2026). Original GitHub issue: https://github.com/ollama/ollama/issues/15959 ### What is the issue? Claude code multiple "API Error: Content block not found" on kimi-k2.6:cloud >ollama launch claude --model kimi-k2.6:cloud <img width="707" height="90" alt="Image" src="https://github.com/user-attachments/assets/3aa33ac8-30b3-49e0-b6c4-fdaa91ff52c4" /> <img width="747" height="880" alt="Image" src="https://github.com/user-attachments/assets/6347cddf-4506-47a8-899d-29fc9d685f52" /> Paid subscription ### Relevant log output ```shell ⏺ Bash(ls /Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/) ⎿  handler.ts presence.ts ⎿  API Error: Content block not found ⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/handler.ts) ⎿  Read 60 lines ⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/presence.ts) ⎿  Read 170 lines ⎿  API Error: Content block not found ⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/db/index.ts) ⎿  Read 47 lines ⎿  API Error: Content block not found ⎿  API Error: Content block not found ⎿  API Error: Content block not found ⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/handler.ts) ⎿  Unchanged since last read ⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/presence.ts) ⎿  Unchanged since last read ⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/index.ts) ⎿  Read 58 lines ⎿  API Error: Content block not found ⏺ Read(/Users/sergey/WebstormProjects/Messenger/apps/backend/src/ws/presence.ts) ⎿  Unchanged since last read ⎿  API Error: Content block not found ``` ### OS macOS ### GPU Other ### CPU Other ### Ollama version 0.17.7
GiteaMirror added the cloudbug labels 2026-05-10 06:27:06 -05:00
Author
Owner

@rehan243 commented on GitHub (May 4, 2026):

Ran into this "API Error: Content block not found" issue with kimi-k2.6:cloud too, turns out it's related to how the model handles file reads. We hit this at Reallytics.ai when processing large codebases - our RAG pipeline was throwing similar errors when it encountered certain file types. Not gonna lie, took us a few tries to debug, but it ended up being an issue with the model's context window config. Specifically, the max_tokens param was set too low, causing it to truncate the content. We've since bumped that up to 4096 and it's been smooth sailing. The logs you posted show it's reading multiple files, so maybe that's the issue here? We've seen this exact error with ollama v0.3.x, so if you're on that version, might wanna check your model config.

<!-- gh-comment-id:4371894785 --> @rehan243 commented on GitHub (May 4, 2026): Ran into this "API Error: Content block not found" issue with kimi-k2.6:cloud too, turns out it's related to how the model handles file reads. We hit this at Reallytics.ai when processing large codebases - our RAG pipeline was throwing similar errors when it encountered certain file types. Not gonna lie, took us a few tries to debug, but it ended up being an issue with the model's context window config. Specifically, the `max_tokens` param was set too low, causing it to truncate the content. We've since bumped that up to 4096 and it's been smooth sailing. The logs you posted show it's reading multiple files, so maybe that's the issue here? We've seen this exact error with ollama v0.3.x, so if you're on that version, might wanna check your model config.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#87852