-
-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
Summary
When resuming a session whose context exceeds the model's limit, the JSON-RPC layer returns a raw error:
{"jsonrpc":"2.0","id":4,"error":{"code":-32603,"message":"Internal error: Prompt is too long"}}agent-shell displays this as a generic error dialog:
╭─
⚠ Error (-32603) ⚠
Internal error: Prompt is too long
[Details]
╰─
This is confusing — the user doesn't know what happened or how to recover.
By contrast, the Claude Code CLI handles the same situation with a friendly message ("Context is too long...") and offers the /compact command to summarize and continue.
Proposed improvement
Detect this specific error (code -32603, message matching "Prompt is too long") and provide an actionable recovery path, for example:
- Show a clearer message: "Context too long — compact the conversation to continue"
- Add a clickable button to trigger compaction (if the agent supports a compact/summarize operation via ACP)
- Or automatically compact and retry
Steps to reproduce
- Open a session in agent-shell and have a long conversation
- Close/kill the buffer
- Resume the same session — the accumulated context triggers the error
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels