anomalyco / anomalyco/opencode
Web UI (mobile): session status goes stale after tab suspension — spinner stays 'thinking' until full page reload
@Brendonovich is already working on this.
Since Aug 28, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
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
- Open a session from a phone (Chrome on Android) and start a task that takes a while
- Lock the screen or switch to another app while the agent is working
- Let the task finish (verify from another client, e.g. the desktop)
- Go back to the tab on the phone: the session still shows the "thinking" spinner
- 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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.