-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
enhancementNew feature or functionalityNew feature or functionality
Description
Summary
When Anthropic returns an error with message "Input is too long for requested model", it's classified as api instead of context_exceeded. This prevents users from seeing the compaction suggestion UI.
Root Cause
In src/node/services/streamManager.ts, the categorizeError function inside the APICallError.isInstance() block only checks for one pattern:
// Check for Anthropic context exceeded errors
if (error.message.includes("prompt is too long:")) {
return "context_exceeded";
}
return "api"; // Falls through here!The actual error message "Input is too long for requested model" doesn't match "prompt is too long:", so it returns "api" and never reaches the generic string matching below that would catch "too long".
Impact
- Error shows
APIbadge instead ofcontext_exceeded - User doesn't see the compaction suggestion UI
- User is stuck with no guidance on how to recover
Generated with mux
Metadata
Metadata
Assignees
Labels
enhancementNew feature or functionalityNew feature or functionality