Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
Bug Report: Terminal/TUI hangs after session creation — build call never completes
Environment
- macOS (Mac Mini, Apple Silicon)
- opencode 1.15.10 (installed via Homebrew)
- Shell: zsh
Description
The opencode TUI and CLI (opencode run) hang permanently after session creation. The title generator completes successfully (~6-12s), but the main build call never produces any output and the process hangs indefinitely (tested up to 30s+ timeout).
Working:
- Title generator (uses a separate model call)
- Web UI at http://localhost:42757 — works correctly
- Direct API calls to providers (bailian, minimax, opencode-go) via curl — all work and respond in ~3s
Broken:
opencode run "say hello"— hangs foreveropencode run -m bailian-token-plan/MiniMax-M2.5 "hi"— hangsopencode run -m minimax-coding-plan/MiniMax-M2.7 "hi"— hangsopencode run -m opencode-go/deepseek-v4-pro "hi"— hangs- TUI (
opencode) — send message, spinner keeps spinning forever
Steps to Reproduce
opencode run "say hello"(or any prompt)- Watch session creation succeed
- Watch title generate in ~6-12s
- Observe build call hang (no output, no tokens, process never completes)
Log Analysis
Log snippet shows the hang pattern:
INFO session id=ses_xxx slug=brave-canyon version=1.15.10 created
INFO session.updated publishing
INFO message.part.updated publishing
[context-plugin] Context saved: exit-2026-05-24T18-00-56.mdtus
After session.updated publishing — nothing happens. No errors, no stream activity.
Technical Details
- opencode binary: Mach-O ARM64, standalone 107MB (bundled Node.js runtime)
- Runtime: uses embedded Node.js (not system Node.js — confirmed by
stringsanalysis showing//root/paths) - All providers tested: bailian-token-plan, minimax-coding-plan, opencode-go
- All produce same symptom: title generator works, build call hangs
- The binary contains references to
ai-sdkand streaming code (SSE, EventStream handling)
Pattern Observed
The hang happens consistently at the same point:
- Session created ✅
- Title generated (fast model) ✅
- Build call starts → hangs ❌ (no response ever received)
This suggests a bug in the streaming response handler — possibly related to how the ai-sdk processes the stream after the title generation phase.
Suggested Fixes
- Add debug output for the actual HTTP response from providers
- Check if
ai-sdkstream handling has known issues with certain response types - Add a way to disable streaming to test if the issue is in stream parsing
Workarounds
- Web UI works correctly
- Direct API calls to providers work correctly
Reacted by Imtial and onurakman
Reacted by Morale
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon May 24, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is specifically about the streaming response handler in the compiled binary failing on the main build call (while the title/small call works), #21457 is likely the closest match.
Wesleytys0130 commentedon May 25, 2026
Same here. I’m seeing a very similar issue in the TUI.
In my case, the streaming response sometimes gets interrupted / stuck while the model is generating. After that, if I stop it and resend the same prompt, it usually works again.
So it doesn’t look like the provider itself is completely unavailable, because retrying the same request can succeed. It feels more like the TUI / streaming pipeline occasionally drops or hangs during the response.
My pattern is roughly:
This sounds related to the same streaming handler issue mentioned here, especially if the title / session creation works but the main streamed response can hang or drop midway.
subatomic14 commentedon May 25, 2026
literally the same issue here
onurakman commentedon May 25, 2026
I disabled MCP, LSP, and plugins, but it still gets stuck most of the time.
dani-rodr commentedon May 27, 2026
Experiencing this for a while now too, not sure if the model of opencode has the issue
github-actions commentedon Jul 27, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.