GPT models consistently run out of context earlier than indicated #8790

Open
opened 2026-02-16 18:10:51 -05:00 by yindo · 5 comments
Owner

Originally created by @iloveicedgreentea on GitHub (Feb 7, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

With 5.1, 5.2, and 5.2, I get context length errors at 67% every time and have to do manual compaction to fix it

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @iloveicedgreentea on GitHub (Feb 7, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description With 5.1, 5.2, and 5.2, I get context length errors at 67% every time and have to do manual compaction to fix it ### Plugins _No response_ ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 18:10:51 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 7, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #11086: GPT 5.2 Codex - Compaction happens way too early and context limit is wrong
  • #6071: [BUG]: GPT 5.2 context_length_exceeded / Your input exceeds the context window of this model.
  • #10220: Request size exceeds model context window
  • #8089: Auto-compaction enabled by default, but context_length_exceeded errors still occur in agent workflows
  • #10634: Compaction overflow check doesn't account for large tool outputs until the next step, causing context overflow

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Feb 7, 2026): This issue might be a duplicate of existing issues. Please check: - #11086: GPT 5.2 Codex - Compaction happens way too early and context limit is wrong - #6071: [BUG]: GPT 5.2 context_length_exceeded / Your input exceeds the context window of this model. - #10220: Request size exceeds model context window - #8089: Auto-compaction enabled by default, but context_length_exceeded errors still occur in agent workflows - #10634: Compaction overflow check doesn't account for large tool outputs until the next step, causing context overflow Feel free to ignore if none of these address your specific case.
Author
Owner

@jesussmile commented on GitHub (Feb 7, 2026):

same issue here

@jesussmile commented on GitHub (Feb 7, 2026): same issue here
Author
Owner

@jasgeo75 commented on GitHub (Feb 7, 2026):

Same, broken support for both the gpt-5.x-codex and opus 4.6 models is seriously impeding workflow.

@jasgeo75 commented on GitHub (Feb 7, 2026): Same, broken support for both the `gpt-5.x-codex` and `opus 4.6` models is seriously impeding workflow.
Author
Owner

@heswithme commented on GitHub (Feb 7, 2026):

yup, gotta compact manually around 200k tokens, otherwise session gets borked

@heswithme commented on GitHub (Feb 7, 2026): yup, gotta compact manually around 200k tokens, otherwise session gets borked
Author
Owner

@entrptaher commented on GitHub (Feb 8, 2026):

Facing same situation on gpt codex 5.3, with where it says,

271,647  68% ($0.00) v1.1.5

It was already suspecious that it allows 270k tokens with 68% usage mark. This confirms the same finding with the OP as well.

Plus, the /compact didn't actually compact it and allow me to continue, rather it asked me to copy a super stripped down version of the discussion and paste it in a new session.

@entrptaher commented on GitHub (Feb 8, 2026): Facing same situation on gpt codex 5.3, with where it says, ``` 271,647 68% ($0.00) v1.1.5 ``` It was already suspecious that it allows 270k tokens with 68% usage mark. This confirms the same finding with the OP as well. Plus, the /compact didn't actually compact it and allow me to continue, rather it asked me to copy a super stripped down version of the discussion and paste it in a new session.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8790