Always permissions for tools commands #1558
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
T) to the tool confirmation dialog, allowing users to permanently approve specific tools or commands for the sessionshell:cmd=ls*) that auto-approve the specific command while still requiring confirmation for other commandsapprove-toolconfirmation type via HTTP and ConnectRPC APIsDetails
When a tool requires confirmation, users now have 4 options:
Y- approve this call onceN- reject with optional reasonT- always allow this tool/command for the sessionA- approve all tools (YOLO mode)The
Toption intelligently builds permission patterns:shelltool runningls -la: addsshell:cmd=ls*to session permissionsread_file: adds the tool name directlyThese patterns leverage the existing permissions system and are persisted with the session.
API
The
/resumeendpoint now accepts a new confirmation type:{ "confirmation": "approve-tool", "tool_name": "shell:cmd=ls*" }