-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Security] ACP protocol lacks session-level tool permission primitives that --headless provided #1607
Copy link
Copy link
Open
Labels
area:authenticationLogin, OAuth, device auth, token management, and keychain integrationLogin, OAuth, device auth, token management, and keychain integrationarea:non-interactiveNon-interactive mode (-p), CI/CD, ACP protocol, and headless automationNon-interactive mode (-p), CI/CD, ACP protocol, and headless automationarea:permissionsTool approval, security boundaries, sandbox mode, and directory restrictionsTool approval, security boundaries, sandbox mode, and directory restrictionsarea:sessionsSession management, resume, history, session picker, and session stateSession management, resume, history, session picker, and session state
Metadata
Metadata
Assignees
Labels
area:authenticationLogin, OAuth, device auth, token management, and keychain integrationLogin, OAuth, device auth, token management, and keychain integrationarea:non-interactiveNon-interactive mode (-p), CI/CD, ACP protocol, and headless automationNon-interactive mode (-p), CI/CD, ACP protocol, and headless automationarea:permissionsTool approval, security boundaries, sandbox mode, and directory restrictionsTool approval, security boundaries, sandbox mode, and directory restrictionsarea:sessionsSession management, resume, history, session picker, and session stateSession management, resume, history, session picker, and session state
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
The
--headlessprotocol allowed clients to declare tool permissions at session creation via CLI flags:--yolo,--allowed-tools,--allow-all-tools. These flags established a security boundary before the agent executed its first action. The agent could not escalate beyond what the client authorized at spawn time.The ACP protocol (
--acp) has no equivalent mechanism. There is no way to declare tool permissions at session creation. Thesession/newandinitializeRPC methods accept no permission parameters. This is a security regression.What --headless provided
The permission model was:
What ACP provides
No
--allowed-tools. No--yolo. No--allow-all-tools. Thesession/newRPC method acceptsmodel,previousSessionId, andsystemPrompt— no permission fields.Tool permission handling in ACP is broken in multiple ways:
session/neware silently ignored (Title: ACP agent ignores custom JSON‑RPC methods and only exposes internal tool list #1574)Why this matters
Every ACP client must now implement its own permission enforcement — or ship without one. The old model pushed this responsibility to the CLI, where it could be enforced consistently across all clients. The new model distributes it to every adopter, and if any one of them gets it wrong (or skips it), the agent runs unconstrained.
This is especially concerning for:
Expected behavior
ACP should support session-level permission declaration equivalent to what
--headlessprovided. At minimum:session/newshould accept anallowedToolsparameter that restricts the agent's tool access for the entire sessionpermissionModefield (equivalent to--yolo/ default / restricted) that the CLI enforces server-sidePermissions declared at session creation are a security boundary. Mid-session negotiation is a footgun.
Related
--headlessremoved without deprecation (the protocol that had these primitives)