You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: TUI does not live-render messages when prompt is POSTed externally via /session/{id}/prompt_async #26671
When a session is open in the TUI and a prompt is sent via POST /session/{id}/prompt or prompt_async (e.g. from the web UI, the SDK, or any external HTTP client), the TUI does not live-render the resulting user prompt or the streaming assistant reply. Messages are missing from the TUI view in real time.
However, the messages are correctly persisted: if the user Ctrl+C to detach the TUI and then resumes the same session, all the externally-injected turns appear. The web UI also live-renders them correctly throughout. So this is specifically a live-render / SSE-subscription bug in the TUI client, not a message-storage issue.
The server stores both the user prompt and the assistant reply correctly (verified via GET /session/{id}/message); the agent runs the inference and the response is persisted. The TUI's view of the active session simply doesn't get refreshed by the relevant SSE events while attached.
Steps to reproduce
Start opencode (TUI) — server auto-starts on http://127.0.0.1:4096.
(Optional) Open the web UI on the same server to confirm comparative behavior.
Note the active session id (e.g. curl http://127.0.0.1:4096/session).
From any external shell, POST a prompt to that session:
curl -X POST http://127.0.0.1:4096/session/<SESSION_ID>/prompt_async \
-H 'Content-Type: application/json' \
-d '{ "parts":[{"type":"text","text":"hello from external POST"}], "model":{"providerID":"<provider>","modelID":"<model>"} }'
Observed: TUI shows nothing. Web UI shows both the user prompt and the streaming assistant reply.
Ctrl+C the TUI, then resume the same session (e.g. opencode and pick the session, or --continue). All the externally-injected turns now appear correctly.
Expected
The TUI live-renders prompts and assistant replies regardless of which client (or HTTP request) originated them, identically to the web UI.
Why this matters
Prevents external tools from driving an opencode session a human is supervising via the TUI — the human loses real-time visibility until they restart the TUI. Relevant for agent orchestrators that drive opencode sessions over HTTP while a human watches via the TUI.
Environment
OpenCode version: 1.14.46
Operating System: macOS Darwin 25.4.0 arm64
Terminal: VS Code integrated terminal (xterm-256color)
Activity
fix(tui): forward directory-scoped events when TUI is in workspace mo…
jlongster commentedon May 11, 2026
Hi @harshitsinghbhandari !
Can you see if this PR fixes this issue? #26936
github-actions commentedon Jul 11, 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.
test(server): isolate anomalyco#26671 to TUI client-side event filter
fix(tui): forward directory-scoped events when TUI is in workspace mo…