Skip to content

Conversation

@gtrrz-victor
Copy link
Contributor

Replace bufio.Scanner with bufio.Reader.ReadBytes to remove the 10MB line size limit.

Scanner fails with token too long when transcript lines exceed its buffer size, which happens with large tool outputs (e.g., reading big files).

ReadBytes has no artificial limit and will allocate as needed.

  Replace bufio.Scanner with bufio.Reader.ReadBytes to remove the
  10MB line size limit. Scanner fails with token too long when
  transcript lines exceed its buffer size, which happens with large
  tool outputs (e.g., reading big files).

  ReadBytes has no artificial limit and will allocate as needed.
Copy link
Collaborator

@Soph Soph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So Georgs log had a singe line > 10MB?

@gtrrz-victor
Copy link
Contributor Author

So Georgs log had a singe line > 10MB?

Yes, it was in fact 28MBs. No idea what was in it

@gtrrz-victor gtrrz-victor merged commit 7078d4d into main Jan 14, 2026
3 checks passed
@gtrrz-victor gtrrz-victor deleted the gtrrz-victor/fix-parse-transcript branch January 14, 2026 23:36
khaong added a commit that referenced this pull request Jan 22, 2026
…pt lines

Replace bufio.Scanner with bufio.Reader.ReadBytes to remove the 10MB line
size limit in GetTranscriptPosition and ExtractModifiedFilesFromOffset.

Scanner fails with "token too long" when transcript lines exceed its buffer
size, which can happen with large tool outputs. ReadBytes has no artificial
limit and will allocate as needed.

Addresses PR review feedback referencing PR #42.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Entire-Checkpoint: 7295d22ef3a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants