-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: parse ALL --allowed-tools flags, not just the first one #801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: parse ALL --allowed-tools flags, not just the first one #801
Conversation
The parseAllowedTools() function previously used .match() which only returns the first match. This caused tools specified in subsequent --allowed-tools flags to be ignored during MCP server initialization. Changes: - Add /g flag to regex patterns for global matching - Use matchAll() to find all occurrences - Deduplicate tools while preserving order - Make unquoted pattern not match quoted values Fixes anthropics#800 #vibe Co-authored-by: Claude <noreply@anthropic.com>
|
@AlexanderBartash after this v1.0.30 our workflow is now failing. here is the workflow: we are getting below error: |
|
@sachinmahale Comments are not allowed in the |
|
@AlexanderBartash I tried removing complete claude_args: block, still its not working. |
|
@sachinmahale The changes in PR #801 only affect the parsing of |
|
@sachinmahale E.g. |
|
@AlexanderBartash our workflow was working fine till 16th Jan. but after the release v1.0.30 it started failing. |
|
@sachinmahale Between 30 and 28 there is also 29 :) I cannot really help you because I do not see your workflow logs, nor your full workflow. I already provided feedback based on what you gave me. |
|
@sachinmahale Please read my messages properly. I am not sure that you can remove |
I am not sure what you mean here. I never said anything about it. |
|
@AlexanderBartash I'm sharing the workflow here. I can see the problem with |
|
@sachinmahale Does it work if you specify |
|
@AlexanderBartash I tried but it doesn't work. |
|
@sachinmahale Have you tried .29? Knowing if it works or not would narrow it down a bit. |
Summary
Fixes #800
The
parseAllowedTools()function previously used.match()which only returns the first match. This caused tools specified in subsequent--allowed-toolsflags to be ignored during MCP server initialization.Changes
/gflag to regex patterns for global matchingmatchAll()to find all occurrencesRoot Cause
When users specify multiple
--allowed-toolsflags:Only tools from the first flag were parsed. This broke MCP server initialization when
mcp__github_*tools weren't in the first flag.Test plan
--allowed-toolsflags