openclaw - ✅(Solved) Fix BUG: gateway config.patch blocks documented subagent thinking default path [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#75764Fetched 2026-05-02 05:30:34
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
2
Author
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

The gateway config tool rejects changes to the documented agents.defaults.subagents.thinking path even though the schema exposes it and the subagents documentation says it can be used to set default subagent thinking. The hard-coded gateway mutation allowlist includes agents.defaults.thinkingDefault and agents.list[].thinkingDefault, but not agents.defaults.subagents.thinking, so config.patch fails before applying the documented setting.

Error Message

Evidence from installed docs/source and live tool behavior:

  • docs/tools/subagents.md documents: "Thinking: inherits the caller unless you set agents.defaults.subagents.thinking ..."
  • config.schema.lookup for agents.defaults.subagents.thinking returns { "type": "string" }.
  • Installed gateway-tool source in 2026.4.29 has a hard-coded mutation allowlist containing agents.defaults.thinkingDefault and agents.list[].thinkingDefault, but not agents.defaults.subagents.thinking.
  • The enforcement code rejects changed paths outside that allowlist with gateway config.patch cannot change protected config paths: ....
  • Live repro error: gateway config.patch cannot change protected config paths: agents.defaults.subagents.thinking.

Root Cause

The gateway config tool rejects changes to the documented agents.defaults.subagents.thinking path even though the schema exposes it and the subagents documentation says it can be used to set default subagent thinking. The hard-coded gateway mutation allowlist includes agents.defaults.thinkingDefault and agents.list[].thinkingDefault, but not agents.defaults.subagents.thinking, so config.patch fails before applying the documented setting.

Fix Action

Fix / Workaround

The gateway config tool rejects changes to the documented agents.defaults.subagents.thinking path even though the schema exposes it and the subagents documentation says it can be used to set default subagent thinking. The hard-coded gateway mutation allowlist includes agents.defaults.thinkingDefault and agents.list[].thinkingDefault, but not agents.defaults.subagents.thinking, so config.patch fails before applying the documented setting.

  1. Use OpenClaw 2026.4.29.
  2. Confirm the documented path exists: gateway config.schema.lookup for agents.defaults.subagents.thinking returns a string schema.
  3. Attempt to patch the documented setting: gateway config.patch with { "agents": { "defaults": { "subagents": { "thinking": "medium" } } } }.
  4. Observe that the patch is rejected before applying.

config.patch should allow updating agents.defaults.subagents.thinking, or the documentation/schema should not present that path as a supported configurable default.

PR fix notes

PR #75802: fix: allow subagent thinking config patch

Description (problem / solution / changelog)

Summary

  • allow config.patch for documented subagent thinking defaults at agents.defaults.subagents.thinking and agents.list[].subagents.thinking
  • keep the existing isAllowedGatewayConfigPath matching behavior unchanged
  • add guard coverage for allowed thinking edits and neighboring protected subagent policy fields
  • add the required Unreleased Fixes changelog entry

Test plan

  • git diff --check
  • rg -n "subagent thinking|subagents\\.thinking|75764|75802" CHANGELOG.md
  • pnpm test src/agents/tools/gateway-tool-guard-coverage.test.ts
  • pnpm exec oxfmt --check --threads=1 src/agents/tools/gateway-tool.ts src/agents/tools/gateway-tool-guard-coverage.test.ts

Fixes #75764

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • src/agents/tools/gateway-tool-guard-coverage.test.ts (modified, +73/-0)
  • src/agents/tools/gateway-tool.ts (modified, +2/-0)

Code Example

Evidence from installed docs/source and live tool behavior:

- `docs/tools/subagents.md` documents: "Thinking: inherits the caller unless you set `agents.defaults.subagents.thinking` ..."
- `config.schema.lookup` for `agents.defaults.subagents.thinking` returns `{ "type": "string" }`.
- Installed gateway-tool source in 2026.4.29 has a hard-coded mutation allowlist containing `agents.defaults.thinkingDefault` and `agents.list[].thinkingDefault`, but not `agents.defaults.subagents.thinking`.
- The enforcement code rejects changed paths outside that allowlist with `gateway config.patch cannot change protected config paths: ...`.
- Live repro error: `gateway config.patch cannot change protected config paths: agents.defaults.subagents.thinking`.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

The gateway config tool rejects changes to the documented agents.defaults.subagents.thinking path even though the schema exposes it and the subagents documentation says it can be used to set default subagent thinking. The hard-coded gateway mutation allowlist includes agents.defaults.thinkingDefault and agents.list[].thinkingDefault, but not agents.defaults.subagents.thinking, so config.patch fails before applying the documented setting.

Steps to reproduce

  1. Use OpenClaw 2026.4.29.
  2. Confirm the documented path exists: gateway config.schema.lookup for agents.defaults.subagents.thinking returns a string schema.
  3. Attempt to patch the documented setting: gateway config.patch with { "agents": { "defaults": { "subagents": { "thinking": "medium" } } } }.
  4. Observe that the patch is rejected before applying.

Expected behavior

config.patch should allow updating agents.defaults.subagents.thinking, or the documentation/schema should not present that path as a supported configurable default.

Actual behavior

config.patch rejects the documented path with: gateway config.patch cannot change protected config paths: agents.defaults.subagents.thinking.

OpenClaw version

OpenClaw 2026.4.29 (a448042)

Operating system

Ubuntu 26.04 LTS

Install method

pnpm

Model

Not provider-specific; reproduced while using a GPT-5.5 default model configuration.

Provider / routing chain

Not provider-specific. This occurs in the gateway config tool before model/provider routing.

Additional provider/model setup details

N/A

Logs, screenshots, and evidence

Evidence from installed docs/source and live tool behavior:

- `docs/tools/subagents.md` documents: "Thinking: inherits the caller unless you set `agents.defaults.subagents.thinking` ..."
- `config.schema.lookup` for `agents.defaults.subagents.thinking` returns `{ "type": "string" }`.
- Installed gateway-tool source in 2026.4.29 has a hard-coded mutation allowlist containing `agents.defaults.thinkingDefault` and `agents.list[].thinkingDefault`, but not `agents.defaults.subagents.thinking`.
- The enforcement code rejects changed paths outside that allowlist with `gateway config.patch cannot change protected config paths: ...`.
- Live repro error: `gateway config.patch cannot change protected config paths: agents.defaults.subagents.thinking`.

Impact and severity

Low to moderate. Runtime does not crash, but users cannot use the first-class safe config mutation tool to change a documented subagent thinking default. The workaround is to avoid the documented path, set per-agent/global thinkingDefault where applicable, pass explicit thinking on spawn, or manually edit config outside the safe gateway tool, which is undesirable.

Additional information

This appears to be a mismatch between documented/schema-supported config and the gateway config mutation allowlist. A likely fix is to add the documented subagent thinking default paths, such as agents.defaults.subagents.thinking and possibly agents.list[].subagents.thinking, to the allowlist if they are intended to be mutable through config.patch.

extent analysis

TL;DR

The most likely fix is to add the documented subagent thinking default paths to the gateway config mutation allowlist.

Guidance

  • Review the gateway config mutation allowlist to confirm that agents.defaults.subagents.thinking is not included.
  • Add agents.defaults.subagents.thinking to the allowlist if it is intended to be mutable through config.patch.
  • Consider adding agents.list[].subagents.thinking to the allowlist for consistency.
  • Verify that the updated allowlist resolves the issue by attempting to patch the documented setting again.

Example

No code snippet is provided as the issue is related to configuration and not code.

Notes

The issue appears to be a mismatch between the documented configuration and the actual allowlist. Adding the documented paths to the allowlist should resolve the issue, but it is essential to verify that this change does not introduce any unintended consequences.

Recommendation

Apply workaround: Add the documented subagent thinking default paths to the gateway config mutation allowlist, as this is a targeted fix that addresses the specific issue without introducing significant changes.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

config.patch should allow updating agents.defaults.subagents.thinking, or the documentation/schema should not present that path as a supported configurable default.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix BUG: gateway config.patch blocks documented subagent thinking default path [1 pull requests, 1 comments, 2 participants]