Skip to content

feat(export): subagentType and model on per-record exports; --by-agent follow-ups#712

Merged
iamtoruk merged 1 commit into
mainfrom
feat/708-export-followups
Jul 16, 2026
Merged

feat(export): subagentType and model on per-record exports; --by-agent follow-ups#712
iamtoruk merged 1 commit into
mainfrom
feat/708-export-followups

Conversation

@ozymandiashh

Copy link
Copy Markdown
Collaborator

Follow-ups to #710, as offered in its review. Three pieces, all small:

  1. Export (issue Feature request: agent × model cross-breakdown (e.g. codeburn agents --by-model) #708's second ask, deferred there): new records.csv with one row per priced call including subagentType and model; sessions.csv gains both fields appended after all legacy columns, so by-index CSV consumers keep their positions; JSON fields are additive; escCsv formula-injection escaping applies to the new values.

  2. Collision-safe main bucket: agentType is free-form text from the transcript meta, so the bare main sentinel merges a real subagent literally named main into the main-session bucket. The sentinel becomes (main); a test pins that an agent named main stays distinct across table, markdown, json and csv.

  3. README: one sentence noting the inherited --min-cost 0.01 default can silently hide sub-cent agent buckets (common at agent granularity) and that --min-cost 0 shows the full inventory.

…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 iamtoruk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@iamtoruk
iamtoruk merged commit a55251c into main Jul 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants