Closed
Labels
area: cliThe codeburn CLI and its core parsing/reporting enginebugSomething isn't workingprovider: cursor-agentCursor Agent providerstatus: has-prAn open pull request references this issue
Description
Symptom
codeburn report --provider cursor-agent shows a fraction of actual Cursor Agent usage. On one real corpus: 240 turns cached vs ~4,900 assistant messages on disk (~4% of assistant text counted).
Root cause (src/providers/cursor-agent.ts)
parseJsonlTranscriptonly emits a turn for an assistant message that immediately follows a user message. Agentic loops emit dozens of assistant messages per user message; the rest are dropped. Same bug in the legacy text parser (flushAssistantdrops whenpendingUsersis empty).tool_useblocks contribute only their name; the input JSON is never counted.role: 'tool'content is absent from these transcripts, so nothing else covers it.extractUserQuerytruncates toMAX_USER_TEXT_LENGTH(500) and the truncated length feedsinputTokens— prompts embedding whole skill files count as ~125 input tokens.conversation_summariesinai-code-tracking.dbis empty in practice (0 rows here), and non-UUID conversation IDs are path hashes that can never match a summary row — so model is alwayscursor-agent-auto(priced as Sonnet 4.5) and every turn shares the file-mtime timestamp.
No real token counts exist on disk (transcripts and chats/*/store.db carry message text only), so char estimation stays — but it should cover all of the text.
Metadata
Metadata
Assignees
Labels
area: cliThe codeburn CLI and its core parsing/reporting enginebugSomething isn't workingprovider: cursor-agentCursor Agent providerstatus: has-prAn open pull request references this issue
Activity