feat(export): subagentType and model on per-record exports; --by-agent follow-ups#712
Merged
Conversation
…t follow-ups Follow-ups to #710, completing issue #708's second ask plus the two review notes: - export: new records.csv with one row per call incl. subagentType and model; sessions.csv gains both fields APPENDED after all legacy columns so by-index consumers are unaffected; JSON fields additive; formula- injection escaping preserved - models --by-agent: the main-session bucket sentinel becomes '(main)' - agentType is free-form text, so a real subagent literally named 'main' no longer merges into the main bucket (test-pinned across all formats) - README: note that the --min-cost 0.01 default can hide sub-cent agent buckets; --min-cost 0 shows the complete agent inventory
iamtoruk
approved these changes
Jul 16, 2026
iamtoruk
left a comment
Member
There was a problem hiding this comment.
Verified locally: tsc clean, full suite green apart from the #681 electron failures, and both behaviors mutation-pinned; reverting the (main) sentinel to bare main fails exactly the collision test, and blanking subagentType in the record rows fails exactly the two export pins. Ran a real export over yesterday's data: records.csv carries subagentType and model on 631 real agent rows, and sessions.csv appends the new fields after every legacy column so positional consumers keep working, exactly as described. The (main) collision catch on #710 was a good one, thanks. This also closes out the export follow-up promised on #708.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups to #710, as offered in its review. Three pieces, all small:
Export (issue Feature request: agent × model cross-breakdown (e.g. codeburn agents --by-model) #708's second ask, deferred there): new
records.csvwith one row per priced call includingsubagentTypeandmodel;sessions.csvgains both fields appended after all legacy columns, so by-index CSV consumers keep their positions; JSON fields are additive;escCsvformula-injection escaping applies to the new values.Collision-safe main bucket:
agentTypeis free-form text from the transcript meta, so the baremainsentinel merges a real subagent literally namedmaininto the main-session bucket. The sentinel becomes(main); a test pins that an agent namedmainstays distinct across table, markdown, json and csv.README: one sentence noting the inherited
--min-cost 0.01default can silently hide sub-cent agent buckets (common at agent granularity) and that--min-cost 0shows the full inventory.