-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Add owner-approved flow for protected config changes #77886
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Problem
OpenClaw currently has a hard boundary around some protected config paths when changes are initiated from inside an agent session. That boundary is good in spirit: an agent should not be able to silently or autonomously grant itself more authority.
But the current implementation creates a sovereignty problem for owner-operated deployments: even when the human owner explicitly asks and confirms in chat, the agent has no valid approval path for protected changes such as enabling the
/mcpcommand or registering an MCP server. The only available outcomes are:openclaw.json, which normalizes exactly the wrong precedent.That is the wrong tradeoff. The system should preserve the guardrail while giving the owner a first-class, auditable approval path.
Concrete example
Goal: register a locally installed MCP server after auditing/smoke-testing it.
The owner tried to run:
OpenClaw replied:
The agent inspected the schema and confirmed:
Then the agent attempted the sanctioned config path:
{"commands":{"mcp":true}}Gateway refused:
This left no legitimate agent-mediated owner approval flow. The owner explicitly authorized the change, but OpenClaw still forced the choice between human manual editing and agent-side bypass.
Why this matters
This is not a request to let agents freely self-escalate.
It is the opposite: owner-approved escalation should be explicit, structured, logged, and harder to confuse with autonomous agent behavior.
Right now, the hard block makes the safe path unavailable. A capable owner can still edit the file directly, but then OpenClaw loses the chance to:
For local-first/open-source deployments, sovereignty means the owner can authorize changes to their own machine without teaching the agent to step around the runtime boundary.
Current implementation clue
The gateway tool appears to allow only a small allowlist of config paths for agent-side mutation and rejects others as protected.
Observed in the installed build:
And:
That hard error is the core UX/security problem: it treats all protected edits as impossible from the agent path, even with live owner confirmation.
Proposed fix: owner-approved protected config changes
Add a first-class approval flow for protected config mutations instead of hard-failing immediately.
Suggested behavior:
gateway config.patchor a new action such asgateway config.propose.commands.mcpSpecific MCP handling
For MCP-related paths, add extra review fields:
Example approvals that should be possible:
{"commands":{"mcp":true}}and later:
{ "mcp": { "servers": { "agentic-aqua": { "command": "/Users/senemaro/.local/bin/aqua-mcp", "args": [] } } } }Safety requirements
This should not become a blanket escape hatch.
Recommended constraints:
Why this is better than the current state
The current state is neither fully safe nor sovereign:
A protected-edit approval flow would make the safe thing also the easy thing.
Acceptance criteria
openclaw.jsonedits when owner approval is present.