Unexpected Markdown Output When Piping
If the output of the command line client is piped to another process and an AI agent environment variable (such as AI_AGENT) is set, the CLI switches to agent mode and prints compact Markdown tables instead of the usual duckbox tables:
echo "SELECT 42 AS x;" | duckdb | cat
| x:INTEGER |
|---|
| 42 |
To turn off agent mode, use the -no-agent command line argument or set the DUCKDB_AGENT_MODE environment variable to 0:
echo "SELECT 42 AS x;" | duckdb -no-agent | cat
┌───────┐
│ x │
│ int32 │
├───────┤
│ 42 │
└───────┘
Passing an explicit output mode flag, such as -csv or -json, also disables agent mode.
© 2026 DuckDB Foundation, Amsterdam NL