GitHub
10/23/2026, 9:30 PMmeltano through a pipe. The default CLI output is built for people at a terminal, so agents pay for it in tokens and can misread partial output as complete. DuckDB recently shipped an "agent mode" for the same reason: https://duckdb.org/2026/10/09/agent-mode
Problems today
• meltano run output is noisy (colors, progress, long tap/target stderr), and there's no end-of-run summary of records per stream, state written, duration, or which block failed.
• Machine-readable output is inconsistent: --format json exists on config, job list, plugin list, logs, schedule list, state list and hub, but select uses --json.
• Errors are plain text, so agents have to parse them.
• There's no compact way to get an overview of a project.
Proposal
A presentation-only mode that changes output defaults and never changes semantics (exit codes, state, behavior).
1. Detection. Enable the mode when an agent is detected and stdout is not a TTY and no explicit format is given.
• Add --agent / --no-agent and MELTANO_AGENT_MODE=0|1 overrides.
• Print one stderr line saying why the mode is on and how to disable it.
• Explicit settings (--log-format, --format, cli.log_format, etc.) always win.
2. Logging. Default to JSON logs with no color and no progress animation (mostly a default change, since cli.log_format exists).
3. Run summary. Print a compact summary at the end of meltano run. Truncate only terminal output, state clearly that it was truncated and give the total, and keep full logs available via meltano logs.
4. Structured output. Default list-style commands to JSON and make --format / --json consistent across commands.
5. Structured errors. Emit MeltanoError as JSON on stderr, including the existing next-step hint.
6. Docs. Add a short page (and possibly meltano --help agent) describing the mode and the most useful commands for agents.
Agent detection
`agent-detector` (MIT, dependency-free, Python 3.9+, 17 agents, AI_AGENT override) covers detection. It returns the agent, a confidence level and the matched signal, never env values.
Considerations:
• v2.0.0 is marked "Alpha" on PyPI, and the agent list will keep changing, so we should decide between depending on it and vendoring a small helper.
• Wrap it in a single function (e.g. meltano.core.agent.detect()) so that decision is reversible.
• Require at least medium confidence, plus non-TTY stdout, before enabling the mode.
• Detection is best-effort and must never gate behavior beyond presentation.
Suggested first slice
Detection helper + --agent flag, JSON-log/no-color defaults, and the meltano run summary. Structured errors and --json consistency can follow (and are useful on their own).
meltano/meltano