P7: Bounded, High-Signal Responses
Definition
CLI tools MUST provide mechanisms to control output volume. Agent context windows are finite and expensive — a tool that dumps 10,000 lines of unfiltered output wastes tokens and may exceed the context limit entirely, breaking the conversation that invoked it.
Why Agents Need It
Every token of CLI output an agent consumes has a cost — both monetary (API tokens) and cognitive (context window
capacity). Unbounded output forces the agent to either truncate (losing potentially important data) or consume the full
response (wasting context on noise). Bounded output with --quiet, --verbose, and --limit flags gives the agent
precise control over how much data arrives, keeping responses high-signal and inside budget.
Requirements
MUST:
-
A
--quietflag suppresses non-essential output: progress indicators, informational messages, decorative formatting. When--quietis set, only requested data and errors appear. Implementations typically route diagnostics through a macro that short-circuits when quiet is on:macro_rules! diag { ($cfg:expr, $($arg:tt)*) => { if !$cfg.quiet { eprintln!($($arg)*); } } } -
List operations clamp to a sensible default maximum. A
listwithout--limitdoes not return more than a configurable ceiling (e.g., 100 items). If more items exist, the output indicates truncation —"truncated": truein JSON, a stderr note in text mode.
SHOULD:
- A
--verboseflag (or-v/-vv) escalates diagnostic detail when agents need to debug failures. - A
--limitor--max-resultsflag lets callers request exactly the number of items they want. - A
--timeoutflag bounds execution time. An agent waiting indefinitely on a hung network call cannot proceed.
MAY:
- Cursor-based pagination flags (
--after,--before) for efficient traversal of large result sets. - Automatic verbosity reduction in non-TTY contexts (the same behavior
--quietexplicitly requests).
Evidence
--quietflag with a falsey-value parser and env-var binding.- A diagnostic macro (or equivalent gate) that short-circuits when
quietis true. --limitor--max-resultson every list / search command.- Pagination clamping logic (e.g.,
min(requested, MAX_RESULTS)). --timeoutflag with a sensible default.--verboseflag for diagnostic escalation.- A
suppress_diag()method that returns true when quiet is set or when the output format is JSON / JSONL.
Anti-Patterns
- List commands that return all results with no default limit — an agent listing 50,000 items floods its context window.
- No
--quietflag — agents consuming JSON output still receive interleaved diagnostic text on stderr. --verboseas the only output control. If there is no way to reduce output, bounded responses do not exist.- Progress bars or spinners that write to stderr in non-TTY contexts, adding noise to agent logs.
- No
--timeouton network operations. A stalled request blocks the agent indefinitely.
Measured by check IDs p7-quiet, p7-limit, p7-timeout. Run agentnative check --principle 7 . against
your CLI to see each.