Compact fails in CLI and Codex VS Code Extension
Resolved 💬 16 comments Opened Apr 22, 2026 by douglasware Closed Jun 29, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.122.0
What subscription do you have?
Using Azure Foundry
Which model were you using?
gpt-5.3-codex, gpt-5.4
What platform is your computer?
Windows 11
What terminal emulator and version are you using (if applicable)?
VSCode, Windows Terminal
What issue are you seeing?
Yesterday this began appearing. When a chat gets to the compaction it fails 100% of the time and cannot be continued.
Error running remote compact task: We're currently experiencing high demand, which may cause temporary errors.
What steps can reproduce the bug?
Use Azure Foundry deployment.
Attempt manual compaction or hit the auto-compact threshold.
What is the expected behavior?
Be usable for long conversations without fatal conversation blocking failures.
Additional information
Chat works fine. Whatever this "remote" job is? Is not.
We presume it is in fact a data exfiltration and privacy issue. Why are you sending my conversation to some remote service that isn't using my deployments???
16 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Please report the problem to the Azure folks. Based on the error message, it sounds like they have capacity issues.
They do not. It isn't sending it to my subscription, I can see the network traffic and there are literally 0 problems with the many other systems burning millions of tokens per hour in our tenant, just Codex.
Please re-add the tag and fix your defects.
Also, that reply was super helpful and is going in our slide-deck as we lobby for less spend on OpenAI models and more on Anthropic. Thanks for your support! <3
Compaction is done by a separate remote compaction endpoint. Azure just recently implemented this endpoint, which might explain why you just started to see this problem a few days ago. Prior to that, the Codex harness feel back to local compaction for Azure users, which is suboptimal.
Based on the error you're seeing, it sounds like there's an issue with Azure's compaction endpoint. It's possible that they have plenty of capacity allocated for the primary "responses" endpoint but not for the compaction endpoint. It's important to report the issue to them so they know that they may need to make server-side capacity adjustments to address this issue.
i am using chatgpt subscription and facing this issue in cli as well as vscode extension
I was facing the same issue. updating azure url to v1 in config, and removing api_version did the trick for me.
Adding /v1 causes {"error":{"code":"BadRequest","message":"API version not supported"}} for me. codex-cli 0.123.0
weird. works just fine for me.
here's the exact azure config I am using.
I'm on 0.123 as well. remember to remove
api-versionalso if it existsIf I hit https://<resource>.openai.azure.com/openai/responses/v1 with curl the API works, but codex (for me) builds the URL using your example as https://<resource>.openai.azure.com/openai/v1/responses.
/shrug
My man, you had a helpful answer instead of pointing the finger and saying (It's another one fault), honestly , you have a product that people use, they have been reporting this issue for weeks now and i was not able to find a workaround from no one.
Microsoft will say its OpenAI's fault and OpenAI says its Azure's fault, not my problem but yours if you are claiming Azure OpenAI works in Codex. (Dont feel offended, it's just my opinion!)
Anyways thank you @dhruv2295 you actually saved me time and headaches
@dhruv2295 and @apelsito thanks for the posts. I was being stupid and failed to remove the api-version after adding /v1.
The man to thank is @dhruv2295 !! But i'm glad it worked out for you too! Cheers @douglasware
Also seeing this on Codex Desktop for macOS.
Thread ID:
019e0390-d329-74c3-b8ab-13a32d339c9bCodex App:
26.429.61741 (2429)Error:
This is still happening today (2026-05-07).
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
/feedbackand open a new bug report.