Skip to content

[codex] Honor disabled compression for reactive compaction - #9200

Merged
diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.50from
joachimBrindeau:fix/compaction-honors-disabled-compression
Aug 6, 2026
Merged

diegosouzapw merged 2 commits into
cheaper-inference:release/v3.8.50from
joachimBrindeau:fix/compaction-honors-disabled-compression

Conversation

@joachimBrindeau

@joachimBrindeau joachimBrindeau commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • Gate proactive reactive context compaction on the global compression setting.
  • Gate the last-resort compaction pass on the same setting.
  • Add a regression test that locks both conditions to compressionSettingsResult.enabled.

Root cause

The dashboard global compression switch disabled the optional prompt-compression engines, but chatCore still ran its built-in reactive and last-resort compressContext passes. As a result, histories could still be rewritten with compression disabled, including removal of old tool-use/tool-result blocks. That can leave clients such as Pi and Codex with invalid tool-call histories on later turns.

Impact

When compression is globally off (or the model/provider is excluded), OmniRoute now forwards the history without proxy-side reactive compaction. When compression is enabled, existing proactive and last-resort behavior is unchanged.

Validation

  • node --test tests/unit/reactive-context-compaction-policy.test.mjs
  • npm run typecheck:core
  • git diff --check
  • Prettier on both changed files

Related

@joachimBrindeau
joachimBrindeau marked this pull request as ready for review August 2, 2026 07:44
@diegosouzapw
diegosouzapw merged commit d5aa7e3 into cheaper-inference:release/v3.8.50 Aug 6, 2026
3 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…nference#9200)

Validated in local merge-train (devbox-vm-06-dev002) @ combined-tip (FAST gates green: static + changed tests + vitest — only pre-existing audit.test.ts flake). Evidence: /home/diegosouzapw/dev/proxys/OmniRoute/.claude/worktrees/merge-train-20260805-213228-suite.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants