Regression: forced remote compaction removes local fallback and compaction visibility
Resolved 💬 6 comments Opened Feb 7, 2026 by ignatremizov Closed Mar 20, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What issue are you seeing?
#10840 removed the remote_compaction feature flag and now forces remote compaction for OpenAI providers with no local fallback path.
This is a regression for workflows that depend on local compaction behavior:
- cannot run local/plaintext compaction with OpenAI provider anymore
- cannot reliably prepend/append deterministic context for compaction in local path
- user-visible compaction text is often unavailable as remote output is encrypted
Relevant commits:
dd80e332cremovedremote_compactionand made OpenAI always use remote (should_use_remote_compact_task(provider) -> provider.is_openai()).ba8b5d901made compaction failures terminal for the turn path, with no local fallback.143daadb3further centered replacement-history processing around remote compaction output.
Code points:
codex-rs/core/src/compact.rs:35codex-rs/core/src/codex.rs:3943codex-rs/core/src/compact_remote.rs:93codex-rs/protocol/src/protocol.rs:1129(ContextCompactedEventis empty)codex-rs/app-server-protocol/src/protocol/v2.rs:2872(thread/compactedmarked deprecated)
This also intersects with:
- #10336 (exposing compaction summary/prompt to users)
- #9800 (remote compact failures)
- #5957 (compaction-induced context loss)
What steps can reproduce the bug?
- Use
openaiprovider on currentmain(afterdd80e332). - Attempt to disable remote compaction in config (
features.remote_compaction) - option no longer exists. - Trigger
/compactor auto-compaction. - Observe that compaction is forced through remote path; local compaction prompt customization path cannot be used for OpenAI provider.
- If remote compaction output is encrypted-only, there is no reliable plaintext compacted prompt/summary for downstream UIs and tools.
What is the expected behavior?
At least one of these should be supported:
- Restore a supported opt-out for remote compaction (e.g.
remote_compaction=false) so OpenAI provider can use local compaction path when needed. - Keep remote compaction default, but add fallback-to-local when remote compact fails.
- If remote-only is required, provide plaintext compaction summary/message fields through supported events/items whenever available, so users can inspect post-compaction context.
Additional information
This is distinct from pure feature requests about richer UI. It is a behavior regression in configurability and debuggability introduced by forcing remote compaction with no local escape hatch.
If the long-term direction is remote-only, please document the migration path and provide equivalent observability APIs before removing local behavior.
6 Comments
You mentioned "observability APIs". Can you say more about your use case?
Thank you for the reply. By "observability APIs" I mean exposing the actual post-compaction context artifact in a machine-readable way, so clients can show/debug what changed after
/compactor auto-compact (ref: #5957, #10336).My concrete use case is:
experimental_compact_prompt_file(for example the prompt from https://github.com/openai/codex/issues/5957#issuecomment-3831297422), and I need to verify that the resulting compacted output matches that prompt’s intentthread_id/turn_idI prototyped this in [my fork](github.com/ignatremizov/codex) (branch
feat/compact-summary-output, current commite919d5500, codex sessions019bbd09-72c6-76a1-abbd-d61ee9005f7b,019c1a76-b2d5-7b90-9280-85e71bd11b07):ContextCompactedcarries optionalsummaryandmessagethread/compactednotification includes those fieldscodex exec --jsonemitsContextCompactedwith the same payloadThe main concern is: if remote compaction is forced and output is encrypted-only, downstream clients lose this observability unless there is an official plaintext field path when available.
Example:
<img width="695" height="780" alt="Image" src="https://github.com/user-attachments/assets/7e8e6eed-5edf-4d74-9b41-eaa5fedd09d8" />
<img width="704" height="718" alt="Image" src="https://github.com/user-attachments/assets/e790cd08-1d84-48e7-ad2f-15654760032f" />
Here after this compaction, I can know exactly what is the state. Certain variables are no longer in context. Certain discussion points are missing. Whole-summary state from beginning of thread is missing. But, it is now focused on the ongoing rebase conflict resolution work. If I just had "Context compacted." - I would have no way of knowing for sure what the model now knows/doesn't know
@etraut-openai having the compaction summary visible would help alleviate issues like #5957 #9734 #9743 #9800 #11174
This feature request hasn't received enough upvotes, so closing.
But this would resolve many issues with compaction observability and debugging long-running sessions - you can see dozens of issues opened about this, and I proposed a concrete fix? I'll try to get more eyes on this then