anomalyco / anomalyco/opencode
Resumed session: "thinking" forever, loop exits at step=0 with no error
@jlongster is already working on this.
Since Aug 19, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
Bug Report
Description
When resuming an old session, the UI shows "Thinking" indefinitely. The loop starts at step=0 and immediately exits without ever calling the LLM. No error is displayed to the user.
Expected Behavior
- Show an error message when context exceeds model limits
- Or auto-compact/truncate context to fit within limits
- Or at minimum, exit the "thinking" state and return to input
Actual Behavior
- "Thinking" stays on screen indefinitely
- No error message is shown
- The user must force-quit and start a new session
Logs
loop session.id=ses051a099bcffewokH4M8DUvs8yO step=0
"exiting loop" session.id=ses051a099bcffewokH4M8DUvs8yO
This pattern repeats 12+ times in rapid succession (~200ms each). No process or stream entries appear.
Environment
- opencode v1.17.20
- Linux (Debian 13)
- Models used: Deepseek Reasoner → Big Pickle (switched mid-session)
- Session token count: ~1,470,382 tokens
Additional Context
The session had accumulated many errors over time (rate limits, aborted operations, forbidden access). The compaction agent also fails with the same context overflow (2,135,961 tokens).
Plugins
https://github.com/obra/superpowers.git
OpenCode version
1.17.20
Steps to reproduce
- Use a session extensively until it accumulates a large context (e.g., >1M tokens)
- Resume the session with
opencode --continueor via the TUI - Send any prompt
- "Thinking" appears but never resolves
Screenshot and/or share link
Operating System
Linux x64-Dev 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64 GNU/Linux
Terminal
konsole 25.04.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.