Skip to content

bufio.Scanner: token too long #3502

Closed as duplicate
Closed as duplicate

Description

@yudgnahk

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

Activity

  1. changed the title [-]Buffer is too long error.[/-] [+]bufio.Scanner: token too long[/+] on Oct 28, 2025
  2. github-actions commented on Oct 28, 2025

    @github-actions
    Contributor

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

    • bufio.Scanner: token too long #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.

  3. rekram1-node commented on Oct 28, 2025

    @rekram1-node
    Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions