-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Feature]: Carry gateway client capabilities through the CLI/bundle-MCP backend #102577
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm 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: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.enhancementNew feature or requestNew feature or requestimpact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm 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: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.enhancementNew feature or requestNew feature or requestimpact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.User-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Summary
Thread gateway client capabilities through the CLI/bundle-MCP loopback backend so capability-gated tools (e.g.
show_widget, gated oninline-widgets) work when a Control UI conversation runs on a CLI-backed model backend.Problem to solve
Capability-gated tool availability lands with the inline web-widget work: the originating gateway client declares capabilities at connect,
chat.sendstamps them into the run context, and tool assembly filters tools whoserequiredClientCapsthe client did not declare. The embedded runner and the Codex app-server backend transport these caps end to end. The CLI-backed backend path does not:RunCliAgentParams, the MCP loopback environment/request scope, andMcpLoopbackScopeParamscarry no capability field, soresolveGatewayScopedTools()assembles tools with no caps and capability-gated tools are dropped (fail closed). A Control UI user on a CLI-backed model therefore cannot useshow_widgeteven though their client advertisesinline-widgets.Proposed solution
Propagate the originating client capabilities through the CLI run parameters and the MCP loopback request/scope contract (including any loopback scope caching, which must key on the caps or resolve them per request), then let the existing
filterToolsByClientCapsgate apply unchanged. Tests: loopback scope carries caps; a CLI-backed run from a caps-declaring client assembles the gated tool; channel-originated CLI runs still exclude it.Impact
Evidence/examples
filterToolsByClientCapsinsrc/agents/openclaw-tools.ts; assembly entrysrc/gateway/tool-resolution.ts.GatewayClientCapson the message context → run params) and Codex app-server (extensions/codex/src/app-server/dynamic-tool-build.ts).docs/tools/show-widget.md.