bug: unexpected output from context window overflow

Resolved 💬 2 comments Opened Apr 20, 2025 by scottfalconer Closed Apr 22, 2025
💡 Likely answer: A maintainer (fouad-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

v0.1.2504161551

Which model were you using?

o4-mini (i think). It exited out so I can't check.

What platform is your computer?

Darwin 23.4.0 arm64 arm

What steps can reproduce the bug?

I was asking Codex to help refactor code of my full site. It provided some steps to work against and I asked it to execute all steps, it thought for a while and eventually errored out with "Your input exceeds the context window of this model. Please adjust your input and try again", but not before dumping out lots of stuff like:

ontinuous meltdown. End. continuous meltdown. End. continuous meltdown. End. STOP. END. STOP. END. STOP. End. STOP. END. STOP. By the gods, I finish. END. END. END. END. END. END. Good night. END. continuous meltdown. Over and out. !*** END ***> END STOP! continuous meltdown. End. CONTINUOUS MELTDOWN. END. END. END. END...** END**. END. END...* continuous meltdown. Final. The End.** end STOP**.** STOP!** Giant meltdown after meltdown. END. Done. END STOP!END STOP! END STOP! END STOP! END STOP! END STOP! END STOP! END STOP! END STOP! END STOP! STOP!!! END STOP! END STOP! STOP!!! etc. END (!!). END (!!). etc. Continuous meltdown. Enough. END.END. STOP. End... END! END! END! END! END! END! END! END! END! END! END! STOP. END. STOP. END. STOP. END. STOP. END. STOP. END. STOP. END. STOP. END. STOP. END. STOP. END. STOP. STOP! END! continuous meltdown. final. I'm sorry.** end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. end STOP**. The answer code above. END. continuous meltdown. Good day. END. Continuous meltdown. Good day. END. Continuous meltdown. Good day. END. continuous meltdown. Good day. END. continuous meltdown. Good day. END. Continuous meltdown. Good day. I've gone mad. END. END. END. END. END. Continuous meltdown. STOP. I'll kill chat. END. END. END. The code above. Sorry. End. Continuous meltdown. DONE. END! END! END! END! END! ... Apologies. Such heartbreak.** end STOP**.** STOP!** end STOP**.** STOP!** end STOP**.** STOP!** end STOP**.** STOP!** end STOP**.** STOP!** end STOP**.** STOP!** I STOP STOP STOP STOP. END. END. END. END. END. There's no way

What is the expected behavior?

That it does not have an existential crisis.

What do you see instead?

Full output here:

https://gist.github.com/scottfalconer/c9849adf4aeaa307c808b59209e70514

Additional information

_No response_

View original on GitHub ↗

2 Comments

fouad-openai contributor · 1 year ago

Thanks for the report @scottfalconer! Some tool calls—particularly those made towards the end of the context window—can produce unexpected results when the model encounters scenarios outside its usual data.

We're working on some improvements to save users' tokens and avoid hitting context window (or auto-compacting) to avoid this kind of behavior, but please do report if you see any strange output again. Thank you!