Skip to content

feat(cli): automatically detect coding agents - #145

Merged
francoischalifour merged 1 commit into
mainfrom
fc/agent-detection
Oct 15, 2026
Merged

francoischalifour merged 1 commit into
mainfrom
fc/agent-detection

Conversation

@francoischalifour

@francoischalifour francoischalifour commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Coding agents currently need to pass --agent on every invocation to receive structured output. Inspired by DuckDB’s agent detection, this change automatically enables the existing agent preset when a recognized agent environment marker is nonempty, stdout is not a terminal, and no explicit output format was requested.

Detection happens before command parsing, so agents receive structured help and JSON errors as well as JSON results. Explicit --json and --format selections bypass automatic detection.

Add --no-agent and ALTERTABLE_AGENT_MODE=1|0 overrides. CLI flags take precedence over the environment, and --no-agent wins when both flags are supplied. Existing preset restrictions remain: commands that stream subprocess output, such as app build and app dev, require --no-agent in detected agent environments.

Update documentation and generated command references, add regression coverage, and isolate human-output tests from inherited agent settings.

Enable the existing agent preset for recognized agent environments when stdout is piped and no explicit output format was requested. Select it before parsing so help and parse errors remain machine readable.

Add --no-agent and ALTERTABLE_AGENT_MODE overrides, preserve explicit format behavior, and isolate human-mode tests from inherited agent markers.
@francoischalifour
francoischalifour merged commit 6049d7e into main Oct 15, 2026
13 checks passed
@francoischalifour
francoischalifour deleted the fc/agent-detection branch October 15, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants