Skip to content

Pretty-print fleet JSON so the pager can scroll it - #871

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-7622-pretty-print-fleet-json-so-the-pager-can-scroll-it
Sep 10, 2026
Merged

Pretty-print fleet JSON so the pager can scroll it#871
TheGreatAxios merged 1 commit into
mainfrom
cl-7622-pretty-print-fleet-json-so-the-pager-can-scroll-it

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fleet and lifecycle success JSON is pretty-printed with two-space indent so the line pager can scroll it. Error strings stay raw Error: text and are not double-encoded.

JSON.stringify with no indent made a worker report, agent list, or spawn result one enormous line. The TUI pager is line-oriented, so that payload could not be scanned even when it was under the leisure spill budget.

  • wait_agents, list_agents, spawn_agent, close_agent, resume_agent, interrupt_agent, and send_input success envelopes go through fleetJson.
  • search_agents / read_agent_trace stay multi-line text, not JSON envelopes.
  • Tests require a newline and a JSON.stringify(parsed, null, 2) round-trip. This is independent of leisure-on-all-tools.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • bun run check passes
  • bun test src/subagent/agent-fleet.test.ts src/subagent/lifecycle-tools.test.ts covers pretty-print round-trip and raw Error: prefixes

Fixes CL-7622

@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

CL-7622

@TheGreatAxios
TheGreatAxios merged commit 6682910 into main Sep 10, 2026
9 checks passed
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