Skip to content
Source
Sign inSign up
pingdotgg/t3code

Chat shows 'working...' indefinitely after opencode CLI already finished responding #2644

Closedfadilsflow(GitHub profile, opens in a new tab) opened this issue 16 comments

Description

After updating to the latest version, when sending a chat message in the T3 Code desktop app, the status shows "working..." indefinitely. However, checking the underlying opencode CLI session directly shows the response has already been completed.

Steps to Reproduce

  1. Install fresh T3 Code (Alpha) v0.0.23
  2. Configure opencode as the provider (opencode CLI v1.14.48)
  3. Send any chat message
  4. Observe: T3 Code shows "working..." status indefinitely
  5. Check opencode session via CLI — response is already complete

Expected Behavior

T3 Code should detect when the opencode CLI session has finished responding and update the UI accordingly (stop showing "working...").

Actual Behavior

"Working..." status persists forever, making the UI unusable.

Environment

  • T3 Code version: 0.0.23 (Alpha)
  • macOS (Apple Silicon)
  • opencode CLI version: 1.14.48

Additional Context

Issue appeared after a recent update. The underlying agent (opencode) is functioning correctly — responses complete successfully via CLI. The problem is in T3 Code's detection/communication with the opencode CLI process — it doesn't seem to recognize when the session has finished.

  1. Correction: this is on Mac Intel (x64), not Apple Silicon.

  2. This is a regression — the issue appeared after updating to v0.0.23. It was working fine in the previous version.

  3. Also encountering this issue running t3 webui using WSL on Windows 10. T3 Code version: 0.0.23 (Alpha) OpenCode v1.14.48

  4. justsomelegs(GitHub profile, opens in a new tab)commented

    i think i've fixed this for myself? let me know if its still doing it and ill improve my PR #2666

  5. I can confirm that it also happens on Apple silicon

  6. Correct. I have been using T3 on M4, and it only happens on opencode models/chats. One of my chats showed 'Working' for 17 hours.

  7. i use opencode integration t3 code (m4, v0.0.23) and it's really bad on how broken it is. this looks like the eventloop around opencode sdk is not handled properly.

    here's a side by side video

    https://github.com/user-attachments/assets/6bfb1adc-fa36-47e0-acab-625af01a9d99

    the chat session has ended and t3 code still shows working x min, y sec

    Image
  8. i use opencode integration t3 code (m4, v0.0.23) and it's really bad on how broken it is. this looks like the eventloop around opencode sdk is not handled properly.

    ...

    1. closing and reopening t3 code doesnt end the chat session
    2. clicking on the stop button doesnt end the chat either

    https://github.com/user-attachments/assets/2e6bfb47-4fe8-4498-b355-8917d6ee78d3

  9. justsomelegs(GitHub profile, opens in a new tab)commented

    @eersnington are you able to check out that PR i made and see if it fixes the issues you are having? #2666

    its fixed it for me, but im only one user so would be helpful to know if its still happening for others so i can make it a better PR?

  10. eersnington(GitHub profile, opens in a new tab)commented

    @justsomelegs > @eersnington are you able to check out that PR i made and see if it fixes the issues you are having? #2666

    great timing, i was actually taking a look at your PR right now and getting my clanker to look through opencode sdk as well. i'll build and test it soon

  11. Hitting this on Windows 11, T3 Code (Alpha) 0.0.23, opencode 1.14.48. Reproduces with the GitHub Copilot subprovider as well (not just Ollama), across multiple models (Claude Haiku 4.5, Opus 4.7, Opus 4.7 1M internal), on both short ("test", ~4s, finish=stop) and long turns (5 tool-call steps, ~30s, finish=stop). Always the same: response lands in ~/.local/share/opencode/opencode.db (verified by query), T3 UI spins "Working…" forever, no events ever reach the renderer.

    Smoking gun in ~/.local/share/opencode/log/<session>.log — every single session:

    service=bus type=* subscribing
    service=server event connected
    service=bus type=* unsubscribing   ← ~3 ms later, always
    service=server event disconnected

    T3's own trace (~/.t3/userdata/logs/server.trace.ndjson) confirms opencode.event.subscribe returns Success in ~0.4 ms — way too fast for a real SSE stream — suggesting the HTTP client is consuming the SSE response as one-shot instead of holding the connection open. After that initial tear-down T3 never reconnects to /event, so it misses every message.part.delta, message.updated, and session.idle for the rest of the turn.

    Polling the REST API (GET /session/<id>/message) returns the completed assistant message immediately, so the data path is fine — only the event/SSE path is broken.

    Stuck threads have to be cleared by killing T3 and deleting the thread row + its events from ~/.t3/userdata/state.sqlite (tables: projection_threads, projection_thread_sessions, projection_turns, provider_session_runtime, and orchestration_events where aggregate_kind='thread').

    Happy to test the latest nightly (0.0.24-nightly) if a fix is in flight.

  12. I get the same exact issue when using Grok Build. I have a chat in the working state for the past 17 hours on the latest version.

  13. Can confirm this still happens to me for OpenCode on Apple Silicon.

  14. domWalters(GitHub profile, opens in a new tab)commented

    I think I am having this same issue.

    Nix OS Unstable AMD x64 CPU

    T3Code 0.30.0 Opencode 1.18.9


    Possible unconnected:

    From running tests on a repo that uses podman run, it also seems to be resulting in a lot of orphaned processes somehow?

    Image

    These processes eventually resolve, but take way longer than if I manually run the aforementioned tests.

  15. Still hitting this on Windows with opencode CLI 1.18.x: the underlying session completes (verifiable via CLI session status) but T3 stays on working... indefinitely, and Stop does not clear it. Only fix is killing T3 and clearing the stuck thread rows from state.sqlite. Noting that #2666 was closed unmerged, so there is currently no fix in flight. Happy to test a nightly or scope a minimal reconcile PR if maintainers want one.

  16. juliusmarminge closed this

Sign in to join this conversation.