Repository navigation
[Bug] DeepSeek V4 Flash remote auto-compaction needs v2.11+ reproduction #1128
Description
Area
Responses remote compaction / DeepSeek compatibility
Current status
This issue originally reported a deterministic remote auto-compaction failure with:
deepseek/deepseek-v4-flash
on OpenCodex 2.10.1 and 2.10.2.
The reported error was:
Error running remote compact task: stream disconnected before completion:
stream closed before response.completed
That report was valid for the 2.10.x transport behavior.
However, the transport premise changed in v2.11.0.
Commit:
0b8e608c
removed the DeepSeek-specific bounded-JSON forcing after live Responses probes showed that deepseek-v4-flash now emits proper terminal events.
Current OpenCodex therefore keeps the real SSE path instead of copying the old 2.10.x bounded-JSON policy into remote compaction.
This issue now tracks whether remote auto-compaction still fails on the current transport behavior.
Historical behavior on 2.10.x
On 2.10.1 / 2.10.2, the regular Responses path applied a DeepSeek-specific transport policy while the remote compact path did not.
That meant a regular turn could receive a synthesized terminal response while the compact path could end without the response.completed event required by Codex's remote-compaction collector.
The original reproduction therefore failed consistently during remote auto-compaction.
Manual /compact succeeded on the same:
- session;
- model;
- context.
That isolated the historical failure to the remote-compaction path rather than the model's ability to summarize or the context size.
What changed in v2.11.0
Live Responses probing subsequently showed that deepseek-v4-flash now produces valid SSE terminal events itself.
The DeepSeek-specific bounded-JSON force was therefore retired rather than propagated to additional paths.
Current expected terminal behavior includes one of:
response.completed
response.incomplete
response.failed
as appropriate for the request outcome.
Because the upstream contract changed, copying the old bounded-JSON policy into:
compact.ts
collaboration.ts
encrypted-payload.ts
is no longer the correct proposed implementation.
Draft PR #1167 pursued that older approach and was closed without merge after the transport change made it obsolete.
Current reproduction needed
Please retest against:
OpenCodex v2.11.0+
or current dev.
Use:
- built-in
deepseekprovider; deepseek-v4-flash;- Codex Desktop/App;
- remote auto-compaction, not only manual
/compact.
A session should be allowed to reach the automatic compaction threshold naturally or through a deterministic test configuration.
Expected behavior
Remote auto-compaction should complete successfully on deepseek-v4-flash.
The compact request should produce a valid terminal event sequence and Codex should receive a completed compact result instead of:
stream closed before response.completed
If the failure still reproduces
Capture the terminal event sequence from the remote compact request itself.
We need to know whether the upstream/adapter emits:
response.completed
response.incomplete
response.failed
[DONE]
and in what order.
Please include:
- exact OpenCodex version or commit;
- Codex Desktop/App version;
- provider and model;
- confirmation that the failure is from remote auto-compaction;
- the compact request's terminal SSE event sequence;
- the exact resulting OpenCodex/Codex error.
Credentials and prompt contents can be removed.
The terminal event sequence is the important evidence.
How to interpret the result
Auto-compaction succeeds on v2.11+
The historical 2.10.x failure no longer reproduces and this issue can be closed as resolved by the transport change introduced in:
0b8e608c
Auto-compaction still fails and no terminal event is emitted
That would establish a current provider/adapter terminal-event problem.
A valid terminal event is emitted but Codex still reports the stream closed
That would establish a current remote-compaction relay/collection bug rather than the historical bounded-JSON policy gap.
Those cases should be debugged from the current event trace rather than restoring the obsolete 2.10.x transport workaround.
Relationship to other DeepSeek issues
This issue is specifically about:
remote auto-compaction
and should remain separate from ordinary Responses request failures.
A normal /v1/responses failure and a remote-compaction failure travel through different code paths and can have different causes.
Acceptance / closure criteria
Close this issue if a current v2.11+ reproduction confirms that remote auto-compaction succeeds with deepseek-v4-flash.
Keep it open if the failure still reproduces, but update the issue with the current terminal-event trace and investigate it as a current compact-path defect.
Checks
- Historical
2.10.xfailure is preserved. - The old bounded-JSON implementation proposal is marked obsolete.
- The
v2.11.0transport change is documented. - Draft PR fix(responses): refuse input beyond the advertised context window (#1128) #1167 is recognized as obsolete and unmerged.
- Remote auto-compaction retested on
v2.11.0+or currentdev.
Activity
github-actions commentedon Aug 6, 2026
Automated translation bookkeeping — detected language: English.
c040340 commentedon Aug 6, 2026
Additional data point that isolates the failure to the remote-compact path:
Manual
/compactsucceeds on the same session, same model (deepseek-v4-flash), same context — while auto-compaction fails every time with the error above.This rules out the two explanations that would otherwise be natural here:
The summarisation only works when the request leaves through the regular turn path in
core.ts, whereproviderModelResponsesUpstreamStreamingforces the bounded-JSON upstream and a real terminal event is synthesized. Theremote compact taskpath is the one that never consults that policy, and it is the only one that fails.Note also that raising
model_auto_compact_token_limitis not a usable workaround — it does not fix compaction, it just defers it until the context is unmanageable.awillheartwu commentedon Aug 6, 2026
same here,compact failed
Ingwannu commentedon Aug 8, 2026
This report was valid for 2.10.1/2.10.2, but the transport premise changed in v2.11.0. Commit
0b8e608c(included in v2.11.0) retired the DeepSeek-specific bounded-JSON force after live Responses probes showeddeepseek-v4-flashnow emits a realresponse.completed/response.incomplete/response.failedterminal. Currentdevtherefore keeps true SSE instead of copying the old force into compact/collaboration paths; draft PR #1167 was closed without merge because that approach became obsolete.\n\nPlease retest remote auto-compaction on v2.11.0. If it still fails, attach the terminal event sequence from the compact request on that version; that would be a current compact relay bug rather than the missing 2.10.x bounded-JSON policy. Leaving this open pending that current-version control.[-][Bug]: Remote compaction always fails on deepseek-v4-flash - the #1026 bounded-JSON policy is not applied on the compact path[/-][+][Bug] DeepSeek V4 Flash remote auto-compaction needs v2.11+ reproduction[/+]Wibias commentedon Aug 10, 2026
Since this is now obsolete, please open a new issue if you still encounter this issue.