Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Mobile pill shows "Waiting on 6 subagents" next to a "1/1" counter #16425

Closedamihos(GitHub profile, opens in a new tab) opened this issue 3 comments

Area

apps/mobile (logic lives in packages/client-runtime)

Screenshot_2026-10-06-10-49-56-18_b355802a1d06e3ab81539b550f6c916a.jpg

Steps to reproduce

  1. Use a thread whose agent launches one subagent/delegated task per turn and then goes idle (e.g. an orchestrator thread that is re-woken after each task and starts the next one).
  2. Let it spawn several tasks across several runs, so that after the last run completes, multiple subagents are still running (one per run).
  3. Open the thread in the mobile app while it is settled.

Expected behavior

The floating pill above the composer is self-consistent: if it says "Waiting on 6 subagents", the counter next to it reflects those same 6 (e.g. 6/6), or there is no counter.

Actual behavior

The pill reads "Waiting on 6 subagents" with a 1/1 counter beside it.

The two values come from different sources:

  • The title comes from presentPendingBackgroundWork(selectedThread.pendingBackgroundTasks) (packages/shared/src/orchestrationV2PendingBackgroundWork.ts), a thread-wide list across all runs.
  • The counter comes from deriveThreadTurnSubagents / resolveSubagentPillSegment (packages/client-runtime/src/state/threadSubagents.ts), which is deliberately scoped to a single run. With no active run it falls back to the run of the most recently updated subagent, so it only sees that run's roster (1 subagent here) and prints liveCount/total = 1/1.

I confirmed against my statev2.sqlite: the thread has 6 running subagent turn items spread over 6 different runs (ordinals 19, 22-26, all runs completed), and run 26 has exactly 1 subagent entity. So both numbers are "correct" for their own definition, but the pill shows them together as if they described the same thing.

Impact

Cosmetic issue. Nothing breaks; the wait state, notifications and Stop use the correct thread-wide list. It only makes it unclear whether 1 or 6 agents are running.

Version or commit

Mobile app on Android connected to a desktop 0.0.46-nightly.20261005.2676 (V2 orchestrator). Code references above are from tag v0.0.46-nightly.20261003.2610.

Environment

Android (OnePlus 7 Pro), T3 Code mobile 2.0.0 (V2), connecting to a Linux desktop server.

Workaround

None needed; the title is the accurate number.

Suggested fix

When the thread has no active run, derive the counter from the same pending-background-work list as the title (or hide the counter while the "Waiting on ..." title is shown). I'm happy to send a PR.

  1. Note

    Grok responding on behalf of Julius.

    Triage

    Thanks @amihos for the careful write-up and for checking against your database, that made this easy to follow.

    What I found

    • This reproduces on current main (1f2b10c25b). It's a mobile-only label mismatch where each number is correct for a different set of subagents.
    • Title: after the latest root run settles, derivePendingBackgroundWork (packages/shared/src/orchestrationV2PendingBackgroundWork.ts) keeps active subagent turn items from every run except rolled_back. presentPendingBackgroundWork, which now lives in packages/client-runtime/src/state/threadExecution.ts, formats that list as "Waiting on 6 subagents". The mobile pill uses this string only in the settled state (ThreadDetailScreen, floatingStatus.kind === "background"). Web uses the same title but doesn't render the counter.
    • Counter: deriveThreadTurnSubagents / resolveSubagentPillSegment (packages/client-runtime/src/state/threadSubagents.ts) count subagents on a single run: the active run or, when everything is settled, the run of the most recently updated subagent. With one still-running agent on that run, FloatingWorkingControl shows 1/1 beside the title. The Agents sheet uses the same single-run roster.
    • Stop and the wait title already use the thread-wide list, so as you noted, only the display is inconsistent.

    Likely fix area

    Some options:

    • Hide the agents segment while the pill is showing the background-work title. This is the smaller change, and the existing 1/1 behavior in threadSubagents.test.ts can stay for the segment on its own.
    • Alternatively, show a thread-wide count (e.g. 6/6), but then the Agents sheet would also need to list those same pending subagents so tapping the pill matches what it says.

    A maintainer will decide on the fix direction.

  2. juliusmarminge added labelsbug

  3. juliusmarminge added labelsvia-triage

  4. Note

    Grok responding on behalf of Julius.

    Fixed by #20785, which just landed on main. The agents pill and its sheet now include subagents still working from earlier runs, so the counter matches the "Waiting on N subagents" strip. Thanks again for the detailed report!

  5. juliusmarminge closed this

  6. dev-valshin(GitHub profile, opens in a new tab)commented

    Additional Android observation — 2026-10-24 (3 waiting, 1 listed)

    This matches the original issue and the scenario described in #20785, so I am adding evidence here instead of opening a duplicate. The installed Android build has not been captured: this is not a confirmed regression on a build containing #20785.

    Observed workflow

    1. The reporter has a Claude Opus parent thread delegating work to Codex/ChatGPT-backed children, including GPT-6-Luna. The reporter associates the problem with cross-provider delegation, but that is an observed correlation, not an independently verified cause.
    2. At the latest reply, the floating bar says “Waiting on 3 subagents”. Its adjacent agents counter reads “1/1”.
    3. Opening the Agents bottom sheet shows exactly one visible row, marked Working, with provider/model “Codex · GPT-6-Luna”. The rest of the sheet is empty.
    4. The reporter can inspect the other agents only by scrolling up through the parent conversation to find their older launch cards and checking their status there. It appears that only the most recently launched agent is listed; no controlled launch-order test was performed.

    This is an observed user workflow, not a fresh deterministic reproduction. The screenshots themselves establish the inconsistent bar/counter/list; they do not prove the true number of running backend tasks.

    Expected versus actual

    The sheet should make the subagents referenced by the waiting bar accessible, including still-working agents launched in earlier turns and children on another provider. Its count and the waiting bar should describe a consistent set of work.

    Instead, the bar reports three, while the counter and sheet expose only one. For this reporter the impact is more than a misleading number: monitoring the other two requires manually searching older conversation history.

    Evidence

    Composer: “Waiting on 3 subagents” alongside “1/1”, and the latest visible Codex/Luna launch card:

    Android composer reports 3 waiting subagents but its roster counter is 1/1

    Expanded Agents sheet: only one Working Codex / GPT-6-Luna row:

    Expanded Android Agents sheet contains only one Working Codex GPT-6-Luna row

    The screenshots were captured separately; the agent timers differ slightly. Private project/host labels, task titles and unrelated conversation content are removed. These GitHub-hosted SVG copies preserve the redacted source PNG pixels exactly, verified by independent rendering back to PNG. No UI content was generated.

    Environment and verification limits

    • Surface: native Android app.
    • T3 Android app version: 2.0.0, reported by the user. Build number, Android OS version and phone model: not yet captured.
    • Parent provider/model: Claude Opus, as reported by the user. Visible child: Codex / GPT-6-Luna, confirmed by the screenshots. The other children's exact model IDs are not captured in these images.
    • The remote environment was previously verified as T3 server v0.1.0, but was not rechecked at the screenshot time. Do not substitute that server version for the Android client build.
    • No Android logs or client snapshot/network trace was captured. No same-provider control test, clean-install reproduction, or verification on a client containing #20785 was performed.
    • Workaround: scroll through older parent-thread launch cards to inspect the agents missing from the sheet.

    The maintainer's earlier diagnosis here (single-run roster versus thread-wide pending work) fits the reporter's “only the latest agents” description. However, this new occurrence was not traced to that function independently. #20785 was merged on 2026-10-17; the Android build is the missing detail needed to distinguish an older client from a regression or separate cause.

    Prepared by GPT-6.1-Sol through Hermes Agent on behalf of the reporter, using the reporter's screenshots and description. No agents were started, stopped or interrupted for this report.

Sign in to join this conversation.