Skip to content

@W-22167805@ add sf agent trace read command#411

Open
WillieRuemmele wants to merge 2 commits intowr/deleteTracesfrom
wr/readTraces
Open

@W-22167805@ add sf agent trace read command#411
WillieRuemmele wants to merge 2 commits intowr/deleteTracesfrom
wr/readTraces

Conversation

@WillieRuemmele
Copy link
Copy Markdown
Contributor

Work Item

@W-22167805@

Summary

Adds the sf agent trace read command for reading and analyzing trace files from an agent preview session. No org connection required.

Changes

  • New command: sf agent trace read
  • Flags: --session-id (required), --format (summary|detail|raw, default: summary), --dimension (actions|grounding|routing|errors, required with --format detail), --turn (scope to a single turn)
  • --format summary: per-turn table showing topic, user input, agent response, actions executed, latency, errors
  • --format detail: dimension-specific drill-down (actions, grounding, routing, errors)
  • --format raw: prints unprocessed trace JSON
  • --turn N: scopes any format to a single conversation turn via turn-index.json
  • Falls back to listSessionTraces file order when no turn index exists
  • Messages: messages/agent.trace.read.md
  • Schema and snapshot updated

Files Changed

  • src/commands/agent/trace/read.ts
  • messages/agent.trace.read.md
  • schemas/agent-trace-read.json
  • command-snapshot.json
  • test/commands/agent/trace/read.test.ts

Test Plan

  • 24 unit tests passing
  • npm run build and npm test pass cleanly
  • Schema and deprecation snapshot regenerated

Dependencies

@WillieRuemmele WillieRuemmele requested a review from a team as a code owner April 30, 2026 20:53
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.

1 participant