Skip to content

[BUG]: GPT 5.2 context_length_exceeded / Your input exceeds the context window of this model. #6071

Description

@peixotorms

Description

Using GPT 5.2 via api, with reasoning high.

After about 1 hour of usage, I hit

{"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"}}

On the right panel I see

Context
270,593 tokens
68% used
$5.13 spent

I noticed that context keeps going up, then down, which from what I read, its intended.
However, maybe its not counted correctly, because GPT 5.2 limit via api is 400k not 270k.

/compact works, then I can proceed, so this is just a report on the incorrect count and limit.

Thanks

OpenCode version

v1.0.193

Steps to reproduce

Just use normally with gpt 5.2 high.

Screenshot and/or share link

No response

Operating System

Ubuntu Server

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingzenRelates to Zen

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions