Skip to content

Web UI session list shows subagent and archived sessions that TUI hides #14053

@lauwah

Description

@lauwah

Description

The Web UI (opencode serve) shows all sessions including subagent (child) sessions and archived sessions in the session list, while the TUI (opencode session list) correctly filters these out. This causes confusion as users see different session counts between the two interfaces.

Subagent sessions are created internally by the Task tool and have a parentID field. Archived sessions have time.archived set. Both should be hidden from the user-facing session list in the Web UI, matching the TUI behavior.

Example from the /session API response — these sessions have parentID and should be hidden:

{"id": "ses_39525b99...", "parentID": "ses_39608f5b...", "title": "Research Claude Code iPhone (@general subagent)"}
{"id": "ses_3a0ab433...", "parentID": "ses_3a0abdf1...", "title": "Investigate Discord agent mobile issue (@explore subagent)"}

Plugins

None

OpenCode version

0.0.0-dev-202602110224

Steps to reproduce

  1. Start opencode serve --port 4096
    1. In TUI or any session, use the Task tool (which creates subagent sessions with parentID)
    1. Compare session lists:
    • TUI (opencode session list): Shows only top-level, non-archived sessions (e.g. 9 sessions)
    • Web UI session sidebar: Shows all sessions including subagent children (e.g. 11 sessions)
    1. The Web UI count is always higher because it includes subagent and archived sessions

Screenshot and/or share link

No response

Operating System

macOS (darwin, arm64)

Terminal

Terminal.app (OpenCode TUI + Web UI)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions