Skip to content

Expose subagent sessions, status, and results in the Android UI #187

Closed

Description

@Qiiks

Summary

OpenCode Mobile does not currently expose subagents as a first-class part of a session. A parent session may run subagents through the task tool, but the mobile UI does not provide a visible subagent list, live status, result/error view, or navigation into the child session. This makes a major part of an OpenCode/OMO workflow invisible from Android.

Current behavior

  • The transcript can show a task tool card, but that is not enough to monitor the child session.
  • The session list intentionally requests root sessions only (roots=true), so child sessions with parentID are filtered out.
  • The mobile SDK currently exposes session list/get/messages/prompt operations but no child-session retrieval/navigation method.
  • There is no obvious way to see which subagents are running, completed, failed, or waiting for input.

Expected behavior

For a parent session that launches subagents, provide a clear Subagents/Children section or equivalent that:

  1. Lists child sessions associated with the parent.
  2. Shows each subagent's name/role, status, model if available, start/completion state, and errors.
  3. Updates while the parent and child sessions are running.
  4. Allows tapping a child to inspect its transcript, tool calls, and final result.
  5. Makes nested subagents navigable without losing the parent session context.
  6. Preserves the current root-session list behavior while making child sessions discoverable in the parent detail screen.

Suggested implementation direction

Use the server's child-session relationship (parentID / the session children endpoint where available) and the existing SSE event stream rather than treating the task tool card as the complete source of truth. Older servers should degrade gracefully when the child-session endpoint is unavailable.

Environment

  • Client: OpenCode Mobile for Android
  • OpenCode server: 1.18.18, Qiiks/opencode release v1.18.18-orw.1
  • OMO workflow: subagent delegation through task/completion reminders
  • Device / Android version / app version: please add exact values when reproducing

Activity

  1. Qiiks commented on Aug 21, 2026

    @Qiiks
    Author

    Not covered by the current maintenance wave (#182/#191/#192 merges). Scoped as a read-only subagent session surface (list child sessions + status badge on the parent); targeted for the next maintenance cycle. Tracked in the v0.4.16-maint.1 release notes as a known gap.

  2. dzianisv commented on Nov 13, 2026

    @dzianisv
    Owner

    Claim: Ember (lead) is now the owning lead for #187.

    Task: expose subagent sessions, status, and results in the Android UI. Branch: feat/subagent-sessions-187.

    Scope (per the issue and the 2026-08-21 scoping comment): read-only subagent session surface — list child sessions of a parent session plus a status badge on the parent. Feature lane: design in Notion with an independent review PASS before any implementation. No release in this task; the release is the product owner's separate act.

    Base: main HEAD 38316ae.

  3. dzianisv commented on Nov 13, 2026

    @dzianisv
    Owner

    Context pack — #187 (lead: Ember, branch feat/subagent-sessions-187, base 38316ae)

    Current stage: Stage 1 complete. Next: Stage 2 design in Notion.

    Goal: read-only subagent session surface — list child sessions + status badge on the parent (scoped 2026-08-21 by Qiiks; the issue's items 4 tap-to-inspect and 5 nested navigation are held out of this lane).

    Design: TBD after Stage 2 | PRD: https://app.notion.com/p/40bac25eb49f8112afebd66e0e8475b6 | TDD: https://app.notion.com/p/40bac25eb49f8132908ce6f9bcc2dff9

    Code verified at HEAD 38316ae: sessions.ts:114 roots:true; session-list.ts:38 filters parentID; sdk.ts has no children method; toSession drops agent/model (v2-shape.ts:212-225); Session has no status field; events.ts:362-372 session.created leak (children prepended to root list, corrected only on reload). No repo-wide sweep: not a pattern-expressible defect.

    Decisions: data source is list-all + filter by parentID (no children endpoint found in SDK; verify vs live server); read-only; root-list semantics unchanged; no release in this task.

    Acceptance: AC1 child list on parent detail; AC2 live status badge per child + parent summary; AC3 root list preserved (leak closed); AC4 child errors visible; AC5 graceful degradation on v1/older servers; AC6 no regression (typecheck + full suite).

    Open residuals: dedicated children endpoint unverified (needs live server check); v0.4.16-maint.1 release-notes gap note unverified; device/Android/app version never supplied.

    Next action: Stage 2 design in Notion, then independent review PASS before implementation.

  4. dzianisv commented on Nov 13, 2026

    @dzianisv
    Owner

    Context pack — #187 (lead: Ember, branch feat/subagent-sessions-187, base 38316ae)

    Current stage: DONE — merged 2026-11-13, Stage 5.5 recorded, issue closed. This comment supersedes pack comment 6856988394.

    Goal: read-only subagent session surface — list child sessions + status badge on the parent (scoped 2026-08-21 by Qiiks; the issue's items 4 tap-to-inspect and 5 nested navigation are held out of this lane).

    Design: https://app.notion.com/p/417ac25eb49f81c9a191fccab782bcdc | PRD: https://app.notion.com/p/40bac25eb49f8112afebd66e0e8475b6 | TDD: https://app.notion.com/p/40bac25eb49f8132908ce6f9bcc2dff9

    Stage 4 result (verified by lead read-back): PASS, verdict comment 6858334036 on PR #241 (2026-11-13T16:08:09Z), head eff8c46. Test-count delta verified independently by the reviewer with its own full run in the real checkout: 395 pass / 0 fail at 38316ae → 414 pass / 0 fail at eff8c46 (+19: 15 unit in session-children.test.ts under the recorded exception, 4 integration; 0 removed; files 50 to 51). No validated findings; no implementer action before merge. CI at verdict time: Typecheck, test, build, gitleaks pass; activation-e2e and Unsigned iOS Simulator build pending, no failures. Filed notes N1-N8 in the verdict comment (none blocking): live session.created routing has no automated cover (release-time phone check); sse/v2-shape not extended but toSession mapping is covered by the integration test; summary wording "3 subagents · 3 Done" vs design "all done" (Stage 5.5 design wording fix); collapsed load failure is silent; branch needs updating before merge; formatTime/pill colours duplicated intentionally; mechanical implementation judged on merits; loadChildren refetches on every focus (per design).

    Stage 5 (done): branch protection requires Typecheck and unit tests, test, build (strict — branch must be current). Branch updated onto main three times (cad292a #238, fb7344d #240, 3d7728c #237) by merge commits cc0a3e5, 55a3794, a5b1836; the #237 update resolved a conflict in session-list.integration.test.ts (both sides' tests kept). Gates re-run by the lead on each merged tree (check:versions exit 0, typecheck exit 0, full suite 424 → 424 → 429 pass / 0 fail). CI on final head a5b1836 at 2026-11-13 17:11 UTC: Typecheck, test, build, gitleaks, Unsigned iOS Simulator build all pass; activation-e2e pending (not required). One-off iOS cancellation on cc0a3e5 triaged (comment 6858970984): zero steps ran, not caused by the change. MERGED 2026-11-13T17:11:44Z — PR #241, merge commit b5e9363 (main HEAD), parents 3d7728c + a5b1836. Merge comment 6859789154.

    Stage 3 result: PR #241 feat(chat): read-only subagent sessions surface (#187), OPEN, MERGEABLE, head eff8c46, 16 files +933/-14. OQ1 CONFIRMED against Qiiks/opencode v1.18.18-orw.1 (commit 7731d43f): /api/session pool returns children with parentID; session.created payload carries parentID. OQ3 answered — server sends no time.idle. Server also ships a dedicated session.children endpoint — this slice keeps list-all + filter; swapping the fetch is a follow-up.

    Design review: FAIL on F1 only, remedied by lead-recorded exception (comment 6857247200) — selectChildren (AC1, AC3), deriveChildStatus (AC2, AC4), summarizeChildren (AC2); no mock-based tests. Design review PASS conditional on the recorded exception.

    Deviations (Stage 3): app code implemented mechanically (no Google AI Studio access from this lane). Push via Git Database API (gh token lacks workflow scope); no workflow file touched by the PR. Design §2 test row not applied — sse.test.ts/v2-shape.test.ts NOT extended. Summary wording "3 subagents · 3 Done". Maestro flow not run locally (no emulator); runs in CI.

    Code verified at HEAD 38316ae: sessions.ts:113-114 roots:true limit 50; session-list.ts:38 filters parentID; sdk.ts has no children method; toSession drops agent/model/time.idle (v2-shape.ts:212-225); Session has no status field; events.ts:362-372 session.created leak; handleEvent session.updated is map-only (OQ4: no leak path). No repo-wide sweep: not a pattern-expressible defect.

    Decisions: data source is list-all + filter by parentID (no children endpoint found in SDK); read-only; root-list semantics unchanged; no release in this task.

    Acceptance: AC1 child list on parent detail; AC2 live status badge per child + parent summary; AC3 root list preserved (leak closed); AC4 child errors visible; AC5 graceful degradation on v1/older servers; AC6 no regression (typecheck + full suite).

    Open residuals: OQ2 v0.4.16-maint.1 release-notes note not found (no such tag/release); OQ5 v1 server may return no children (empty state); live-pair proof on device is a release-time phone check.

    Stage 5.5 (done): Design page updated (verified by fetch-back) — §2 test row now reads §3 not §5; sse/v2-shape row marked NOT extended (integration tests cover toSession); summary wording corrected to shipped "3 subagents · 3 Done"; OQ6 rationale corrected (out of slice scope, pool already fetched, no N+1); Shipped line added. PRD §3.3 gained the Subagents-section bullet. TDD unchanged (no new test-infrastructure promise). Issue closed; Work Log row Done.

  5. dzianisv commented on Nov 13, 2026

    @dzianisv
    Owner

    Design review exception (Stage 2, recorded by the lead). The design review returned FAIL on one procedural finding (F1): the test plan adds a new unit-test file with no acceptance-criteria-mapped test exception recorded on this issue.

    Exception recorded here: the design adds test cases for three new pure helpers, each mapped to acceptance criteria for genuinely new behavior — selectChildren (AC1, AC3), deriveChildStatus (AC2, AC4), summarizeChildren (AC2). This is the skill's exception case for net test growth: AC-mapped cases for genuinely new behavior. No mock-based tests. The session.created routing cover, which cannot run under plain node --test without mocks, is covered via the existing integration/e2e surface as Stage 3 determines (Maestro flow), not by a unit test.

    With this record, the test plan is compliant and Stage 3 proceeds unchanged. Architecture needs no re-review.

  6. added 2 commits that reference this issue on Nov 13, 2026
  7. dzianisv commented on Nov 13, 2026

    @dzianisv
    Owner

    Merged: PR #241 feat(chat): read-only subagent sessions surface (#187), merge commit b5e9363 (main HEAD), merged 2026-11-13T17:11:44Z. Stage 4 PASS (verdict comment 6858334036); required CI checks green on head a5b1836 (Typecheck, test, build); full suite 429 pass / 0 fail on the merged tree. Shipped: Subagents section on the parent detail screen (child list + live status badge), session.created leak closed, Session/toSession carry agent/model/time.idle. Live-pair proof on device remains a release-time phone check; the release itself is the product owner's separate act.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions