Skip to content

Web UI (mobile): session status goes stale after tab suspension — spinner stays 'thinking' until full page reload #45860

Closed as not planned

Description

@jlvobra

Description

On mobile browsers, when a session is running and the tab gets suspended (screen lock or app switch), the UI keeps showing the session as "thinking" even after the run already finished. A full page reload is the only way to see the real state.

The session status in the web UI is driven by server events. When Android suspends the tab the event stream dies silently (no error is raised), and when the tab becomes visible again the client doesn't re-fetch the session status, so the stale spinner stays on screen indefinitely.

The client already listens to visibilitychange for other things, but never reconciles session status on visibility regain or stream reconnect.

OpenCode version

1.18.23 (opencode web --hostname 0.0.0.0 --port 4096)

Steps to reproduce

  1. Open a session from a phone (Chrome on Android) and start a task that takes a while
  2. Lock the screen or switch to another app while the agent is working
  3. Let the task finish (verify from another client, e.g. the desktop)
  4. Go back to the tab on the phone: the session still shows the "thinking" spinner
  5. Reload the page: the status updates correctly

Expected: on visibilitychange (or on event-stream reconnect) the client should re-fetch /session/status and reconcile any missed events.

Workaround: full page reload.

Operating System

Server: Windows 11 Pro (10.0.26200). Client: Android 16, Chrome (also seen on other Android browsers)

Plugins

None

Terminal

n/a (web UI)

Activity

  1. github-actions commented on Aug 28, 2026

    @github-actions
    Contributor

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

    Your issue adds useful detail about the visibilitychange reconciliation gap specifically, but the core problem is already tracked in the issues above.

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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

Metadata

Metadata

Assignees

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