Conversation
…pattern The pattern was missing 17 tools listed in the official tools reference (https://code.claude.com/docs/en/tools-reference): AskUserQuestion, CronCreate, CronDelete, CronList, EndConversation, EnterPlanMode, ExitWorktree, ListAgents, ListMcpResourcesTool, PushNotification, ReadMcpResourceTool, RemoteTrigger, ReportFindings, ScheduleWakeup, SendMessage, SendUserFile, WaitForMcpServers. Permission rules naming these valid tools were flagged with "String does not match the pattern". Also extends the permissions-advanced test to cover the added names.
|
Thanks for the PR! This section of the codebase is owned by @domdomegg, @bogini, @sarahdeaton, and @ant-kurt - if they write a comment saying "LGTM" then it will be merged. |
|
@asgeirtj It is not accurate to add any of these tools in the Update |
|
@miteshashar There is actually one exception which is the EndConversation tool so adding it deny is truly no-op. https://code.claude.com/docs/en/tools-reference#endconversation-tool-behavior And yes splitting totally makes sense, since some are no-op in the allow direction. I set some deny permissions on some tools which I never use as it removes the tool input schema injection for it for the model, saving tokens. |
|
Following up since this thread is where it came from: the 18 missing tool names are in my v2.1.251 sync PR (#6273), credited to you. The |
What
Adds 17 tool names to the
permissionRulepattern inclaude-code-settings.jsonthat are documented in the official Claude Code tools reference but were missing from the pattern:AskUserQuestion,CronCreate,CronDelete,CronList,EndConversation,EnterPlanMode,ExitWorktree,ListAgents,ListMcpResourcesTool,PushNotification,ReadMcpResourceTool,RemoteTrigger,ReportFindings,ScheduleWakeup,SendMessage,SendUserFile,WaitForMcpServersWhy
Valid permission rules naming these tools (e.g.
"deny": ["EnterPlanMode", "CronCreate"]) are flagged in editors with:even though Claude Code accepts and enforces them. The asymmetry was confusing in practice:
ExitPlanModepassed while its siblingEnterPlanModewas flagged,EnterWorktreepassed whileExitWorktreewas flagged.Changes
Cd,KillShell,MultiEdit) are kept.src/test/claude-code-settings/permissions-advanced.jsondeny list to cover the added names.Validation
node cli.js checkpassesprettier --checkpasses on both filesTotallyFakeTool) is still rejected