Skip to content

TUI not rendering LLM response in tmux (opentui rendering bug, v1.2.21) #16566

Closed

Description

@cicy-dev

Description

OpenCode TUI stops rendering after submitting a prompt when running inside tmux. The backend completes the LLM response successfully, but the TUI never updates to display it. The UI stays stuck showing ▣ Build · big-pickle indefinitely.

This appears to be the same issue as #5094 (which was closed), but it still reproduces on v1.2.21.

Key findings

  1. Backend completes normally — logs show session.idle and exiting loop within seconds
  2. TUI never re-renders — the response is in the database but not displayed
  3. opencode run works perfectly — same prompt, same tmux pane, response renders fine
  4. Only TUI mode is affected — the opentui rendering layer fails to trigger a redraw

Log evidence

INFO  service=session.prompt step=1 sessionID=ses_xxx loop
INFO  service=session.prompt sessionID=ses_xxx exiting loop
INFO  service=session.prompt sessionID=ses_xxx cancel
INFO  service=bus type=session.status publishing
INFO  service=bus type=session.idle publishing

Backend finished, but TUI still shows spinner.

Environment

  • OpenCode version: 1.2.21
  • OS: Debian (Linux 5.x, x86_64)
  • Terminal: tmux 3.2a (via ttyd WebSocket proxy)
  • TERM: tmux-256color (also tested with screen, same result)
  • tmux settings tested: focus-events on, escape-time 10, default-terminal tmux-256color

Steps to reproduce

  1. Start tmux session
  2. Run opencode (TUI mode)
  3. Type any message (e.g., "hi") and press Enter
  4. TUI shows spinner but never renders the response
  5. Run opencode run hi in the same pane — works fine

Related

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 8, 2026
  2. github-actions commented on Mar 8, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  3. kimnamwook1 commented on Mar 8, 2026

    @kimnamwook1

    Same issue on macOS — native Terminal.app (no tmux)

    Reproducing the exact same behavior on macOS (Darwin 25.3.0) with OpenCode v1.2.21, but without tmux — running directly in Terminal.app and iTerm2.

    Environment

    • OS: macOS (Darwin 25.3.0, arm64)
    • OpenCode version: 1.2.21 (~/.opencode/bin/opencode)
    • Terminal: Terminal.app, iTerm2, and cmux — all reproduce
    • Models tested: openai/gpt-5.2, google/gemini-3.1-pro-preview, google/gemini-3-pro-preview
    • Plugins tested: oh-my-opencode, and also with no plugins at all — same result

    Key findings

    1. Backend completes normally — logs show full message.part.delta streaming, exiting loop, then cancel (cleanup)
    2. TUI never renders the response — UI shows ▣ Build · gpt-5.2 but body stays blank, Context shows 0 tokens, 0% used, $0.00 spent
    3. Response exists in DB — verified via sqlite3:
      sqlite3 ~/.local/share/opencode/opencode.db "SELECT substr(data, 1, 300) FROM part WHERE message_id = '...';"
      
      Returns full response with type: "text" content.
    4. Share link renders correctly — shared session shows the response in browser
    5. Desktop app works fine — same config, same model, response renders properly
    6. Not model-specific — tested with OpenAI (gpt-5.2, variant none/high) and Google (gemini-3.1-pro-preview) — all same behavior
    7. Not plugin-related — reproduced with "plugin": [] in opencode.json
    8. Issue exists since first install — never worked in TUI on this machine

    Log evidence

    INFO  service=llm providerID=openai modelID=gpt-5.2 agent=build mode=primary stream
    INFO  service=bus type=message.part.delta publishing    ← hundreds of deltas
    INFO  service=session.prompt step=1 sessionID=ses_xxx loop
    INFO  service=session.prompt sessionID=ses_xxx exiting loop
    INFO  service=session.prompt sessionID=ses_xxx cancel
    INFO  service=bus type=session.idle publishing
    

    DB proof

    {"type":"text","text":"Hey — what are you working on today? If you share a repo path or goal (bug, feature, refactor, tests), I'll take it from there."}

    Conclusion

    This is not tmux-specific. The opentui rendering layer fails to display streamed responses on macOS across multiple terminal emulators. The backend + DB + share links all work correctly — only the TUI rendering is broken.

  4. kommander commented on Mar 8, 2026

    @kommander
    Contributor

    I can't seem to be able to reproduce the issue of responses not being rendered. Can anyone with that issue check the console? ctrl+p + "Toggle Console", are there any errors?

  5. xybschin commented on Mar 26, 2026

    @xybschin

    I can't seem to be able to reproduce the issue of responses not being rendered. Can anyone with that issue check the console? ctrl+p + "Toggle Console", are there any errors?

    I do have the same error with the latest opencode build but the console isn't updated neither after I send the prompt, so it does not show any errors.

    When running opencode --print-logs and entering a promt, this error shows:

    Image
  6. dancoto commented on Mar 27, 2026

    @dancoto

    I am seeing the same issue in version 1.3.3.

  7. xybschin commented on Apr 15, 2026

    @xybschin

    For me, this is no longer an issue with 1,4.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions