Skip to content

Context overflow error should suggest /clear as recovery option #12940

@ts232

Description

@ts232

Problem

When the context window overflows, the error message is:

Context overflow: prompt too large for the model. Try again with less input or a larger-context model.

This leaves users stuck — especially when receiving the error via messaging channels (Telegram, etc.) where they can't easily troubleshoot. Restarting the gateway doesn't help since session history persists. /compact also fails because it needs context to run.

Suggested Fix

Include actionable recovery steps in the error message:

Context overflow: prompt too large for the model. Try /clear to reset session history, or use a larger-context model.

Context

  • User was locked out for hours receiving this error on every message
  • Gateway restarts didn't help (session history preserved)
  • /compact couldn't run (needs context to execute)
  • /clear would have immediately resolved it

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions