-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
CLI gateway calls can poison local device scopes after read probes #95997
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.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:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.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.maintainerMaintainer-authored PRMaintainer-authored PR
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.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:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.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.maintainerMaintainer-authored PRMaintainer-authored PR
Type
Fields
Priority
None yet
Summary
Local CLI Gateway calls can leave the CLI paired device/token at a read-only scope after a read probe, then reject the next write-scoped CLI agent call with
scope upgrade pending approval.This is a stable-release blocker unless we decide the affected local state is intentionally expected, because the embedded fallback can hide the failure while the primary Gateway agent path is blocked.
Affected Surface
gateway healthor other read-scoped probes followed byagentor another write-scoped call.2026.6.10beta release smoke, but the failing path is present on currentmain.Steps to Reproduce
gateway healthwith the shared token.Expected
Local CLI shared-token/password calls should not persist or reuse a durable read-scoped paired-device baseline that blocks later local CLI write/admin calls.
The security rule still needs to hold: an already-paired device reconnecting with a device identity must not silently widen scopes. Remote CLI/device-token paths should keep requiring explicit scope-upgrade approval.
Actual
The read probe can persist or reuse the CLI paired device at
operator.read. A later agent run needsoperator.write, so the server treats it as a paired-device scope upgrade and rejects the primary Gateway path.Redacted audit shape:
Observed client close:
Root Cause
healthmaps tooperator.read;agentmaps tooperator.write.Provenance
81ebc7e0344fd19c85778e883bad45e2da972229/ PR fix(gateway): block silent reconnect scope-upgrade escalation #54694 to block silent reconnect escalation.d3d8e316bd819d3c7e34253aeb7eccb2510f5f48/ PR gateway: require pairing for backend scope upgrades #55286.69fe999373fd8cd99def18c9796d4fc769b46202/ PR fix(pairing): restore qr bootstrap onboarding handoff #58382.b1117d98622f0bf93aba4380e3a4337e56f5add5/ PR refactor: extract gateway client package #87797.65b460f2345a135f22df7631598643002605aad6/ PR fix(nodes): surface pending reapproval diagnostics #92547.The broken behavior is the interaction between those pieces, not the scope-upgrade guard itself.
Fix Shape