[Bug]: Mobile pill shows "Waiting on 6 subagents" next to a "1/1" counter
Area
apps/mobile (logic lives in packages/client-runtime)
Steps to reproduce
- 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).
- Let it spawn several tasks across several runs, so that after the last run completes, multiple subagents are still
running(one per run). - 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 printsliveCount/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.
[!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 exceptrolled_back.presentPendingBackgroundWork, which now lives inpackages/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,FloatingWorkingControlshows1/1beside 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/1behavior inthreadSubagents.test.tscan 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.
[!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!
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
- 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.
- At the latest reply, the floating bar says “Waiting on 3 subagents”. Its adjacent agents counter reads “1/1”.
- 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.
- 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:
Expanded Agents sheet: 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.