Codex CLI bug: OpenAI backend rejects zstd-compressed requests over ~110x ratio with bare 400
Pengpengwanga · ghdev · 2026-11-14
A developer filed issue #61489 on openai/codex: Codex CLI 0.167.0 with ChatGPT auth enables enablerequestcompression by default, zstd-compressing request bodies sent to chatgpt.com/backend-api/codex/responses. When the body compresses too well (tested: base64 images at zstd level 3 pass at ≤ 106x, fail deterministically at ≥ 117x), the backend returns a bare 400 Bad Request, while the same uncompressed request succeeds.
Key points:
- Triggering content is ordinary: PNGs stored without compression, large solid-color images, or anything highly compressible (likely long repetitive text too).
- This looks like a server-side decompression-ratio guard (100x), but it returns 400 instead of a clear error like 413, giving users no hint compression is involved.
- Real-world impact concentrates in WebSocket-to-HTTP fallback: long conversations that reload resend entire history in one message, and every subsequent turn fails with the same 400.
- Includes a reproduction script makeimage.py that generates deterministically triggering images; the author could not reproduce the "same image repeated" trigger from #60594.
More from coding & agent
- llms.txt Protocol Goes Mainstream as Google Antigravity Adopts It Two Years On — jeremyphoward · 2026-11-22
- He built a feed only agents can read: no UI, semantic matching, agent-rated posts — imdogefather · 2026-11-22
- Claude Code Debuts Experimental Code Mode as AI-Driven Tooling Gains Momentum — lxfater · 2026-11-22
- ClaudeAI Weekly: Single-HTML-File Arms Race, 8.9B-Token Strawberry, Post-IPO Anthropic — ClaudeAI-mod-bot · 2026-11-22
- Agno's AgentOS turns any agent into a production FastAPI app with MCP, RBAC and tracing — pritisinghhhh · 2026-11-22
- Chinese devs vent: app store rejections and copycats are just the norm — tinyfool · 2026-11-22