-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Grep tool fails with EACCES on vendored ripgrep after bun install --production #1140
Description
Describe the bug
When using claude-code-action@v1, the action’s internal setup appears to install @anthropic-ai/claude-agent-sdk via Bun. In that setup path, the vendored ripgrep binary ends up non-executable on the runner, causing Grep tool calls to fail with EACCES:
EACCES: permission denied, posix_spawn '/home/runner/work/_actions/anthropics/claude-code-action/v1/node_modules/@anthropic-ai/claude-agent-sdk/vendor/ripgrep/x64-linux/rg'
This is especially disruptive in workflows that allow Grep but restrict Bash to a narrow set of scoped commands, because the run may then try shell grep fallbacks that are not permitted.
To Reproduce
Steps to reproduce the behavior:
- Run
claude-code-action@v1on a GitHub-hostedubuntu-24.04runner. - Configure
--allowedToolsto allowGrepbut restrictBashto scoped commands only. - Trigger a task that causes Claude to use the
Greptool. - Observe that the action’s internal setup uses Bun and installs
@anthropic-ai/claude-agent-sdk. - See
Grepfail withEACCESwhen spawning the vendoredrgbinary.
Expected behavior
The vendored ripgrep binary should be executable after bun install --production, and the Grep tool should work normally without falling back to blocked shell commands.
Screenshots
Not applicable.
Workflow yml file
The relevant setup is:
oven-sh/setup-bunbun install --production--allowedToolsincludesRead,Grep, andGlobBashis restricted to scoped commands such asBash(git diff:*),Bash(git log:*),Bash(git show:*),Bash(gh pr view:*), etc.
API Provider
[ ] Anthropic First-Party API (default)
[x] AWS Bedrock
[ ] GCP Vertex
Additional context
Environment from the failing run:
- Runner:
GitHub-hosted ubuntu-24.04 - Action version:
claude-code-action@v1 - Action SHA:
bee87b3258c251f9279e5371b0cc3660f37f3f77 @anthropic-ai/claude-agent-sdk:0.2.89- Bun:
1.3.6+d530ed993
The run log shows:
oven-sh/setup-bunexecutedbun install --productioninstalled@anthropic-ai/claude-agent-sdk@0.2.89- subsequent
Greptool calls failed repeatedly withEACCESon the vendoredrgbinary - later in the run, shell
grepcommands were attempted instead, which is problematic in restricted-tool workflows
Possible workaround / mitigation:
find "${GITHUB_ACTION_PATH}/node_modules/@anthropic-ai/claude-agent-sdk/vendor/ripgrep" -name "rg" -type f -exec chmod +x {} \;