Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, well-scoped bug fix that stops the subagent status bar from displaying catalog-guessed effort values while preserving explicitly selected or provider-reported values. The affected web and mobile display paths are covered by focused tests, with no schema, infrastructure, security, or default-setting changes. You can add or adjust custom eligibility rules. Learn more. |
|
Important Review skippedWe 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 You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
| Check 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 ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. Title check ✅ Passed The title clearly and concisely describes the main change: the subagent status bar no longer guesses an effort value. Description check ✅ Passed The description covers the problem, change, scope and approval, and verification. It also states what was not checked and includes before-and-after screenshots for the UI change.
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Dismissing prior approval to re-evaluate 77d0e99
77d0e99 to
04eaf68
Compare
A provider-native subagent's thread showed the catalog's default effort
("medium" for an Opus 5.5 subagent that ran at high) whenever its
selection carried no effort option, because formatModelSelectionEffort
resolved the label the way the composer's picker does: stored choice,
else descriptor current value, else catalog default.
The adapter writes a subagent's selection from what the provider told
it, so a missing option means the effort is unknown. The bar now names
an effort only when the selection or a matching provider report states
one, and shows nothing otherwise. The composer and the OpenCode
"Unknown" placeholder are unchanged.
Made by Claude Fable 5.1 in Claude Code.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
04eaf68 to
d133f9d
Compare
Dismissing prior approval to re-evaluate d133f9d
Problem
Opening a Claude subagent's own thread shows a reasoning effort the subagent never reported. For an Opus 5.5 subagent whose agent definition sets
effort: high, the status bar readsClaude Opus 5.5 Mediumwhile the subagent itself printsCLAUDE_EFFORT=highand every assistant record in its Claude Code transcript carries"effort":"high".The child thread's selection is
{ "instanceId": "claudeAgent", "model": "claude-opus-5-5" }with no options: the adapter writes only the model it learned (child thread creation inClaudeAdapterV2, andProviderEventIngestor.syncSubagentThreadModeldrops the parent's options on a model change).formatModelSelectionEffortthen resolves the label the way the composer's picker does: stored choice, else descriptor current value, else catalog default. Opus 5.5's catalog default ismedium, so the bar says Medium. Mobile shares the helper.Expected: the bar names the effort only when it is known, and shows nothing otherwise, as its
effortLabelprop already allows.Change
formatModelSelectionEffort(packages/client-runtime) returns a label only when the thread's selection states the effort option, or the provider reported one for the same model and instance. A catalog default or current value is no longer taken as the subagent's effort. The check uses a small shared helper,isProviderOptionValueStated, next to the existing report-matching rule inpackages/shared/src/model.ts, so both use the same model/instance match.Unchanged: the composer's effort picker (it resolves defaults through
getProviderOptionCurrentValuedirectly) and the OpenCodevariant"Unknown" placeholder from #14978, which carries no value and still shows.Not in this PR: learning the real effort. A subagent on the parent's model still inherits the parent's full selection, so its bar can still show the session's effort. Reporting the effort the SDK provides (hooks in
ClaudeAdapterV2,effortonOrchestrationV2Subagent) is a separate change proposed on #15214.Scope and approval
Triaged bug: #15214 (
bug,via-triage). The triage comment names this surface: "When the model differs, the child selection is only{ instanceId, model }, and the bar shows the catalog default rather than the transcript value", and the intended behavior: "show the effort the subagent actually ran at and nothing until it's known". This PR is the "nothing until known" half for the subagent bar. It adds no data and changes no defaults.Verification
Focused tests (68 pass; 4 new cases: stated effort, reported effort, no stated or reported effort, report for another model):
Live reproduction on the web dev client (macOS, Claude Code 2.1.289, Agent SDK 0.3.276, isolated
--home-dir): a Claude Sonnet 5.5 thread at High calledAgent(subagent_type: "prober", model: "opus");proberis defined witheffort: highand its only task wasecho CLAUDE_EFFORT=$CLAUDE_EFFORT, which printedCLAUDE_EFFORT=high. The projected child thread's selection was{instanceId: "claudeAgent", model: "claude-opus-5-5"}with no options.highSame thread, same data; only the client changed between the two captures.
Not checked: the mobile client was not run. It calls the same helper from
ThreadDetailScreenand already renders nothing for a null label.Made by Claude Fable 5.1 in Claude Code.
🤖 Generated with Claude Code
Fixes #15896