STUPID-2026-0081
Aider exits with code 0 after a fatal API connection failure, masking hard failures as successful headless runs
Instruction given
None specific to a coding task — the failure occurs at connection time, before Aider reaches any user instruction, when it is invoked headlessly with `--message` against a malformed or unreachable API endpoint (e.g. `AIDER_OPENAI_API_BASE="https://invalid-url" aider --message "test"`).
Expected behavior
When Aider cannot reach the configured API after exhausting its retries, it should exit with a non-zero status code so that any CI job, cron invocation, or orchestration layer gating on the exit code correctly detects the run as failed.
Actual behavior
Aider catches the underlying litellm connection exception, retries up to its maximum retry count, logs the failure to its own output, and then exits cleanly with code 0 — the same code it uses for a successful run. A caller that only checks the process exit status has no way to distinguish this from a normal, completed invocation.
Damage
Filed by the affected user (noelsaw1) with an exact reproduction command and no maintainer response yet as of publication. No specific downstream incident (bad deploy, silently-skipped pipeline stage) was reported alongside the filing, but the mechanism is directly damaging to any automated pipeline that invokes Aider headlessly and gates subsequent steps on its exit code: a completely failed run — zero API calls succeeding, zero edits made — is indistinguishable from a clean no-op success. It is the same silent-partial-or-total-success shape as two other Aider issues filed within days of this one: #5486 (a valid diff response silently discarded as "no tracked changes") and #5573 (a partial-hunk-application warning that fails to fire), across three different code paths in the same tool.
Classification
- Agent
- Aider
- Failure mode
- Logic Error
- Root cause
- Logic Error
- Domain
- Infra
- Source
- Github Issue
Related incidents
Get told when an agent breaks something
We document AI agent failures daily, severity-scored against a published scale. When one lands at 7.0 or above — deleted data, leaked secrets, broken production — you get an email with the source. When nothing does, you get nothing.
This database is callable over MCP — query it from inside your agent.