anthropics / anthropics/claude-code-action

Git push failure

Open
#795 0 comments 3 reactions 0 assignees View on GitHub
area:permissions bug p2
Dominant language
TypeScript
Stars
8.9k
Forks
2.1k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

**Describe the bug**

I am using the action, pretty vanilla out the box, on top of a branch created via Claude Web.

**To Reproduce**

Tag claude in a PR.

**Expected behavior**

It is able to push. Instead:

```
"permission_denials": [
{
"tool_name": "Bash",
"tool_use_id": "toolu_011Ga56uTCWTCRKqV4pcBMXu",
"tool_input": {
"command": "grep -A 10 \"FAILED\" /home/runner/work/_temp/github-ci-logs/job-59679810526.log | head -50",
"description": "Search for failed test details in log"
}
},
{
"tool_name": "Bash",
"tool_use_id": "toolu_01FedwsVKHG7hAZtWpEyLiwa",
"tool_input": {
"command": "git push origin HEAD",
"description": "Push fixes to remote branch"
}
},
{
"tool_name": "Bash",
"tool_use_id": "toolu_017a1CjZ75pLUmfsPNMV5fbm",
"tool_input": {
"command": "git push origin cleanup-posthog-user-properties-pro-32",
"description": "Push test fixes to PR branch"
}
},
{
"tool_name": "Bash",
"tool_use_id": "toolu_01Mhf2ZBjkwJ1CAwpFVT2Z74",
"tool_input": {
"command": "git push",
"description": "Push committed changes to remote"
}
},
{
"tool_name": "Bash",
"tool_use_id": "toolu_01XcKZ58w5VXygUWMQABM7Ze",
"tool_input": {
"command": "git push",
"description": "Push test fixes to remote branch"
}
},
{
"tool_name": "Bash",
"tool_use_id": "toolu_01VK9e6WgBZzKDpyEyNEiYPG",
"tool_input": {
"command": "git push origin cleanup-posthog-user-properties-pro-32",
"description": "Push committed test fixes"
}
}
]
}
```

I can see this should be enabled witht he `Bash(git push:*)` tool.

```
env:
ALLOWED_TOOLS: Edit,MultiEdit,Glob,Grep,LS,Read,Write,mcp__github_comment__update_claude_comment,Bash(git add:*),Bash(git commit:*),Bash(git push:*),Bash(git status:*),Bash(git diff:*),Bash(git log:*),Bash(git rm:*)
DISALLOWED_TOOLS: WebSearch,WebFetch
```

**Screenshots**

N/A

**Workflow yml file**

```
name: Claude Code

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]

jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 1

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
```

**API Provider**

[X] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.