Repository navigation
Regression: forced remote compaction removes local fallback and compaction visibility #10986
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
contextIssues related to context management (including compaction)Issues related to context management (including compaction)enhancementNew feature or requestNew feature or requestsessionIssues involving session (thread) management, resuming, forking, naming, archivingIssues involving session (thread) management, resuming, forking, naming, archiving
Description
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:
- Expose compaction summary/prompt to users (keep thread/compacted or add fields to contextCompaction) #10336 (exposing compaction summary/prompt to users)
- Error running remote compact task #9800 (remote compact failures)
- Auto compaction causes GPT-5-Codex to lose the plot. It forgets it is mid-task, forgets it has edited files and stops. #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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
contextIssues related to context management (including compaction)Issues related to context management (including compaction)enhancementNew feature or requestNew feature or requestsessionIssues involving session (thread) management, resuming, forking, naming, archivingIssues involving session (thread) management, resuming, forking, naming, archiving
Activity
etraut-openai commentedon Feb 7, 2026
You mentioned "observability APIs". Can you say more about your use case?
ignatremizov commentedon Feb 7, 2026
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 Auto compaction causes GPT-5-Codex to lose the plot. It forgets it is mid-task, forgets it has edited files and stops. #5957 (comment)), and I need to verify that the resulting compacted output matches that prompt’s intentthread_id/turn_idI prototyped this in my fork (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.
ignatremizov commentedon Feb 7, 2026
Example:

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
ignatremizov commentedon Feb 9, 2026
@etraut-openai having the compaction summary visible would help alleviate issues like #5957 #9734 #9743 #9800 #11174
etraut-openai commentedon Mar 20, 2026
This feature request hasn't received enough upvotes, so closing.
ignatremizov commentedon Mar 21, 2026
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