anomalyco / anomalyco/opencode

Web UI: TypeError "Cannot read properties of undefined (reading 'length')" on home session list

Open
#43,363 0 comments 0 reactions 1 assignee View on GitHub

@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
  1. Run opencode web --port 4096
  2. 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)
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.