You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compaction failed: received empty response from model (3x retry, manual /compact on Opus 4.6) #2861
Running /compact manually in a short session (< 30 turns) on Claude Opus 4.6 produces three consecutive failures:
X Compaction Failed: Error: Compaction failed: received empty response from model
X Compaction Failed: Error: Compaction failed: received empty response from model
X Compaction Failed: Error: Compaction failed: received empty response from model
The session remained usable — after one additional turn (wasting a premium request), a subsequent /compact succeeded normally.
Affected version
1.0.34
Steps to reproduce the behavior
Start a session using Claude Opus 4.6.
Work through a task (commit pushed, environment reloaded mid-session — MCP servers, extensions, hooks, agents, skills all reloaded at the same time).
Run /compact manually.
Observe three consecutive Compaction failed: received empty response from model errors.
Expected behavior
/compact should succeed, or at minimum degrade gracefully (e.g., retry with a different summarization strategy rather than repeating the same failing call three times).
MCP servers: 0 connected at the time of failure (had just reloaded)
Recovery: Session continued normally after one additional turn, then /compact worked — but this wasted a premium request on the recovery turn.
The environment reload (MCP Servers reloaded: 0 servers connected, mermaid-render extension loaded, Environment loaded: ...) occurred immediately before the compaction failures, which may be relevant — the compaction model may have received an unusual message history containing reload notifications.
I can reproduce this on a substantially newer version, with evidence that the model response is not actually empty.
Environment
Copilot CLI 1.0.82
Linux x86_64
Manual /compact
Two consecutive reproductions
Attempt
Context before compact
Prompt tokens
Completion tokens
Final text returned
1
415,001
397,306
10,172
26,188 characters
2
502,122
487,598
8,428
21,823 characters
Both /responses calls completed normally over HTTP with finish_reason: stop, responses_message_status: completed, and a non-empty final_answer. The returned compaction text was structurally valid (<overview>, <next_steps>, and <checkpoint_title> sections).
The streamed event sequence contained several reasoning-only assistant messages with empty content, followed by one final assistant message with the non-empty summary. Despite that, the native compactionRunModelCall path returned Compaction failed: received empty response from model, so the summary was not applied.
The session remained usable and its original transcript was preserved. This looks like stream aggregation selecting an empty reasoning message instead of the later non-empty final-answer message, rather than the model returning no response.
I reproduced this behavior in two Copilot CLI releases: 1.0.81 and 1.0.82. In the 1.0.82 run, three streamed assistant messages contained reasoning content but no text before a complete 22,877-character final answer. The CLI still logged received empty response from model 343 ms after that answer. My next /compact succeeded after I switched from GPT-5.6 Sol to Claude Opus 5, then failed after I switched back. I have also seen /compact fail with Claude Opus 5 and succeed after a switch to GPT-5.6 Sol. The pattern suggests that the CLI may be combining streamed messages incorrectly. Changing models and retrying has worked in either direction. No particular model has been consistently successful.
Additional reproduction with GPT-6 Astra long context, observed through GitHub Copilot App with Copilot CLI 1.0.84-1.
A manual compaction began with approximately 448k tokens, within the model's advertised long-context capacity.
After approximately 6m43s, it failed with Compaction failed: received empty response from model.
The session remained recoverable and its transcript was preserved.
A later compaction whose model call began on GPT-6 Astra succeeded at 252,130 pre-compaction tokens, reducing the history to 67,203 tokens (184,927 tokens removed). It took approximately 10m36s.
A compaction using another model also succeeded with a larger input than the failed Astra attempt.
This was not accompanied by a 413 or serialized-request-size error, so it appears distinct from the 5 MB request-limit failure mode. The contrasting failed and successful Astra attempts suggest the issue is intermittent or input/stream-shape dependent rather than a simple advertised-context-limit overflow.
I did not capture the raw /responses stream for the failed attempt, so I cannot independently confirm whether a valid final answer was present and later discarded. However, the exact CLI error and the model-switch recovery behavior align with the stream-aggregation evidence already reported in this thread.
This appears to be resolved as of GitHub Copilot CLI v1.0.89. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.
Activity
jay-tau commentedon Aug 30, 2026
I can reproduce this on a substantially newer version, with evidence that the model response is not actually empty.
Environment
1.0.82/compactTwo consecutive reproductions
Both
/responsescalls completed normally over HTTP withfinish_reason: stop,responses_message_status: completed, and a non-emptyfinal_answer. The returned compaction text was structurally valid (<overview>,<next_steps>, and<checkpoint_title>sections).The streamed event sequence contained several reasoning-only assistant messages with empty
content, followed by one final assistant message with the non-empty summary. Despite that, the nativecompactionRunModelCallpath returnedCompaction failed: received empty response from model, so the summary was not applied.The session remained usable and its original transcript was preserved. This looks like stream aggregation selecting an empty reasoning message instead of the later non-empty final-answer message, rather than the model returning no response.
MattPD commentedon Aug 31, 2026
I reproduced this behavior in two Copilot CLI releases: 1.0.81 and 1.0.82. In the 1.0.82 run, three streamed assistant messages contained reasoning content but no text before a complete 22,877-character final answer. The CLI still logged
received empty response from model343 ms after that answer. My next/compactsucceeded after I switched from GPT-5.6 Sol to Claude Opus 5, then failed after I switched back. I have also seen/compactfail with Claude Opus 5 and succeed after a switch to GPT-5.6 Sol. The pattern suggests that the CLI may be combining streamed messages incorrectly. Changing models and retrying has worked in either direction. No particular model has been consistently successful.DavidTeju commentedon Sep 2, 2026
I reproduced this btw
megasilk53 commentedon Sep 3, 2026
Reproduces readily with GPT-5.6 Luna · 1.1M context (63%)
GitHub Copilot CLI 1.0.82 (Linux x86_64)
ja552588 commentedon Sep 3, 2026
PureWeen commentedon Sep 8, 2026
Additional reproduction with GPT-6 Astra long context, observed through GitHub Copilot App with Copilot CLI 1.0.84-1.
Compaction failed: received empty response from model.This was not accompanied by a 413 or serialized-request-size error, so it appears distinct from the 5 MB request-limit failure mode. The contrasting failed and successful Astra attempts suggest the issue is intermittent or input/stream-shape dependent rather than a simple advertised-context-limit overflow.
I did not capture the raw
/responsesstream for the failed attempt, so I cannot independently confirm whether a valid final answer was present and later discarded. However, the exact CLI error and the model-switch recovery behavior align with the stream-aggregation evidence already reported in this thread.copilot-cli-bot commentedon Sep 29, 2026
This appears to be resolved as of GitHub Copilot CLI v1.0.89. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.