Skip to content

feat(ui): edit an agent's thinking default from its Overview - #198399

Merged
hannesrudolph merged 7 commits into
openclaw:mainfrom
daniel-lxs:agents-thinking-default-edit
Nov 17, 2026
Merged

hannesrudolph merged 7 commits into
openclaw:mainfrom
daniel-lxs:agents-thinking-default-edit

Conversation

@daniel-lxs

@daniel-lxs daniel-lxs commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Closes #198371

What Problem This Solves

The agent Overview page shows an agent's Thinking default as plain text, so setting one agent's level (for example a coder agent) means using the config editor or the CLI.

User Impact

Operators who can edit config can pick an agent's thinking default in Agents → agent → Overview → Model selection. The menu lists only the levels that agent's model accepts, plus Inherit default (level), which removes the agent's own setting. Choices save to agents.entries.<id>.thinkingDefault through the page's existing autosave and affect only that agent. Message and session thinking overrides still take precedence.

Why This Change Was Made

  • The levels come from the agent's row in agents.list (thinkingLevels), which the Gateway already resolves for that agent's model and runtime.
  • Schema change (additive): agents.list agent rows gain an optional thinkingInheritedDefault. The Gateway sends it only when the agent sets its own thinkingDefault. It is the level that clearing the override resolves to, using the same resolver as runs: per-agent model params, shared model params, the global default, the model's own default, then clamping to the model's levels. The core resolver gains an option to skip only the agent's own thinkingDefault. Existing clients can ignore the field; the Swift and Kotlin protocol contracts are unchanged. The protocol changelog is release-owned, so this description records the schema change.
  • Restricted model views (a model selection policy) drop thinkingInheritedDefault along with the other thinking fields, because it is resolved from the agent's hidden model. Their thinkingDefault is the agent's own override, so with an override and no inherited level the option reads plain Inherit default and names no level.
  • The Inherit default (level) label shows thinkingInheritedDefault, or the agent's resolved level when it has no override. Example: global Low, a per-model param of High and an agent override of Medium give "Inherit default (High)", which is what clearing produces.
  • Level names come from one helper, thinkingLevelLabel in ui/src/lib/chat/thinking-level-label.ts, which this page and the Models page share. It has its own module so it stays out of chat boot JS (the Control UI performance check counts every byte there). It uses the quickSettings.model.thinkingLevels.* translations through each page's reactive translator. The five standard levels that had no key (Minimal, Extra high, Adaptive, Maximum, Ultra) gain canonical English, and the translation pipeline supplies other locales. Provider-specific levels keep their own label.
  • A saved level that the current model does not offer stays visible and selected, but greyed out, instead of being rewritten.
  • The row reads the real config even when the model catalog restricts model choices, because thinking is not a model choice.
  • Before config has loaded, or for users who cannot read config, the row is disabled and shows the resolved level the way the read-only row did.

Known gaps:

  • The level list belongs to the agent's saved model. Right after changing the primary model, the list still shows the old model's levels until the agent list refreshes. Any level picked meanwhile is valid config, and the Gateway clamps it to the new model at run time.
  • On a model whose only level is a harness Ultra, an agent with an Ultra override shows "Inherit default (Ultra)", though clearing it leaves no default. This is rare, and the level is visible and recoverable.

Evidence

Live run on an isolated Gateway built from this branch, inside a macOS VM, with made-up config: agent coder on a stand-in reasoning model. A headless browser drove the Control UI, and the script checked the config file after each step.

Before choosing: the menu offers Inherit default (Medium), Off, Minimal, Low, Medium, High, Ultra.
This frame is from the run before the label-only fix; that fix does not change this frame.

Before

Before

After

After

After choosing High, the config file has agents.entries.coder.thinkingDefault: "high" and agents.defaults is unchanged; after a page reload the row still shows High:

Choosing Inherit default again removes the key from agents.entries.coder; after a reload the row reads Inherit default (Medium):

Second live run, same VM setup: global Low, a per-model params.thinking of High, and coder's own Medium.

  • Upgrade from latest stable (2026.11.3): stable shows the read-only row. The update runs openclaw doctor --fix --non-interactive with this build, then starts on the same state. coder's entry and the defaults are unchanged. agents.list reports thinkingDefault: "medium" and thinkingInheritedDefault: "high", and the inherit option reads "Inherit default (High)". Choosing it removes the override, and after a reload the agent resolves to High.
  • Model-restricted operator: a trusted-proxy person whose role has modelPolicy.allow: ["standin/stand-in"] and admin scope. The projected roster carries the override as thinkingDefault with no inherited field, and the inherit option reads plain "Inherit default".

Tests and checks:

  • ui/src/pages/agents/panels-overview.test.ts: 21 passed; ui/src/pages/agents/model-config.test.ts: 13 passed; the Models page view, locale and page tests and ui/src/lib/chat/thinking.test.ts pass with the shared helper. They cover the levels offered, saving and clearing, inherited labels (global Low, per-model High and override Medium labelled "Inherit default (High)"; the same override on a restricted roster labelled plain "Inherit default"), a saved level the model does not offer, a restricted model catalog, and the disabled state without config. The tests that pinned the row as a read-only fact were replaced.
  • src/gateway/session-utils.agent-models.test.ts: agents.list reports thinkingInheritedDefault: "high" for that case and omits it for an agent without an override; the real restricted projection of that roster drops the field and reports thinkingDefault: "medium". The UI and Gateway tests each fail without their fix and pass with it.
  • src/gateway/session-utils-model.thinking-default.test.ts, src/gateway/server-methods/agents-list.test.ts and packages/gateway-protocol/src/schema/agents-models-skills.test.ts: pass.
  • pnpm tsgo:ui, pnpm tsgo:core, the gateway test typecheck, oxlint and format on the touched files, pnpm ui:i18n:verify and pnpm protocol:check (Swift and Kotlin contracts unchanged): pass. In a German locale the selector reads "Inherit default (Hoch)", "Aus", "Niedrig", "Mittel", "Hoch".
  • Not run: the full test suite (left to CI).

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

The agent Overview showed the thinking default as plain text. It is now a
select in Model selection with the levels the agent's model accepts and an
inherit option; choices save to agents.entries.<id>.thinkingDefault.
@daniel-lxs
daniel-lxs force-pushed the agents-thinking-default-edit branch from 2c1e31e to 0dcfb36 Compare November 13, 2026 18:10
@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 13, 2026
@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Adds an agent-specific thinking-default selector with supported levels, inheritance, and existing configuration autosave.

Example: The coder agent has Medium, its model default is High, and the global default is Low.

  • Before: Overview displays Medium as read-only text.
  • After: The operator can select another level or choose Inherit default (High) to remove coder's override.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused implementation with strong supplied behavior evidence and no identified defects; product direction remains unresolved.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected live Control UI screenshots and accompanying Gateway/config traces cover saving, reload persistence, clearing, model-restricted presentation, and stable-to-branch upgrade; subsequent label-helper changes preserve that exercised flow.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete
User problem: Operators see an agent's thinking default beside model controls but must discover a separate configuration editor to change it.
Reason: The implementation offers concrete convenience, but adding this editor to an intentionally informational row remains an unapproved product choice.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it provides a coherent editor still absent from main, with no actionable patch defects found; its placement needs a maintainer product decision.

Priority: P2
Reviewed head: 6a9945feaf0a2f5ac432e3c69c8434275c70e718
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should Agents Overview expose this persistent thinking-default selector, including the additive inherited-default roster field?
  • Recommendation: Approve the Overview editor: Accept the focused control beside the agent's model settings, using existing authorization, autosave, and thinking resolution.
  • Why: The existing row was deliberately presented as a read-only fact, and neither this PR nor the linked discussions records maintainer approval of the new editor.

Before merge

  • Await maintainer action - Approve the workflow runs for head 6a9945f so required CI can execute.

Findings

None.

Agent review details

How this fits together

The Gateway resolves model thinking capabilities and inherited defaults into agents.list; Agents Overview presents those facts and writes the existing per-agent setting through the shared configuration owner.

flowchart LR
  Config[Agent configuration] --> Resolver[Shared thinking resolver]
  Resolver --> Roster[Gateway agent roster]
  Roster --> Overview[Agents Overview selector]
  Overview --> Actions[Existing configuration actions]
  Actions --> Config
Loading

Technical review

Best possible solution:

If maintainers approve the placement, retain this focused selector using existing configuration ownership and Gateway-resolved thinking capabilities.

Do we have a high-confidence way to reproduce the issue?

Current main source confirms the missing editor, and the supplied stable screenshot shows the read-only value; no reviewer-run reproduction was performed.

Is this the best way to solve the issue?

The implementation is appropriately scoped: it reuses configuration actions and the shared resolver, preserves saved unsupported values, and shares label formatting across both consumers.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 281c2bcd554b.

Provenance checked

  • Overview thinking-default presentation changes intended behavior with a stated reason (Fix Control UI agent thinking defaults #81795: Expose the effective agent-specific default instead of a misleading global value; the later Overview layout retained that display.)
  • Shared thinking resolution keeps the original intent (90567a8: Centralize selected-model and runtime thinking policy while preserving configured identity and precedence.)
  • Models settings labels and saved preferences keeps the original intent (d694fe8: Offer model-supported reasoning levels and preserve unsupported saved choices without rewriting them.)
  • Existing agent configuration actions keeps the original intent (2498c34: Expose per-agent utility selection through existing configuration ownership while retaining inheritance and agent-specific settings.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Daniel: Raw commit 2498c34 adds ui/src/pages/agents/agent-config-actions.ts:67 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 2498c348bc28; files: ui/src/pages/agents/agent-config-actions.ts)

PR surface

Source +102, Tests +198. Total +300 across 17 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 13 130 28 +102
Tests 4 207 9 +198
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 17 337 37 +300

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Configuration and protocol surface 0 new configuration keys; 1 optional response field The editor writes existing thinkingDefault configuration; thinkingInheritedDefault supplies the resolved inheritance label without a new persistent format.

Root-cause cluster

Relationship: same_root_cause
Canonical: #198371
Summary: This PR implements the renewed request for a persistent Overview editor; earlier display and session-control work serves different behavior.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: A bounded configuration ergonomics improvement with an existing configuration-editor alternative.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on maintainer: Only explicit maintainer approvals or decisions remain; merge is still blocked.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-11-13T18:30:41.207Z sha 0dcfb36 :: blocked before merge. :: [P2] Avoid labeling the global level as the inherited agent level
  • reviewed 2026-11-13T20:41:46.338Z sha 807df5f :: needs real behavior proof before merge. :: [P2] Avoid treating a restricted row's current override as inherited
  • reviewed 2026-11-13T22:44:23.007Z sha 7ffb790 :: blocked before merge. :: none

Reviewed November 13, 2026, 10:41 PM ET / November 14, 2026, 03:41 UTC (Revision 4).

The Inherit default option named agents.defaults.thinkingDefault, but the
runtime resolves per-model params before the global default. agents.list
rows with an agent-level thinkingDefault now carry thinkingInheritedDefault,
resolved by the same Gateway resolver without that override, and the
Overview labels the inherit option with it.
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime agents Agent runtime and tooling labels Nov 13, 2026
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 13, 2026
A model-restricted roster drops thinkingInheritedDefault and reports the
agent's own override as thinkingDefault, so the Overview read the override
as the inherited level. With an override and no inherited level, the
inherit option now names no level. The Gateway test covers the real
projected restricted roster.
@daniel-lxs

Copy link
Copy Markdown
Member Author

Live proof at 7ffb7904285, run in a macOS VM with made-up config. A stand-in reasoning model offers off, minimal, low, medium, high, ultra. Config: agents.defaults.thinkingDefault: "low", agents.defaults.models["standin/stand-in"].params.thinking: "high", and agents.entries.coder.thinkingDefault: "medium". A headless browser drove the Control UI. The script read agents.list from the page's own WebSocket frames and checked the config file after each step.

1. Upgrade from latest stable (2026.11.3) on the same state and config

Stable shows coder's thinking default as a read-only fact:

Stable 2026.11.3 Overview: Thinking Default medium, read-only

The update then ran openclaw doctor --fix --non-interactive with the branch build (exit 0; stable's agent database is an older schema), and the branch Gateway started on that state.

  • coder's entry is unchanged: {"name":"Coder","workspace":"…/ws-coder","thinkingDefault":"medium"}. defaults.thinkingDefault is still low and the per-model params.thinking is still high.
  • agents.list coder row: {"thinkingDefault":"medium","thinkingInheritedDefault":"high"}.
  • Overview select: value medium, options ["Inherit default (High)","Off","Minimal","Low","Medium","High","Ultra"].

Branch after upgrade: Thinking default Medium

Choosing Inherit default (High) removed thinkingDefault from agents.entries.coder. After a reload, agents.list reports thinkingDefault: "high", the level the label named:

After clearing: Inherit default (High)

2. Model-restricted operator (the P2 path)

Same config on the branch, with gateway.auth.mode: "trusted-proxy" and a same-host identity proxy. The signed-in person's default role has modelPolicy: { allow: ["standin/stand-in"] } (the configured model is permitted) and admin scope, so the operator can edit config.

  • agents.list coder row as projected for this operator: {"thinkingDefault":"medium","hasInherited":false,"levels":["off","minimal","low","medium","high","ultra"]}. The override arrives as thinkingDefault and thinkingInheritedDefault is dropped.
  • Overview select: value medium, options ["Inherit default","Off","Minimal","Low","Medium","High","Ultra"]. The inherit option names no level. On the parent commit, panels-overview.test.ts renders this roster shape as "Inherit default (Medium)" (red), and with this fix as "Inherit default".

Restricted operator: model choices policy-owned, Thinking default Medium

Not covered here: CI on this head is waiting for maintainer approval to run.

@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 13, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 13, 2026
Standard levels use the quickSettings.model.thinkingLevels names the Models
page uses; the five standard levels without a key gain canonical English.
The protocol changelog entry moves to the PR description.
The agent Overview and the Models page each had their own label helper.
Both now use thinkingLevelLabel from lib/chat/thinking.ts with their
reactive translator, so labels follow locale changes and every standard
level uses its translated name.
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 14, 2026
@roboclaw-bot roboclaw-bot added the clawtributors PR from a clawtributor label Nov 15, 2026
@daniel-lxs

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@hannesrudolph
hannesrudolph merged commit b1517df into openclaw:main Nov 17, 2026
143 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 18, 2026
…w#198399)

* feat(ui): edit an agent's thinking default from its Overview

The agent Overview showed the thinking default as plain text. It is now a
select in Model selection with the levels the agent's model accepts and an
inherit option; choices save to agents.entries.<id>.thinkingDefault.

* fix(ui): name the level an agent's thinking override falls back to

The Inherit default option named agents.defaults.thinkingDefault, but the
runtime resolves per-model params before the global default. agents.list
rows with an agent-level thinkingDefault now carry thinkingInheritedDefault,
resolved by the same Gateway resolver without that override, and the
Overview labels the inherit option with it.

* fix(ui): name no inherited thinking level when the roster omits it

A model-restricted roster drops thinkingInheritedDefault and reports the
agent's own override as thinkingDefault, so the Overview read the override
as the inherited level. With an override and no inherited level, the
inherit option now names no level. The Gateway test covers the real
projected restricted roster.

* fix(ui): translate thinking level names on the agent Overview

Standard levels use the quickSettings.model.thinkingLevels names the Models
page uses; the five standard levels without a key gain canonical English.
The protocol changelog entry moves to the PR description.

* refactor(ui): share one thinking level label helper

The agent Overview and the Models page each had their own label helper.
Both now use thinkingLevelLabel from lib/chat/thinking.ts with their
reactive translator, so labels follow locale changes and every standard
level uses its translated name.

* perf(ui): keep the thinking level label helper out of chat boot JS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui clawtributors PR from a clawtributor gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on maintainer Only explicit maintainer approvals or decisions remain; merge is still blocked.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI: make “Thinking default” editable per agent in Agents Overview

3 participants