Often exceeding context window (but still 84% context left)
Resolved 💬 4 comments Opened Sep 29, 2025 by MauScheff Closed Oct 16, 2025
What version of Codex is running?
0.42
Which model were you using?
gpt-5-codex
What platform is your computer?
Darwin 24.6.0 x86_64 i386
What steps can reproduce the bug?
In the latest version, after a big task with gpt-5-codex medium I'm often running into:
⚠️ stream error: stream disconnected before completion: Your input exceeds the context window of this
model. Please adjust your input and try again.; retrying 5/5 in 3.505s…
■ stream disconnected before completion: Your input exceeds the context window of this model. Please
adjust your input and try again.
▌ Summarize recent commits
⏎ send ⌃J newline ⌃T transcript ⌃C quit 119K tokens used 84% context left
I try /compact and the error still there.
Accessing through API_KEY.
What is the expected behavior?
I used to be able to go very long before running out context and actually not error out, instead just started not working as well and then /compact ed and improved behavior, or started a new session.
What do you see instead?
Erroring out quickly.
Additional information
■ stream disconnected before completion: Your input exceeds the context window of this model. Please
adjust your input and try again.
Token usage: total=119,076 input=107,201 (+ 1,871,616 cached) output=11,875 (reasoning 7,744)
To continue this session, run codex resume 01999579-12ad-7601-9d1d-0d6d24b20214.This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗