Skip to content

Web UI: session list empty on left panel when using web server mode #27837

@RayDutchman

Description

@RayDutchman

Description

When running opencode --web, the left panel session list is always empty in the web UI, even though /api/session returns sessions correctly.

Root Cause (Analysis)

The frontend loads sessions via SSE event-driven logic. When server.connected is received, the code iterates M.children (registered workspaces) to trigger session loading. However M.children is empty at the time the event arrives, so no sessions are ever loaded.

Related Bug

Sessions with time_archived stored as Unix millisecond integer cause /api/session to return 400 BadRequest for the entire list. The API schema expects DateTime.Utc. Workaround: set time_archived = NULL in SQLite DB.

Plugins

None

OpenCode version

v1.15.0

Steps to reproduce

  1. Start opencode in web server mode: opencode --web 0.0.0.0:4096
  2. Open browser, navigate to the web UI
  3. Left panel session list is empty
  4. /api/session API returns sessions correctly
  5. Search works and can find sessions
  6. Reproduced in incognito mode, different browsers, different devices

Screenshot and/or share link

Image

Operating System

Windows 11 running web server in WSL

Terminal

Web server mode (--web)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions