anthropics / anthropics/claude-code-action

Default config cannot create files when triggered from an Issue

未关闭
#54 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
p2
主要语言
TypeScript
星标
8.9k
派生
2.1k
平均合并
3 天 9 小时
30 天内合并 PR
10

描述

After setting up the action with default config from the command in `claude-code`, and commenting "@claude, please implement this" on a simple task asking Claude to write some caude, Claude fails with an error calling a tool:

```json
{
"type": "user",
"message": {
"role": "user",
"content": [
{
"type": "tool_result",
"content": "Claude requested permissions to use mcp__github__create_or_update_file, but you haven't granted it yet.",
"is_error": true,
"tool_use_id": "toolu_01SPMP9LasDEE2VYeS9KyG5R"
}
]
},
"session_id": "734d07ce-73f8-4b83-a614-a2bece48f631"
}
```

Claude summarizes the issue in its reply on the task thusly:

"Next Steps:
The workflow file has been created locally but needs to be committed. You can commit it manually or grant me file operation permissions to complete the commit."

The [docs](https://github.com/anthropics/claude-code-action?tab=readme-ov-file#inputs) say "allowed_tools | Additional tools for Claude to use (the base GitHub tools will always be included)" which suggests that it's expected for the tool to be already allowed.

The integration itself does have ` Read and write access to code, issues, and pull requests` permission.

Is this a bug or a mis-configuration?

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。