Skip to content

Keep declared default effort visible for every chat agent - #36455

Merged
brennanb2025 merged 8 commits into
mainfrom
brennanb2025/effort-default-all-agents
Oct 31, 2026
Merged

brennanb2025 merged 8 commits into
mainfrom
brennanb2025/effort-default-all-agents

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​710 $\color{#cf222e}{\Huge{\mathbf{−}}}$​61 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​649
Prod 21 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​611 $\color{#cf222e}{\Huge{\mathbf{−}}}$​89 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​522

What was wrong

When you haven't picked an effort level in a chat, the effort control should still tell you what the model will use by default. Only Codex chats did this. For every other agent the effort control showed nothing once the chat was sitting idle after a reply, even when the agent had told Orca what its default is.

Two agents also told Orca the wrong default:

  • Grok reports its default effort, but Orca ignored that value.
  • OpenCode doesn't report a default at all. Orca guessed by taking the first effort option in the list, which isn't what OpenCode actually uses.

What this changes

  • Every agent, not just Codex, now shows its model's default effort in the effort control when you haven't picked one. It appears in the same "default" style Codex already uses.
  • Grok shows the default effort it actually reports.
  • OpenCode shows no default, rather than a guess, until it reports one.
  • Nothing you send changes. Every chat starts with, and sends with its first message, exactly the effort it did before. Only what the control displays is different.

How it works

Each model in an agent's model list can now carry one extra, optional value: the default effort that agent says it uses. Orca reads that value only to label the effort control. It is kept separate from the existing value Orca uses to decide what effort to send when it launches a chat or sends a first message. That separation is what keeps this display-only: an earlier version reused the existing value and, for Grok, changed the effort a new chat started with. Review caught and fixed that.

Anything you picked, saved, or that the agent reports for the running chat still wins over this default label.

Older versions

Nothing is saved to disk, and no new feature flag or minimum version is needed. An older host doesn't send the new value, so on an older host non-Codex agents simply keep showing no default, as they do today. Codex behaves as before everywhere.

Testing

Tests feed in Grok's and OpenCode's real recorded output and check what the control shows on desktop and phone. They also check that what every agent sends at launch and with its first message is identical to main. All CI checks pass.

tracked in STA-13018

@brennanb2025
brennanb2025 marked this pull request as ready for review October 30, 2026 21:25
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50632363-b2c5-4179-8acb-75e8b50ae38b
Commits

Reviewing files that changed from the base of the PR and between 9025d69 and 5aec069.

Files selected for processing: 1
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.learned-default.test.tsx
Files skipped from review as they are similar to previous changes: 1
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.learned-default.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

Walkthrough

Catalog adapters now report declared reasoning effort separately from menu defaults. The native catalog merges declarations from discovery, live listings, and configured choices, while excluding transient declarations from persisted listings and listing keys. Session option views display declared effort when it matches an available choice. Tests and model fixtures cover these behaviors across catalog sources and session consumers.

Merge Risk: Moderate · up to 5aec0

A session’s selected effort can appear as the model’s declared default. Resolve that distinction before merging; the previously failing mobile assertion has been fixed.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 41.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description explains the problem, the change, the mechanism, older versions, and testing. It omits required template sections and evidence. It does not include ELI5, a valid issue link, Visual Pro… Update the PR description. Add an ELI5 section. Add a valid issue reference in the required format, such as "Fixes #"; "tracked in STA-13018" alone is insufficient. Add BEFORE and AFTER visual captures, preferably video, for each af…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: preserving declared default effort visibility for every chat agent.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 41.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 17 functions across 33 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Explanation

The description explains the problem, the change, the mechanism, older versions, and testing. It omits required template sections and evidence. It does not include ELI5, a valid issue link, Visual Proof, AI Disclosure, Review, Agent skill upstream boundary, or the completed checklist. Testing does not identify platforms or confirm manual testing. The change affects displayed effort defaults on desktop and phone, so visual proof is required.

Resolution

Update the PR description. Add an ELI5 section. Add a valid issue reference in the required format, such as "Fixes #<number>"; "tracked in STA-13018" alone is insufficient. Add BEFORE and AFTER visual captures, preferably video, for each affected agent on desktop and phone. If visual proof is not applicable, write "N/A" and explain why. Identify the tested platforms: macOS, Linux, Windows, and SSH. If manual testing was completed, tick the manual-testing checkbox and list the steps. Complete AI Disclosure by naming the AI model used or confirming that the author is a StablyAI team member. Complete the Review and Agent skill upstream boundary checkboxes. Complete the checklist and confirm that pnpm lint, typecheck, test, and build pass locally, or state that CI covers these checks.

Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4147f1d3-5313-48d7-85ed-a31b40ea44bf
Commits

Reviewing files that changed from the base of the PR and between d0bdbfb and 9113578.

Files selected for processing: 9
  • src/main/acp/acp-dialects/grok-model-catalog.test.ts
  • src/main/acp/acp-dialects/grok-model-catalog.ts
  • src/main/acp/acp-model-catalog-probe.test.ts
  • src/main/acp/fixtures/grok-v1-model.json
  • src/main/acp/fixtures/opencode-v1-model-listing.txt
  • src/main/opencode/opencode-model-catalog-listing.test.ts
  • src/main/opencode/opencode-model-catalog-listing.ts
  • src/shared/structured-agent-session-option-view.test.ts
  • src/shared/structured-agent-session-option-view.ts
Files with no reviewable changes: 1
  • src/shared/structured-agent-session-option-view.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 22a91f4e-ad29-4791-bac0-d21bccb2a0d3
Commits

Reviewing files that changed from the base of the PR and between 9113578 and b608d77.

Files selected for processing: 30
  • mobile/src/session/use-mobile-structured-agent-options.declared-effort.test.ts
  • src/main/acp/acp-dialects/acp-dialect.ts
  • src/main/acp/acp-dialects/grok-model-catalog.test.ts
  • src/main/acp/acp-dialects/grok-model-catalog.ts
  • src/main/acp/acp-model-catalog-probe.test.ts
  • src/main/acp/acp-structured-options.test.ts
  • src/main/acp/acp-structured-options.ts
  • src/main/claude/claude-model-catalog-probe.test.ts
  • src/main/claude/claude-structured-catalog-listing.ts
  • src/main/codex/codex-configured-launch-defaults.ts
  • src/main/codex/codex-structured-model-catalog.ts
  • src/main/codex/codex-structured-session-options-catalog.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-declared-effort.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-entry.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-live-listings.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-models.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-persistence.test.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-persistence.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-store.ts
  • src/main/native-chat/agent-model-catalog/agent-model-catalog-workspace.ts
  • src/main/opencode/opencode-model-catalog-listing.test.ts
  • src/main/opencode/opencode-model-catalog-listing.ts
  • src/main/pi/rpc-model-catalog-probe.test.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.learned-default.test.tsx
  • src/shared/agent-session-option-catalog-types.ts
  • src/shared/agent-session-wire.ts
  • src/shared/structured-agent-session-discovered-model.ts
  • src/shared/structured-agent-session-option-view.test.ts
  • src/shared/structured-agent-session-option-view.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick comments: 1
src/main/acp/acp-structured-options.test.ts: 1

349-370: Trivial · Functional Correctness · Quick win

Use different values for current and declared effort.

The fixture sets both values to high. A regression that copies the session's current effort into declaredDefaultEffort would pass. Keep the current effort at high, but declare low in the model metadata and assert declaredDefaultEffort: 'low'.

Suggested fix
-              reasoningEffort: 'high',
+              reasoningEffort: 'low',
...
-        declaredDefaultEffort: 'high',
+        declaredDefaultEffort: 'low',

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ce9bf707-0db7-4396-8cd0-3b5180360692
Commits

Reviewing files that changed from the base of the PR and between 773cc1d and 9025d69.

Files selected for processing: 2
  • mobile/src/session/use-mobile-structured-agent-options.declared-effort.test.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session-options.learned-default.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Native chats could lose their effort label after a reply even when the model declared a default. The original display restriction was agent-specific, while some catalog values also doubled as launch defaults; correcting those values directly could change a later chat’s first request.

Desktop and phone now show a source-backed declared default when no current effort exists. Grok uses its reported declaration; OpenCode does not infer one from variant order. Declaration evidence is separate from action defaults, and explicit unknown evidence defeats an older claim. Current/saved choices and every launch/first-send input stay unchanged. Older hosts and restored catalogs supply no new declaration proof until fresh evidence arrives; existing Codex behavior is retained.

The full review fixed the launch-policy leak, old-host provenance gap, actual live Grok result with missing membership IDs, and the typed desktop/phone test boundaries. No runtime finding or deferred in-scope bug remains. The final main sync was 9025d69; the later 5aec069 commit combines only duplicate test imports.

Validation: CI is green on 5aec0691be8f9f9af24843c4ef73cd0caf298d84: PR checks, Mobile, and WSL. Fedora needed one failed-only retry after PowerShell initialization failed; the retry passed and successful jobs were preserved. Focused recorded-source→real-host→desktop/phone contracts passed; pinned-main replay preserved High/High/Low first selections and old/new peer inputs for eleven agents. Source/freshness/persistence and N/10N operation contracts passed. Actual Mobile CI ran the phone hook and its typecheck ratchet. All changed flows are tests rows; no layout, interaction, lifecycle, process or login change required a running-app round or screenshot. No real-agent run is claimed.

For Brennan’s review:

@brennanb2025
brennanb2025 merged commit a62f1e4 into main Oct 31, 2026
56 of 57 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/effort-default-all-agents branch October 31, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant