You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.2 KiB
1.2 KiB
| title | status | type | priority | created_at | updated_at | parent |
|---|---|---|---|---|---|---|
| JSON output is array-of-arrays instead of array-of-objects | todo | bug | normal | 2026-03-30T04:37:05Z | 2026-03-30T04:41:14Z | claudbg-tci9 |
Problem
sessions list --output json and sessions dump --output json serialize rows as Vec<Vec<String>>, producing an array of arrays with no field names:
[["21fae0a8", "2024-01-01", "/path", "claude-3", "42"], ...]
Expected behavior
Output should be an array of objects with named keys:
[{"id": "21fae0a8", "date": "2024-01-01", "project": "/path", "model": "claude-3", "messages": 42, "subagents": 0}, ...]
Affected commands
sessions list --output json: keys should beid,date,project,model,messages,subagentssessions dump --output json: keys should beseq,timestamp,type,role,content
Root cause
src/commands/sessions.rs passes &rows: &Vec<Vec<String>> directly to render_json. The fix is to build a typed struct or serde_json::Value map per row before serializing.
Relevant files
src/commands/sessions.rs—list()anddump()JSON output branchessrc/output/json.rs— genericrender_json