Skip to content

Drop TOON output support (--toon flag and toon-go dependency) #28

Closed

Description

@quinnmil

Proposal

Drop TOON output support: the --toon flag, the auto-enable-when-piped behavior, and the toon-format/toon-go dependency. Keep --json as the CLI's one structured output format, and consider auto-enabling --json when stdout isn't a terminal so scripts/agents still get structured output with zero flags.

Why

TOON was added experimentally in v0.3.0 as a token-efficient, LLM-friendly alternative to JSON, auto-enabled whenever output is piped. A pre-1.0 audit surfaced enough problems that it's worth reconsidering rather than patching around them:

  • scout traces show produces invalid TOON when piped — the default, agent-facing path. Root cause is toon-go failing to round-trip a struct with 2+ levels of nested list-of-structs (reproducible in a minimal repro with no Scout code involved).
  • --toon and --json disagree on key names and field sets for every other struct-backed command (e.g. apps list --json → id/name; --toon → ID/Name/LastReportedAt, PascalCase, omitempty ignored). Cause: toon-go reads a toon: struct tag that none of this codebase's types define, so it silently falls back to raw Go field names.
  • TOON output has no trailing newline, so piped output runs into whatever the next line in the pipeline is.

None of these are really "bugs Scout introduced" so much as immaturity in the format and its Go port:

  • Thoughtworks' Technology Radar (Apr 2026) places TOON at "Assess" — their lowest-commitment tier, meaning "worth exploring," not "ready to build on." Thoughtworks' own description calls it "an idea in progress... nothing set in stone."
  • toon-format/toon-go, the dependency this CLI uses, is pinned to an untagged pseudo-version — there's no released version of the Go port at all, and TOON's reference implementation is TypeScript, not Go.
  • Current industry guidance for CLI-agent output consistently lands on plain --json (zero translation loss, universally supported) or plain markdown tables, not a bespoke serialization format — see You Need to Rewrite Your CLI for AI Agents and AI Agents Are Your New Users.
  • Scout's own MCP server is the better-suited channel for "an agent wants structured Scout data" today — it hands the agent a typed tool schema up front, which is exactly the setup 2026 sources describe as the right fit for agent-native, structured access. The CLI's job for agent consumption is now secondary (scripting / ad hoc shell use), where plain JSON is fine.

Given all of that, carrying an unreleased dependency's encoding bugs as scout-cli's own bugs, to serve a use case the MCP server already covers better, isn't worth it right now. TOON can be revisited later if the spec/ecosystem matures (a tagged Go release, wider adoption) or a specific integration justifies the token savings enough to accept the risk.

Scope

  • Remove --toon flag and the toonOutput auto-detection in cmd/root.go.
  • Remove outputTOON and the toon-format/toon-go import/dependency (go.mod, go.sum).
  • Decide and implement the piped-output default: either keep requiring explicit --json, or auto-enable --json when stdout isn't a terminal (mirrors the old TOON behavior's "zero-config for scripts/agents" goal without the format itself).
  • Update README's "LLM / Agent Usage" section and the --toon references throughout the Usage examples.
  • Update CHANGELOG (## Pending → note the removal, referencing this issue and the original TOON PR).
  • Remove any TOON-specific tests.

Found during

A pre-1.0 audit of the whole CLI.

Activity

  1. added a commit that references this issue on Sep 10, 2026
    d09a961
  2. linked a pull request that will close this issueDrop TOON output support #33on Sep 10, 2026
  3. added 3 commits that reference this issue on Sep 11, 2026
    54ebdbe
    e3212ab
    3e3d631
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions