TL;DR: TOON reduces the token overhead of feeding structured issue data into AI coding agents because repeated JSON syntax is the main drag, Sonar says. Uniform records can keep the same meaning while using fewer tokens, which changes how expensive agent workflows are to run.
Editorial analysis by NHI Mgmt Group, based on content published by Sonar: “Tokenomics of quality: switch sonar list issues to --format toon for measured token savings”.
Key questions
Q: When does compact structured output work better than JSON for agent workflows?
A: It works best when the data is uniform, record-based, and consumed by a machine rather than a person.
Q: What do security and platform teams get wrong about AI context cost?
A: They often focus on model choice and ignore the cost of the data shape that enters the model.
Q: How should teams reduce token costs when AI coding agents read tool output?
A: Start by changing the most repetitive feeds first, such as issue lists and dependency-risk results, because schema repetition often costs more tokens than the useful content itself.
Practitioner guidance
- Standardise compact output for agent-fed issue lists Use TOON for uniform tool outputs such as issue lists, dependency-risk results, and other record-based feeds that are repeatedly passed into AI coding agents.
- Measure token savings on real payloads Run representative Sonar outputs through a token or stats check so you can compare JSON and TOON on your own data rather than assuming the benefit will be uniform.
- Reserve JSON for irregular structures Keep JSON where nested relationships, variable objects, or downstream integrations depend on explicit hierarchy that a compact row format would obscure.
Bottom line: TOON reduces the token overhead of feeding structured issue data into AI coding agents without changing the underlying information content.
Glossary terms: TOON, Context Window, Structured Output, Token Efficiency
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
TOON is a context-governance control, not just a formatting tweak. When agents ingest tool output, the organisation is spending model context on repetition as well as on substance. That means output encoding belongs in the same conversation as prompt scope, retrieval design, and tool permissions. Practitioners should treat schema compactness as part of AI operational control, not as an afterthought.
A question worth separating out:
Q: Should organisations treat agent output format as part of AI governance?
A: Yes, because output encoding affects cost, efficiency, and the consistency of downstream agent decisions. Governance does not stop at access controls or prompt rules. It also needs standards for what data gets exposed to the model and in what representation, especially in high-volume developer workflows.
👉 Read our full editorial: TOON issue output can lower agent token costs without losing data