Problem
--compact is described as "Output compact JSON without indentation (for AI/agents)" but it only affects printJson indentation. On list commands (project list, tag list, task list, te list) it still outputs human-readable tables that agents can't parse.
An agent using --compact expects JSON output everywhere. Currently it has to guess whether to use --json or --compact per command.
Solution
Add a wantsJson(opts) helper in src/core/runtime.ts that returns true when either --json or --compact is present. Replace all 49 if (opts.json) checks across 14 command files with wantsJson(opts).
This makes --compact consistently mean "give me compact JSON" everywhere, which is what the flag description promises.
Scope: 49 occurrences across 14 files — mechanical replacement, no logic changes.
Source
Agent feedback session 2 (2026-04-02) — Claude Opus 4.6
Problem
--compactis described as "Output compact JSON without indentation (for AI/agents)" but it only affectsprintJsonindentation. On list commands (project list,tag list,task list,te list) it still outputs human-readable tables that agents can't parse.An agent using
--compactexpects JSON output everywhere. Currently it has to guess whether to use--jsonor--compactper command.Solution
Add a
wantsJson(opts)helper insrc/core/runtime.tsthat returnstruewhen either--jsonor--compactis present. Replace all 49if (opts.json)checks across 14 command files withwantsJson(opts).This makes
--compactconsistently mean "give me compact JSON" everywhere, which is what the flag description promises.Scope: 49 occurrences across 14 files — mechanical replacement, no logic changes.
Source
Agent feedback session 2 (2026-04-02) — Claude Opus 4.6