Skip to content

Agent request fails with context_length_exceeded instead of compacting the conversation #3367

Description

@vadim-su

Describe the bug

When I send a message in a long-running agent conversation, the request fails because the accumulated input exceeds the model's context window. Buzz shows the raw Responses API error and does not automatically compact or truncate the conversation, retry the request, or provide an obvious recovery action.

Steps to reproduce

  1. Open an agent conversation in Buzz.
  2. Continue the conversation until its accumulated context approaches or exceeds the selected model's context window.
  3. Send another message to the agent.
  4. See the context_length_exceeded error.

Expected behavior

Buzz should detect that the conversation is approaching the model's context limit and compact or otherwise reduce the input before submitting the request. If the provider still rejects the request, Buzz should recover gracefully—for example, compact the context and retry—or offer a clear action that lets the user continue without starting a new conversation manually.

Version and platform

  • Buzz version: 0.5.0
  • OS: macOS 26.5.2

Logs / additional context

Ran into this error: Request failed: Responses API error: Object {"type": String("invalid_request_error"), "code": String("context_length_exceeded"), "message": String("Your input exceeds the context window of this model. Please adjust your input and try again."), "param": String("input")}.
Please retry if you think this is a transient or recoverable error.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions