1.6 KiB
| title | status | type | priority | created_at | updated_at | parent |
|---|---|---|---|---|---|---|
| `sessions dump` should collapse consecutive identical rows | todo | bug | normal | 2026-03-30T04:38:42Z | 2026-03-30T04:41:14Z | claudbg-tci9 |
Problem
sessions dump produces hundreds of identical consecutive rows (e.g. repeated progress entries) that differ only in timestamp, making the output very noisy.
Example
Rows 555–661 in session 21fae0a8 are all progress entries with the same type, role, and content preview. They currently appear as 107 separate table rows.
Expected behavior
Consecutive rows that are identical in all fields except the timestamp should be collapsed into a single row with a range indicator:
555-661 | progress | <role> | <content preview>
Only collapse truly identical rows (same type, role, and content preview). Do not collapse if any of these differ.
Scope
- Applies to
sessions dumptable output only. - Does not apply to
sessions transcribe. - Does not apply to
--followmode (streaming). - JSON/XML output should also collapse (the range can be represented as
{"seq_start": 555, "seq_end": 661, ...}).
Implementation hint
After building the rows vector in dump(), run a post-processing pass: iterate rows and merge consecutive runs where row[2] (type), row[3] (role), and row[4] (content) are all equal. Replace the merged run with a single row whose # column shows N-M and whose timestamp is dropped or shows the first timestamp.
Relevant files
src/commands/sessions.rs—dump()function, row-building loop