Failed to get response from the AI model; retried 5 times; Last error: Unknown error
- Dominant language
- Shell
- Stars
- 11.2k
- Forks
- 1.9k
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 6
Description
## Describe the bug
On 2026-02-23, Copilot CLI repeatedly failed during normal chat turns with automatic retries, burning premium requests without returning usable output.
I observed two failure modes in the same incident window:
- `Failed to get response from the AI model; retried 5 times; Last error: Unknown error`
- `CAPIError: 400 400 Bad Request` (with Request-ID), also retried repeatedly
Example failure:
The issue persisted after exiting Copilot CLI and resuming the session with `/resume`.
Switching models did not resolve it (Claude Sonnet 4.5, Claude Haiku 4.5, Gemini 3 Pro Preview).
This issue exhausted my premium requests today due to repeated automatic retries and re-sends of context during failure loops.
## Affected version
`GitHub Copilot CLI 0.0.414`
## Steps to reproduce the behavior
1. Start Copilot CLI in an existing session with prior context.
2. Run normal prompts, then continue with retry/continue style prompts after a failure.
3. Observe repeated retry loops and eventual query failure.
4. Switch model (Sonnet -> Haiku -> Gemini) and retry.
5. Exit Copilot CLI, then resume session using `/resume`.
6. Observe failures continue, including repeated `400 Bad Request` on later attempts.
## Expected behavior
Copilot CLI should either:
- recover and return a response after transient backend errors, or
- fail fast with a clear actionable reason and avoid repeated paid retries for the same invalid/unserviceable request path.
Switching model or resuming session should not keep replaying a failing pattern indefinitely.
## Additional context
- OS: Linux
- Shell: bash
- Incident date: 2026-02-23
- Models attempted: Claude Sonnet 4.5, Claude Haiku 4.5, Gemini 3 Pro Preview
- Session behavior: persisted across exit + `/resume`
Observed errors:
- `Failed to get response from the AI model; retried 5 times; Last error: Unknown error`
- `CAPIError: 400 400 Bad Request`
Request-IDs captured from logs:
- `9BE4:71AB1:11F1B88:1569739:699C1D4F`
- `9BE4:71AB1:11F45BA:156C643:699C1D53`
- `9BE4:71AB1:11F757D:156FB2A:699C1D5C`
- `9BE4:71AB1:11FB120:1573D46:699C1D68`
- `9BE4:71AB1:12008C3:1579E68:699C1D75`
- `9BE4:71AB1:120678E:1580847:699C1D88`
- `9BE4:71AB1:1212A42:158E05B:699C1DC5`
- `9BE4:71AB1:12153DB:1590E66:699C1DC8`
- `9BE4:71AB1:12181A3:1594130:699C1DD2`
- `9BE4:71AB1:121B746:1597C52:699C1DDC`
- `9BE4:71AB1:121F978:159C676:699C1DE7`
- `9BE4:71AB1:122550A:15A2C11:699C1DF6`
Contributor guide
Assessment
This issue has not been assessed yet.