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:
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:
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:
or current dev.
Use:
- built-in
deepseek provider;
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:
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:
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
Area
Responses remote compaction / DeepSeek compatibility
Current status
This issue originally reported a deterministic remote auto-compaction failure with:
on OpenCodex
2.10.1and2.10.2.The reported error was:
That report was valid for the
2.10.xtransport behavior.However, the transport premise changed in
v2.11.0.Commit:
removed the DeepSeek-specific bounded-JSON forcing after live Responses probes showed that
deepseek-v4-flashnow emits proper terminal events.Current OpenCodex therefore keeps the real SSE path instead of copying the old
2.10.xbounded-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.completedevent required by Codex's remote-compaction collector.The original reproduction therefore failed consistently during remote auto-compaction.
Manual
/compactsucceeded on the same: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-flashnow 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:
as appropriate for the request outcome.
Because the upstream contract changed, copying the old bounded-JSON policy into:
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:
or current
dev.Use:
deepseekprovider;deepseek-v4-flash;/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:
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:
and in what order.
Please include:
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.xfailure no longer reproduces and this issue can be closed as resolved by the transport change introduced in: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.xtransport workaround.Relationship to other DeepSeek issues
This issue is specifically about:
and should remain separate from ordinary Responses request failures.
A normal
/v1/responsesfailure 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 withdeepseek-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
2.10.xfailure is preserved.v2.11.0transport change is documented.v2.11.0+or currentdev.