openclaw - 💡(How to fix) Fix config set `<nested>.<field>` fails with sibling `source: Invalid input` (cross-field re-validation drops required fields) [4 comments, 3 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#70318Fetched 2026-04-23 07:26:24
View on GitHub
Comments
4
Participants
3
Timeline
6
Reactions
0
Author
Timeline (top)
commented ×4closed ×1cross-referenced ×1

openclaw config set <nested.path>.<field> <value> fails with schema validation error citing a sibling field (source) as Invalid input, even though that sibling is unmodified and its current value is valid. The command re-validates the whole nested object and appears to drop required fields during the partial update.

Error Message

given an existing plugin install record:

$ jq '.plugins.installs["openclaw-web-search"]' ~/.openclaw/openclaw.json { "installPath": "/Users/.../extensions/openclaw-web-search", "source": "npm", "spec": "@ollama/openclaw-web-search", "version": "0.2.2", "resolvedName": "@ollama/openclaw-web-search", "resolvedVersion": "0.2.2", "resolvedSpec": "@ollama/[email protected]", "integrity": "sha512-...", "shasum": "...", "resolvedAt": "2026-04-22T10:33:58.083Z", "installedAt": "2026-04-22T10:33:58.240Z" }

canonical subpath update to pin the spec:

$ openclaw config set 'plugins.installs["openclaw-web-search"].spec'
'"@ollama/[email protected]"' --strict-json --dry-run Error: Dry run failed: config schema validation failed.

    • plugins.installs."openclaw-web-search".source: Invalid input (allowed: "npm", "archive", "path", "clawhub", "marketplace")

Root Cause

openclaw config set <nested.path>.<field> <value> fails with schema validation error citing a sibling field (source) as Invalid input, even though that sibling is unmodified and its current value is valid. The command re-validates the whole nested object and appears to drop required fields during the partial update.

Fix Action

Fix / Workaround

Workaround (canonical)

config.patch RPC with JSON merge-patch semantics works correctly:

HASH=$(openclaw gateway call config.get --params '{}' 2>&1 \
  | sed -n '/^{/,$p' | jq -r '.hash')
openclaw gateway call config.patch --params "$(jq -n --arg hash "$HASH" '{
  raw: "{ plugins: { installs: { \"openclaw-web-search\": { spec: \"@ollama/[email protected]\" } } } }",
  baseHash: $hash
}')"
# => { "ok": true, ... }

Code Example

# given an existing plugin install record:
$ jq '.plugins.installs["openclaw-web-search"]' ~/.openclaw/openclaw.json
{
  "installPath": "/Users/.../extensions/openclaw-web-search",
  "source": "npm",
  "spec": "@ollama/openclaw-web-search",
  "version": "0.2.2",
  "resolvedName": "@ollama/openclaw-web-search",
  "resolvedVersion": "0.2.2",
  "resolvedSpec": "@ollama/[email protected]",
  "integrity": "sha512-...",
  "shasum": "...",
  "resolvedAt": "2026-04-22T10:33:58.083Z",
  "installedAt": "2026-04-22T10:33:58.240Z"
}

# canonical subpath update to pin the spec:
$ openclaw config set 'plugins.installs["openclaw-web-search"].spec' \
    '"@ollama/[email protected]"' --strict-json --dry-run
Error: Dry run failed: config schema validation failed.
- - plugins.installs."openclaw-web-search".source: Invalid input
    (allowed: "npm", "archive", "path", "clawhub", "marketplace")

---

HASH=$(openclaw gateway call config.get --params '{}' 2>&1 \
  | sed -n '/^{/,$p' | jq -r '.hash')
openclaw gateway call config.patch --params "$(jq -n --arg hash "$HASH" '{
  raw: "{ plugins: { installs: { \"openclaw-web-search\": { spec: \"@ollama/[email protected]\" } } } }",
  baseHash: $hash
}')"
# => { "ok": true, ... }
RAW_BUFFERClick to expand / collapse

Summary

openclaw config set <nested.path>.<field> <value> fails with schema validation error citing a sibling field (source) as Invalid input, even though that sibling is unmodified and its current value is valid. The command re-validates the whole nested object and appears to drop required fields during the partial update.

Minimal reproduction

# given an existing plugin install record:
$ jq '.plugins.installs["openclaw-web-search"]' ~/.openclaw/openclaw.json
{
  "installPath": "/Users/.../extensions/openclaw-web-search",
  "source": "npm",
  "spec": "@ollama/openclaw-web-search",
  "version": "0.2.2",
  "resolvedName": "@ollama/openclaw-web-search",
  "resolvedVersion": "0.2.2",
  "resolvedSpec": "@ollama/[email protected]",
  "integrity": "sha512-...",
  "shasum": "...",
  "resolvedAt": "2026-04-22T10:33:58.083Z",
  "installedAt": "2026-04-22T10:33:58.240Z"
}

# canonical subpath update to pin the spec:
$ openclaw config set 'plugins.installs["openclaw-web-search"].spec' \
    '"@ollama/[email protected]"' --strict-json --dry-run
Error: Dry run failed: config schema validation failed.
- - plugins.installs."openclaw-web-search".source: Invalid input
    (allowed: "npm", "archive", "path", "clawhub", "marketplace")

source is currently "npm" (one of the allowed values), yet the setter reports it as invalid. Same error with or without --strict-json, and the --batch-file / --batch-json forms fail identically with the same message.

Expected

The subpath set should preserve the sibling fields and validate the merged object, not complain about untouched fields that hold valid values.

Actual

Validator reports source: Invalid input for a field that is set to an allowed enum value — suggests the partial update drops source before validating.

Workaround (canonical)

config.patch RPC with JSON merge-patch semantics works correctly:

HASH=$(openclaw gateway call config.get --params '{}' 2>&1 \
  | sed -n '/^{/,$p' | jq -r '.hash')
openclaw gateway call config.patch --params "$(jq -n --arg hash "$HASH" '{
  raw: "{ plugins: { installs: { \"openclaw-web-search\": { spec: \"@ollama/[email protected]\" } } } }",
  baseHash: $hash
}')"
# => { "ok": true, ... }

The config set CLI should presumably do the same thing internally for subpath updates.

Environment

  • OpenClaw: 2026.4.21 (f788c88)
  • Node: v25.6.1
  • macOS: Darwin 25.4.0 (15.4 / 26.4.1)
  • Install: Homebrew (/opt/homebrew/bin/openclaw)

Impact

Any tooling that tries to surgically update a pinned spec or other nested install metadata falls back to raw jq edits, bypassing schema validation and the openclaw config set audit trail. openclaw security audit flags the unpinned spec as a WARN (supply-chain stability), pushing users to attempt exactly this update.

Happy to contribute a fix if maintainers can point at where subpath sets are built (guess: config set parses the path, reads the parent, assigns the leaf, but the intermediate value it re-validates was mutated to drop required fields before the validator saw it).

extent analysis

TL;DR

The openclaw config set command should be modified to preserve sibling fields during partial updates, similar to the config.patch RPC with JSON merge-patch semantics.

Guidance

  • The issue is likely caused by the config set command dropping required fields during partial updates, resulting in schema validation errors for untouched fields.
  • To verify, compare the behavior of config set with config.patch RPC, which correctly preserves sibling fields.
  • A potential workaround is to use the config.patch RPC with JSON merge-patch semantics, as shown in the provided example.
  • To mitigate the issue, the config set command should be updated to internally use the same logic as config.patch for subpath updates.

Example

# Using config.patch RPC as a workaround
HASH=$(openclaw gateway call config.get --params '{}' 2>&1 \
  | sed -n '/^{/,$p' | jq -r '.hash')
openclaw gateway call config.patch --params "$(jq -n --arg hash "$HASH" '{
  raw: "{ plugins: { installs: { \"openclaw-web-search\": { spec: \"@ollama/[email protected]\" } } } }",
  baseHash: $hash
}')"

Notes

  • The issue is specific to the openclaw config set command and does not affect the config.patch RPC.
  • The provided workaround using config.patch RPC assumes that the config.get and config.patch endpoints are available and functional.

Recommendation

Apply workaround: Use the config.patch RPC with JSON merge-patch semantics as a temporary solution until the config set command is updated to preserve sibling fields during partial updates.

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…

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 - 💡(How to fix) Fix config set `<nested>.<field>` fails with sibling `source: Invalid input` (cross-field re-validation drops required fields) [4 comments, 3 participants]