Repeated 413 errors on compaction
Resolved 💬 5 comments Opened Feb 11, 2026 by Plantain Closed Jun 29, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of the IDE extension are you using?
0.4.71
What subscription do you have?
Pro
Which IDE are you using?
VS Code
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
Repeatedly get into this state after a while on the same task and unable to make progress - any subsequent message triggers a compaction. Resuming the chat results in the same.
Error running remote compact task: unexpected status 413 Payload Too Large: <html> <head><title>413 Payload Too Large</title></head> <body> <center><h1>413 Payload Too Large</h1></center> <hr><center>cloudflare</center> </body> </html>, url: https://chatgpt.com/backend-api/codex/responses/compact, cf-ray: 9cc3e53b69144874-BNE
Chatid 019c409c-983c-7dd2-b322-63d83b95de2c
What steps can reproduce the bug?
Long tasks with many compactions.
What is the expected behavior?
_No response_
Additional information
_No response_
5 Comments
Error running remote compact task: unexpected status 413 Payload Too Large: <html> <head><title>413 Payload Too Large</title></head> <body> <center><h1>413 Payload Too Large</h1></center> <hr><center>cloudflare</center> </body> </html>, url: https://chatgpt.com/backend-api/codex/responses/compact, cf-ray: 9d2276fa7aa45aac-MEL
I hit this with Codex CLI (not an IDE integration). Agent halted unexpectedly with 413 Payload Too Large, and any attempt to continue failed with 413. Compaction also failed with 413. thread ID 019c8df6-36df-79f3-99df-30d0e7fe6697
I’m also hitting this consistently in ChatGPT Codex.
Symptoms:
https://chatgpt.com/backend-api/codex/responses/compact
Observed error:
Error running remote compact task: unexpected status 413 Payload Too Large:
<html><head><title>413 Payload Too Large</title></head>
<body><center><h1>413 Payload Too Large</h1></center>
<hr><center>cloudflare</center></body></html>
cf-ray: 9db96b4fa9ef40fc-SIN
What makes this especially bad:
Expected behavior:
If useful, I can provide screenshots of the UI state showing “auto compressing background information” immediately before the 413.
I hit the same problem when trying to use Codex Cli to analyze some png files. When dealing with about less than 50 photos, it works. But it always failed if it tried to handle about 100 photos in a conversation.
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.