Skip to content

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

Description

@fadilsflow

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.

Activity

  1. fadilsflow commented on May 11, 2026

    @fadilsflow
    Author

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

  2. fadilsflow commented on May 11, 2026

    @fadilsflow
    Author

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

  3. NanoByteDev commented on May 12, 2026

    @NanoByteDev

    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 commented on May 12, 2026

    @justsomelegs
    Contributor

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

  5. stivlo commented on May 13, 2026

    @stivlo

    I can confirm that it also happens on Apple silicon

  6. Onkarj012 commented on May 13, 2026

    @Onkarj012

    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. eersnington commented on May 13, 2026

    @eersnington

    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

    Cap.2026-05-13.at.16.09.04.mp4

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

    Image
  8. eersnington commented on May 13, 2026

    @eersnington

    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
    Screen.Recording.2026-05-13.at.4.25.21.PM.mov
  9. justsomelegs commented on May 13, 2026

    @justsomelegs
    Contributor

    @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 commented on May 13, 2026

    @eersnington

    @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. nhantrandev96 commented on May 13, 2026

    @nhantrandev96

    Same for me (mac m1 Max)

  12. rwake24 commented on May 13, 2026

    @rwake24

    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.

  13. gabrieles02 commented on Jun 14, 2026

    @gabrieles02

    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.

  14. Sagar-CK commented on Jun 16, 2026

    @Sagar-CK

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

  15. domWalters commented on Aug 1, 2026

    @domWalters

    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.

  16. Invictine commented on Sep 6, 2026

    @Invictine
    Contributor

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions