Fix: claude-code-action tool permissions in agent_fix-obi workflow#2549
Merged
Fix: claude-code-action tool permissions in agent_fix-obi workflow#2549
Conversation
The --allowedTools parameter in claude_args does not support Bash(X) pattern matching when passed through the SDK, causing all Bash calls to be denied. Move tool permissions to the settings input where Claude Code's own permission system properly supports Bash(X) patterns. Also add mcp__github_file_ops MCP server permissions for commit signing. Fixes failed workflow run on PR #2548 (error_max_turns after 31 turns with all Bash calls denied). Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
mariomac
approved these changes
Feb 24, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2549 +/- ##
=======================================
Coverage 48.68% 48.68%
=======================================
Files 53 53
Lines 4028 4028
=======================================
Hits 1961 1961
Misses 1933 1933
Partials 134 134
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The agent_fix-obi workflow (used to auto-fix OBI submodule CI failures) was failing on PR #2548 because all Bash tool calls were being denied. The agent hit the 30-turn limit (error_max_turns) without making any progress.
Root Cause
Tool permissions were configured via
--allowedToolsin claude_args, but the Claude Code SDK's allowedTools parameter does not support Bash(X) pattern matching (e.g.,Bash(gh),Bash(go)). The patterns were parsed into the SDK array but failed at runtime, causing all Bash calls to be rejected.Solution
Moved tool permissions to the
settingsinput where Claude Code's own permission system properly supports Bash(X) pattern matching. Also added mcp__github_file_ops MCP server permissions required for commit signing.Testing
This fix enables the workflow to properly grant Bash tool access when triggered on future OBI submodule update PRs.