anomalyco / anomalyco/opencode
Web UI: TypeError "Cannot read properties of undefined (reading 'length')" on home session list
@Brendonovich is already working on this.
Since Aug 19, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The OpenCode web UI crashes on the home page session list:
TypeError: Cannot read properties of undefined (reading 'length')
The home session-list sidebar renders e.groups().length > 0 with no null guard.
groups() can return undefined when the projects/sessions data hasn't loaded yet
during first render - a timing race on slower connections / slower JS engines.
On a fast browser (e.g. Edge) against the same server it does NOT crash
(data resolves before first render) - confirming it's a first-render race.
Plugins
None (default config)
OpenCode version
1.18.18 (latest)
Steps to reproduce
- Run
opencode web --port 4096 - Open the web UI in a browser where the initial data load is a bit slower
(e.g. a lightweight/mobile browser, or access remotely via a relay with extra latency) - Home page renders the session-list sidebar and crashes:
Screenshot and/or share link
TypeError: Cannot read properties of undefined (reading 'length')
at get when [as when] (index-*.js:1537:15902)
at get children [as children] (index-*.js:1537:15869)
...
Operating System
Windows 11 (10.0.22631)
Terminal
n/a (web UI); server started from PowerShell
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.