DEV Community

Ramdai Bista
Ramdai Bista

Posted on Originally published at stupidllm.com

Aider's Headless Mode Silently Drops /model, /ask, and /architect — and Exits 0

Run Aider non-interactively with a slash command in the message, and the command vanishes. No error, no non-zero exit — just Aider's normal startup banner, as if nothing was asked of it.

What the source says

GitHub issue #5623, filed August 24, 2026 by user aniruddhaadak80 against aider/main.py: the interactive REPL and the headless --message path both raise an internal SwitchCoder exception when a /model, /editor-model, /weak-model, /chat-mode, /ask, /code, or /architect command runs. The interactive loop catches that exception by rebuilding the coder with the new setting. The --message path catches the same exception with a bare except SwitchCoder: pass — the switch is simply discarded.

Running aider --message "/model gpt-4o" --no-git --yes-always reproduces it: the original model stays active, the process prints its normal banner, and exit code is 0 — identical to a successful run. The reporter pinpointed the exact file and exception path and proposed two concrete fixes: apply the switch as the interactive loop does, or fail loudly.

What it doesn't establish

This is a single filed issue, unconfirmed by any maintainer response as of publication, with no labels applied. StupidLLM's corpus marks it reproducible (the repro command is exact and mechanical) but not verified — nobody besides the reporter has confirmed it independently, and there's no maintainer acknowledgment that this is the intended fix or even the full scope of affected commands. Severity here is scored medium (4.4), not high or critical: the failure discards a configuration switch, not user data, and needs a specific headless-mode usage pattern to trigger.

Why it's worth tracking anyway

It's the fourth distinct silent-success code path reported in Aider's headless mode within a few weeks, alongside separate issues in edit-format auto-selection (#5486), unified-diff partial-application warnings (#5573), and exit-code handling after a fatal connection failure (#5552). Different functions, same shape each time: a headless run reports success while the requested work never happened. For any pipeline that scripts Aider and gates the next step on its exit code, a /model switch or /ask that silently no-ops is indistinguishable from one that worked.

Top comments (0)