Skip to content

fix: keep inherited tools when changing agent settings - #207884

Merged
daniel-lxs merged 2 commits into
mainfrom
openclaw/agent-tool-switches-truth-a1a0d7
Nov 29, 2026
Merged

daniel-lxs merged 2 commits into
mainfrom
openclaw/agent-tool-switches-truth-a1a0d7

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

In Agents → Tools, a switch could look on even when global settings blocked the tool. Tools granted globally, including by a plugin name such as memory-core, could look off, and turning on one more tool could take the inherited tools away from that agent.

User Impact

Inherited grants now show as on and say “Allowed by global settings.” A blocked tool says “Blocked by global settings” instead of offering a switch that cannot work. Turning on a new extra tool keeps the agent's existing grants. Turning a tool off by itself leaves inheritance intact. An agent that already has its own list keeps using it.

Why This Change Was Made

I changed how the editor reads and writes tool settings, not how the Gateway enforces them. The first extra grant starts from the inherited list because an agent list deliberately replaces, rather than extends, the global list (#157014). Individual switches, counts and bulk actions use the same rules. Disable all still records denials even for globally blocked tools, as intended by #156865.

The catalog keeps each plugin-built tool in its normal section and records its provider on the existing row. The editor can therefore match a plugin grant without hard-coding Memory tools or adding duplicate switches. Session availability remains separate from the configured setting.

Evidence

I built main and the PR and used Chromium against isolated Gateways on CrabBox AWS, with the real memory-core plugin enabled. No model call was needed. The main-versus-head Memory comparison is below.

Minimal profile, global alsoAllow: ["memory-core"] Main (9f63c3c17e48) PR (a99bcd65dde2)
What the Gateway listed memory_search and memory_get The same two tools
What Agents → Tools showed 0/2 on; no owner on the catalog row 2/2 on, labelled “Allowed by global settings”; row owner memory-core

On this head, I also enabled edit, reloaded, and checked the saved config: the agent had ["memory-core", "edit"], the global grant was unchanged, and all three tools were in the Gateway inventory. With Full and an explicit global allow: ["memory-core"], the Memory switches were on and editable, not globally blocked.

Main browser · Head browser and save/reload · Explicit allowlist

Checks: The catalog regression failed on main. On the PR, the build, 6 catalog tests, 30 Chromium panel tests, core/UI typechecks, targeted lint, format and locale verification passed. Suite wall times were 52.73 s and 4.41 s respectively. These checks do not prove live provider-auth-only discovery or the outcome of competing unnamed factories.

CI attribution: The failed check-lint on the prior PR head reported one controller-guard violation: view-sessions-scope.tsx:249 uses untrack once against an allowance of zero. The same guard on the CI base and pinned main failed identically. This PR does not change Workboard or its guard.

Memory: plugin-named grant

Main PR
Main: both available Memory tools look off PR: both Memory tools are on and labelled as globally allowed
Before: memory_search switch incorrectly off After: memory_search switch on with its source

Files: direct grants and a global block

The original Files reproduction used global grants for read and ls with write and session_status blocked. On main, turning on edit lost both inherited tools. On this head, the save and reload kept them and the Files capture was byte-identical to the published after image.

Clean comparison

Before After
Main: inherited file tools shown off Fix: inherited tools on and globally blocked write labelled

Annotated comparison

Before After
Read looks off and write looks editable Read is on and write is blocked

Worked on by

Work sessions

Linked for team reference; these sessions aren’t public.

@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: M labels Nov 29, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

The agent Tools editor reflects global restrictions and preserves inherited grants when creating agent-specific extras.

Example: An agent uses Minimal with global alsoAllow: ["memory-core"], then the operator enables edit.

  • Before: Memory tools appear off, and saving the extra tool can replace the inherited Memory grant.
  • After: Memory tools appear on, and the agent saves alsoAllow: ["memory-core", "edit"].

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, worthwhile repair supported by real browser evidence, save/reload results, and distinct catalog and editor regressions; exact-head CI remains in progress.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Chromium screenshots show the real Memory catalog changing from 0/2 to 2/2 with inherited-grant labels; the public body records isolated-Gateway save/reload retaining memory-core while adding edit, and the relevant production files are unchanged by the merge commit. Provider-auth-only discovery and competing unnamed factories remain outside the demonstrated scenarios.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Tool switches can misrepresent global settings, and enabling one extra tool can remove an agent's inherited grants.
Reason: The maintainer-authored direction restores truthful controls and preserves existing access during ordinary settings edits.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current-main tool-settings bug without changing runtime enforcement; no actionable defects were found in the pinned diff.

Reviewed head: 8dcce1e8f25829e1ae4b2594cbc18704c9884e06

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway catalog supplies tool identities and plugin ownership; the Control UI combines these with global and agent settings to display controls and stage changes through the existing config writer.

flowchart LR
  A[Global and agent settings] --> C[Tool settings policy]
  B[Gateway tool catalog] --> C
  C --> D[Agent Tools controls]
  D --> E[Existing config writer]
  E --> F[Runtime tool policy]
Loading

Technical review

Best possible solution:

Retain this focused editor and catalog repair while keeping the existing runtime policy and config owners authoritative.

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

Fetched main ignores inherited extras in the editor and initializes an extra grant from the agent-only list; the supplied browser comparison demonstrates the corresponding Memory display failure.

Is this the best way to solve the issue?

The change repairs the editor using existing matchers, plugin-group expansion, catalog metadata, and config staging rather than changing enforcement or inheritance semantics.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +122, Tests +71, Docs +4. Total +197 across 13 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 7 200 78 +122
Tests 4 73 2 +71
Docs 2 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 277 80 +197

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.

Labels

Label changes:

No label changes.

Label justifications:

  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • 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 (2 earlier review cycles)
  • reviewed 2026-11-29T01:53:13.470Z sha 16d7246 :: needs changes before merge. :: [P2] [P2] Preserve plugin ownership for plugin-built core tools
  • reviewed 2026-11-29T02:25:52.778Z sha a99bcd6 :: passed. :: none

Reviewed November 28, 2026, 9:44 PM ET / November 29, 2026, 02:44 UTC (Revision 3).

Project plugin ownership onto the existing catalog row so global plugin grants match the tools the runtime actually lists. Keep agent list replacement and runtime enforcement unchanged.

Co-authored-by: daniel-lxs <[email protected]>
@roboclaw-bot
roboclaw-bot force-pushed the openclaw/agent-tool-switches-truth-a1a0d7 branch from 16d7246 to a99bcd6 Compare November 29, 2026 02:20
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Nov 29, 2026
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@daniel-lxs
daniel-lxs merged commit 824d93c into main Nov 29, 2026
124 checks passed
@daniel-lxs
daniel-lxs deleted the openclaw/agent-tool-switches-truth-a1a0d7 branch November 29, 2026 03:04
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…seline

* commit '32403124cae2ccbcfc556e844b218682b133956e': (547 commits)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  chore: stop the Workboard resident-owner CLI test from failing on main (#207898)
  test(agents): isolate endpoint-based overflow classification (#207688)
  chore(doctor): record why the root defaultModel migration stays (#207890)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…eline

* commit 'eee1e0553d29456424ac367008c3cf080f9866ec': (550 commits)
  fix(acp): deliver bound channel replies to the pending question (#207035)
  fix(cron): keep required reports from going silent when nothing changes (#207044)
  test(sessions): assert participant queue rollback state (#207891)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  test(activity): check midnight refresh against the elapsed window (#207859)
  test(ui): use one persisted message ID in queued-image handoff (#207861)
  test(agents): release configured MCP fixture resources (#207716)
  fix(workboard): clear CI failures in the session filter editor (#207858)
  perf(ai): reduce allocation in OpenAI Responses streams (#207889)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
…ions suite

* commit '60e80f1c5fd439f7aa4ce33f54985c7efdc30884': (555 commits)
  refactor: remove the bundled GBrain adapter (#207924)
  improve(ui): show optional run limits beside the automation schedule (#201283)
  test(onboarding): inspect recorded output for credential leaks (#207872)
  perf(exec): reduce host memory sampler allocations (#207927)
  test(mcp-relay): isolate the Connected apps fallback locale (#207923)
  fix(acp): deliver bound channel replies to the pending question (#207035)
  fix(cron): keep required reports from going silent when nothing changes (#207044)
  test(sessions): assert participant queue rollback state (#207891)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  fix: verify chat Stop recovery after dashboard pairing (#207888)
  ...
vincentkoc added a commit that referenced this pull request Nov 29, 2026
* commit 'ba0a7a5fac3e2f1b642d05502273b98dc75adf4f': (556 commits)
  test(agents): fix provider header filtering coverage (#207732)
  refactor: remove the bundled GBrain adapter (#207924)
  improve(ui): show optional run limits beside the automation schedule (#201283)
  test(onboarding): inspect recorded output for credential leaks (#207872)
  perf(exec): reduce host memory sampler allocations (#207927)
  test(mcp-relay): isolate the Connected apps fallback locale (#207923)
  fix(acp): deliver bound channel replies to the pending question (#207035)
  fix(cron): keep required reports from going silent when nothing changes (#207044)
  test(sessions): assert participant queue rollback state (#207891)
  perf(gateway): skip session display preparation for transcript recall (#207916)
  test(agents): verify complete bracketed paste payload (#207733)
  test: stop timing out the cron recovery settlement test on slow runners (#207920)
  fix: show when worktree cleanup stopped or will retry (#207883)
  fix: show approval destinations only when the forwarding mode uses them (#207885)
  fix: keep inherited tools when changing agent settings (#207884)
  feat: let Knowledge add someone's email or other alias to a page without rewriting it (#207881)
  fix: stop reporting a child worker as finished when the Gateway loses contact (#207713)
  fix: keep the Activity visibility test stable at midnight (#207847)
  perf(agents): reuse prepared tool catalog executors (#207900)
  fix: show the Gateway command default beside host rules in Devices (#207887)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 29, 2026
Project plugin ownership onto the existing catalog row so global plugin grants match the tools the runtime actually lists. Keep agent list replacement and runtime enforcement unchanged.

Co-authored-by: daniel-lxs <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
Project plugin ownership onto the existing catalog row so global plugin grants match the tools the runtime actually lists. Keep agent list replacement and runtime enforcement unchanged.

Co-authored-by: daniel-lxs <[email protected]>
(cherry picked from commit 824d93c)

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation gateway Gateway runtime impact:ux-friction User-facing flow adds avoidable confusion or support burden without fully blocking progress. 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants