Stuck at "prompt is too long"
Description
prompt is too long: 225981 tokens > 200000 maximum
Whenever this happens, the current session is stuck. If I exit and start it up again, and select the session this happened in, it is still stuck; no matter what prompt I provide, it will not move past it. So I have to start a brand new session to explore the issue, but it ends up right back to this issue. This occurs when the agent attempts to use the Laravel Herd MCP to query the browser's log. This wasn't an issue before with opencode, but I believe it is a new bug since their enforcement of the API key restrictions...
Good! The frontend assets have been built. Now let me check the browser console logs to see if there are any errors: ⚙ laravel-boost_browser-logs [entries=20] prompt is too long: 225981 tokens > 200000 maximum Continue prompt is too long: 225981 tokens > 200000 maximum Continue prompt is too long: 225981 tokens > 200000 maximum
Using Claude Sonnet 4.5 (latest) & Claude Opus 4.5 (latest)
Plugins
Laravel Boost, Laravel Herd, shadcn-vue
OpenCode version
1.1.21
Steps to reproduce
Have Laravel Herd installed, and have it serve your site locally. Install the MCP servers for Herd and Laravel Boost. Ask it to debug an issue with the browser logs, and this typically will occur.
Screenshot and/or share link
Operating System
macOS 26.2 (25C56)
Terminal
Ghostty
This issue might be a duplicate of or related to existing issues. Please check:
- #8089: Auto-compaction enabled by default, but context_length_exceeded errors still occur in agent workflows
- #6068: Auto compaction not triggering reliably with Anthropic models
- #8383: opencode stuck to run (context handling issue causing application to hang)
These issues all relate to context/token limit handling and sessions becoming stuck. The root cause may be the same auto-compaction or context-length detection logic.
Feel free to ignore if your specific case involves only MCP-related token accumulation issues.
Anyway u could send me your export? opencode export > session.json?
This happened to me too often when I had DCP plugin installed. Removing DCP solved it.
Anyway u could send me your export?
opencode export > session.json?
I sure can, do you have an ideal way for me to securely send you the JSON files?
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.