fix(clients): subagent bar stops guessing the subagent's effort #15710
main fromrefs/pull/15710/head·merged by juliusmarminge View on GitHubProvider-native subagent bars could display a catalog default such as “Medium” even when neither the stored selection nor the provider reported an effort.
Fixes #15896.
Read the stated value directly and accept reports only for the same model and provider instance. Stored values take precedence, including obsolete choices that must not normalize to a default. Web, desktop’s web surface, and mobile share this formatter. General model pickers retain their existing default behavior; OpenCode’s Unknown/Default variant labels remain.
Continues @fixfon’s original #15710, preserving contributor history and merging current main. The original presence gate was replaced because it still guessed from obsolete stored values.
Verification: 69 focused tests pass across client-runtime/shared (71 before consolidation); three introduced test declarations reduced to two formatter cases in one changed test file. Pinned-main regression and the obsolete-choice regression both fail before the fix. Scoped lint/format and shared, client-runtime, web, and mobile typechecks pass. One independent whole-PR review round completed: Opus and Sol both reported no findings at ea9b1b1.
Linux web verification used schema-validated synthetic provider-native threads in isolated state and the real client/server. Unstated effort changed from Medium to no label; explicit and matching reported High remained; another model’s report was ignored; Open parent navigated to the parent. Matching 1280×800 captures use exact pinned-main production sources before and final production sources after, restored byte-for-byte before review.
Before — no effort stated, catalog Medium shown:

After — no effort stated, effort omitted:

Not exercised on macOS, Windows, Electron, iOS, Android, or a remote/tunnel deployment. This display fix does not make adapters learn actual effort; same-model children inheriting a parent session selection remains a preexisting limitation.
Implemented and tested with Codex gpt-6-astra / gpt-6.1-sol in T3 Code; reviewed with Claude Opus 5.5 and Codex gpt-6-sol.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Approvability#
Verdict: Approved at
ea9b1b1Macroscope's review found this PR approvable — This is a focused client display fix that stops presenting catalog defaults as stated subagent effort while preserving explicit and matching reported values. Its runtime scope is narrow, existing selection behavior is unchanged, and regression coverage was added.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).Important
Review skipped#
We couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting
@coderabbitai full review.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- 🔍 Trigger review
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
bf687706-1d66-421f-9205-601fbb892fa2
📥 Commits
-
Reviewing files that changed from the base of the PR and between 4ee6bfd50ef4a089440d5c3662db2298da9cc50e and 77d0e999517c6988a5322010b80447a27297f226.
📒 Files selected for processing (4)
-
packages/client-runtime/src/state/threadExecution.test.tspackages/client-runtime/src/state/threadExecution.tspackages/shared/src/model.test.tspackages/shared/src/model.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
📝 Walkthrough
-
The change adds a helper that detects explicitly selected or matching provider-reported model options. Thread effort formatting now omits catalog-inferred effort when no value was stated. Tests cover reported values, stored-value precedence, and missing or mismatched reports.
Changes: Model Effort Reporting
Layer / File(s) Summary Detect stated model options
packages/shared/src/model.ts,packages/shared/src/model.test.tsThe new isProviderOptionValueStatedhelper recognizes options stored on a selection or reported for the matching model and provider instance. Tests cover stated, inferred, mismatched, and absent values.Format thread effort from stated values
packages/client-runtime/src/state/threadExecution.ts,packages/client-runtime/src/state/threadExecution.test.tsThread effort formatting skips catalog-current values when neither selection states the option. Tests cover provider-reported effort, stored-value precedence, and missing or mismatched reports. Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
t3dotgg
### Architecture SummaryMerge Risk: ⚪ Minimal · up to
77d0e-
The subagent status bar will stop showing a guessed effort level when the effort is not actually known. No merge-blocking risk was identified.
Architecture risk: 🟡 Medium · up to
77d0eThe change affects 2 systems.
Changed systems:
packages/shared,packages/client-runtimeArchitecture concerns No architecture-level concerns identified.
Review details
-
Systems and components
- observed — packages/shared (library) was modified; 2 changed files map to changed impact.
- observed — packages/client-runtime (library) was modified; 2 changed files map to changed impact.
Before / after behavior
- observed — Modified behavior in packages/client-runtime/src/state/threadExecution.test.ts: Added tests that a reported effort is displayed when no stored effort overrides it, and that a stored effort takes precedence over the report.
- observed — Modified behavior in packages/client-runtime/src/state/threadExecution.test.ts: Replaced expectations that missing stored effort uses the catalog default or current value with
null; added a check that a reported effort for a different model also yieldsnull. - observed — Modified behavior in packages/client-runtime/src/state/threadExecution.ts: The model helper import adds
getProviderOptionCurrentValueandisProviderOptionValueStatedfor distinguishing stated effort from resolved defaults. - observed — Modified behavior in packages/client-runtime/src/state/threadExecution.ts: The documentation changes from describing a thread’s effective effort—including stored choice, descriptor current value, or model default—to describing provider-native subagent effort based only on stated or provider-reported values; missing effort is unknown.
Reliability and maintainability
- inferred — Risk-relevant change factors for packages/shared: blast_radius_1; direct_dependents_1
Pre-merge checks:
4 · 1-
Failed checks: 1 warningCheck name Status Explanation Resolution Docstring Coverage Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 4 files. Write docstrings for the functions missing them to satisfy the coverage threshold. Passed checks: 4 passed-
Check name Status Explanation Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Title check The title clearly identifies the client fix and the primary behavior change: the subagent bar no longer guesses effort. Description check The description covers the problem, implementation, scope and issue references, focused verification, screenshots, limitations, and agent attribution. It is complete and relevant to the change.
-
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
juliusmarminge added labelsmacroscope-review
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
juliusmarminge assignedjuliusmarminge
Taking over this one as maintainer for batch scheduler-tasks-01. I will preserve the original commits, integrate current main, rebuild the focused effort-display fix, and verify it with fresh tests, actual client proof, and independent reviews. This takeover will remain unmerged.
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged this53ef45f
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed