feat(cli): add session replay#240
Open
ozymandiashh wants to merge 1 commit intogetagentseal:mainfrom
Open
Conversation
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.
Summary
This adds
codeburn replay <session-id>, a local session timeline for reviewing one recorded AI coding session turn by turn.The existing dashboard and reports are good at aggregate cost visibility, but they do not make it easy to answer what happened inside a specific expensive or interesting session.
replayfills that gap with a focused CLI view: prompt, cost, model, tools, shell commands, retries, edit flag, and token counts per turn.What changed
codeburn replay <session-id>command--period--from/--to--provider--project--exclude--jsonfor scripts and downstream analysis--no-promptsfor metadata-only replay output when users do not want prompt text in stdoutOutput behavior
The text view prints a compact timeline with:
--no-promptsis setThe JSON view returns the same structured replay data, with
userMessage: nullwhen--no-promptsis used.Privacy model
replayis local-only and does not upload data. By default it shows prompt text because the command is meant to help users understand a specific session.--no-promptshides user prompts in both text and JSON output, but it is not a full redaction mode. Shell commands and tool names remain visible because they are part of the execution timeline. The README calls this out explicitly so users do not mistake it for a share-safe export.Edge cases
Validation
npx vitest run tests/replay.test.tsnpm run buildnode dist/cli.js replay --helpnode dist/cli.js replay does-not-exist-hopefully --from 2999-01-01 --to 2999-01-02 --jsonexits with code 1 and the expected not-found messagenpx vitest rungit diff --cached --checknpx tsc --noEmitis still blocked by existingsrc/providers/copilot.tstype errors onmain; this branch does not touch that provider path.