Compact fails using azure openai if not using v1 endpoint

Resolved 💬 2 comments Opened Jun 2, 2026 by Waffleboy Closed Jun 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

26.601.20914

What subscription do you have?

Azure

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

Compact fails if using codex and Azure OpenAI as Azure does not have the compact endpoint (As of today 2/6/26). it will just terminate with 'remote disconnected' which is a misleading error.

The fix is to fall back to local compaction using the current model, or to use the v1 endpoint in azure (but its not documented anywhere).

I have a PR to fix this

What steps can reproduce the bug?

Set

[model_providers.azure]
name = "Azure OpenAI"
base_url = "https://<domain>.openai.azure.com/openai/"

then burst the context window to trigger compaction. it wont work unless you append v1 to the end.

What is the expected behavior?

Compaction works

Additional information

I have a pr that allows codex to fallback to local compaction if remote fails.

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #25534

Powered by Codex Action

etraut-openai contributor · 1 month ago

Thanks for reporting this problem. Until recently, Codex used a separate endpoint and server-side logic for compaction. We recently switched to a more robust approach where the compaction logic is moved locally using the same endpoint as normal turns. This eliminates "remote compaction" errors and increases the stability and reliability of compaction operations. If you see further problems with compaction, please use /feedback and open a new bug report.