Compaction auto not working with Codex #5465

Closed
opened 2026-02-16 17:53:02 -05:00 by yindo · 0 comments
Owner

Originally created by @brandon93s on GitHub (Jan 13, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I've this this a few times now running long sessions:

{"type":"error","sequence_number":2,"error":{"type":"invalid_request_error","code":"context_length_exceeded","message":"Your input exceeds the context window of this model. Please adjust your input and try again.","param":"input"}}

I'm using GPT-5.2 Codex via OpenAI OAuth. Ideally codex's auto-compation would work, but in the absence of that I thought the opencode auto compaction would run before the error is triggered. I've set this explicitly in my config:

  "compaction": {
    "auto": true,
    "prune": true,
  },

Plugins

none

OpenCode version

1.1.18

Steps to reproduce

No response

Screenshot and/or share link

Image

Operating System

macOS 15.6.1

Terminal

ghostty

Originally created by @brandon93s on GitHub (Jan 13, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I've this this a few times now running long sessions: ``` {"type":"error","sequence_number":2,"error":{"type":"invalid_request_error","code":"context_length_exceeded","message":"Your input exceeds the context window of this model. Please adjust your input and try again.","param":"input"}} ``` I'm using GPT-5.2 Codex via OpenAI OAuth. Ideally codex's auto-compation would work, but in the absence of that I _thought_ the opencode auto compaction would run before the error is triggered. I've set this explicitly in my config: ``` "compaction": { "auto": true, "prune": true, }, ``` ### Plugins none ### OpenCode version 1.1.18 ### Steps to reproduce _No response_ ### Screenshot and/or share link <img width="1488" height="224" alt="Image" src="https://github.com/user-attachments/assets/672c712b-e14c-4b82-b3a1-f60a9570e5c0" /> ### Operating System macOS 15.6.1 ### Terminal ghostty
yindo added the bug label 2026-02-16 17:53:02 -05:00
yindo closed this issue 2026-02-16 17:53:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5465