bufio.Scanner: token too long #2312

Closed
opened 2026-02-16 17:35:05 -05:00 by yindo · 2 comments
Owner

Originally created by @yudgnahk on GitHub (Oct 28, 2025).

Description

Image

I got this issue. The opencode is quite lagging. And the response can't be displayed properly. But the agent is still running.

OpenCode version

0.15.19

Steps to reproduce

  1. I have a plan folder with 10 phases and 10 checklists.
  2. At the end of each message, I ask to update the checklist.
  3. And I opened just one session for 4 phases, and I'm in phase 5.

I think it's because the I/O buffer is over range. Then it causes the lagging.

Screenshot and/or share link

Image

Operating System

macOS 15.7.1

Terminal

iTerm2

Originally created by @yudgnahk on GitHub (Oct 28, 2025). ### Description <img width="487" height="313" alt="Image" src="https://github.com/user-attachments/assets/b5d69a33-5230-49a0-aaeb-8409aa53fcfa" /> I got this issue. The opencode is quite lagging. And the response can't be displayed properly. But the agent is still running. ### OpenCode version 0.15.19 ### Steps to reproduce 1. I have a plan folder with 10 phases and 10 checklists. 2. At the end of each message, I ask to update the checklist. 3. And I opened just one session for 4 phases, and I'm in phase 5. I think it's because the I/O buffer is over range. Then it causes the lagging. ### Screenshot and/or share link <img width="487" height="313" alt="Image" src="https://github.com/user-attachments/assets/b5d69a33-5230-49a0-aaeb-8409aa53fcfa" /> ### Operating System macOS 15.7.1 ### Terminal iTerm2
yindo added the bug label 2026-02-16 17:35:05 -05:00
yindo closed this issue 2026-02-16 17:35:05 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 28, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3409: Both report the same "bufio.Scanner: token too long" error, with OpenCode becoming unresponsive and getting stuck on "Generating" or having display issues. The underlying problem appears to be the same - the bufio.Scanner hitting limits when processing large amounts of data/tokens.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 28, 2025): This issue might be a duplicate of existing issues. Please check: - #3409: Both report the same "bufio.Scanner: token too long" error, with OpenCode becoming unresponsive and getting stuck on "Generating" or having display issues. The underlying problem appears to be the same - the bufio.Scanner hitting limits when processing large amounts of data/tokens. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 28, 2025):

closing as duplicate of #3409, I will try to figure this bug out today

@rekram1-node commented on GitHub (Oct 28, 2025): closing as duplicate of #3409, I will try to figure this bug out today
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2312