sessions list/dump and agents list/dump were passing Vec<Vec<String>>
directly to render_json, producing unlabeled arrays. Now each row is
mapped to a serde_json object with named keys before serializing.
Closes claudbg-pfa5
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
title: JSON output is array-of-arrays instead of array-of-objects
status: todo
status: completed
type: bug
priority: normal
created_at: 2026-03-30T04:37:05Z
updated_at: 2026-03-30T04:41:14Z
updated_at: 2026-03-30T05:05:12Z
parent: claudbg-tci9
---
@ -38,3 +38,7 @@ Output should be an array of objects with named keys:
- `src/commands/sessions.rs` — `list()` and `dump()` JSON output branches
- `src/output/json.rs` — generic `render_json`
## Summary of Changes
Fixed JSON output in both sessions.rs and agents.rs to produce array-of-objects instead of array-of-arrays. Each row is now mapped to a serde_json object with named keys before serializing. Keys: sessions list (id, date, project, model, messages, subagents), sessions dump (seq, timestamp, type, role, content), agents list (id, type, file, modified), agents dump (seq, timestamp, type, role, content).