Skip to content

Input exceeds context window error #2921

@guidedways

Description

@guidedways

What version of Codex is running?

0.27.0

Which model were you using?

gpt5-high

What platform is your computer?

macOS

What steps can reproduce the bug?

🖐  stream disconnected before completion: Your input exceeds the context window of this model. Please adjust your input and
try again.

 Working (18s • Esc to interrupt)

▌ Write tests for @filename
 ⏎ send   Shift+⏎ newline   Ctrl+T transcript   Ctrl+C quit   2445968 tokens used   29% context left

29% left and it was only making minor edits and suddenly stopped.

What is the expected behavior?

If it's trying to read in a randomly large file, it should either read a portion in or state what it's doing. No transparency into what it's doing and why it's failing.

What do you see instead?

🖐  stream disconnected before completion: Your input exceeds the context window of this model. Please adjust your input and try again.

No clue what I'm supposed to do - adjust which input? Codex was on its own

Additional information

Ask codex to make a minor refactor involving removal of a parameter in a function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontextIssues related to context management (including compaction)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions