-
Notifications
You must be signed in to change notification settings - Fork 172
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
parseTranscriptFromLine in agent/claudecode/transcript.go uses bufio.Scanner with a 10MB max token size. Claude Code tool_use JSONL lines can embed large file contents, and if a single line exceeds that limit, parsing will error.
This affects all callers:
ExtractAllModifiedFilesCalculateTotalTokenUsage- Other transcript parsing functions
Impact
If a transcript line exceeds 10MB, file extraction and token usage calculation will fail. In ExtractAllModifiedFiles, the error triggers a fallback to main-transcript-only extraction, potentially missing subagent files.
Suggested Fix
Consider switching to a bufio.Reader-based parser (like ClaudeCodeAgent.ExtractModifiedFilesFromOffset) that doesn't have fixed token limits.
Context
Identified during review of #323 (ENT-297 fix).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working