Repository navigation
Conversation
…ushes
is_agent_commit matches a commit only when its committer email is listed in
agent_emails, whose default is noreply@anthropic.com. That is the address
Claude Code writes locally, but it is not what claude-code-action pushes as.
On the default path, use_commit_signing false, git-config.ts sets
user.email to "${botId}+${botName}@users.noreply.github.com", so the commit
lands as 41898282+claude[bot]@users.noreply.github.com, and claude[bot]
commits in the wild carry 209825114+claude[bot]@… .
Neither matches, and the login checks do not help: the action never opens
the PR, it hands the human a compare/?quick_pull=1 link, so the author is a
human and is_pr_created_by_agent is False. The gate posts
"success: No agent activity" on a PR made entirely of agent commits.
human-opened PR of claude[bot] commits -> has_agent_activity: False
A GitHub noreply committer address names its login, and agent_logins already
lists the agents, so match on that too. The id is not worth matching on,
since bot_id is a configurable input.
41898282+claude[bot]@users.noreply.github.com -> True
209825114+claude[bot]@users.noreply.github.com -> True
1234+claude-code[bot]@users.noreply.github.com -> True
noreply@anthropic.com -> True
555+alice@users.noreply.github.com -> False
alice@example.com -> False
use_commit_signing: true still gets past this. GitHub stamps those commits
with committer noreply@github.com, which every web-UI commit also carries,
so it cannot go in a list. Catching it needs committer { user { login } } in
the GraphQL commit selection.
This branch has not been deployed
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.
What is wrong
agent-approval-checkgates a PR on human approvals once it sees agent activity. It cannot see the commits claude-code-action itself pushes, so on the default path it postssuccess: No agent activityand the gate never engages.is_agent_commitmatches only the committer email againstagent_emails, whose default isnoreply@anthropic.com:noreply@anthropic.comis real, it is what Claude Code writes locally, but it is not what this action pushes as. Withuse_commit_signingat its default offalse,src/github/operations/git-config.ts:42runswith
bot_id: "41898282"andbot_name: "claude[bot]"fromaction.yml, so the commit carries41898282+claude[bot]@users.noreply.github.com. Realclaude[bot]commits on GitHub carry209825114+claude[bot]@users.noreply.hub.lumenfield.work.The login checks do not cover it either. The action never opens a PR:
src/create-prompt/index.ts:604hands the human acompare/...?quick_pull=1link to click, and there is nopulls.createanywhere insrc/. So the PR author is a human andis_pr_created_by_agentisFalse, and the committer login is not in the GraphQL commit selection at all.Running the real module against the real addresses:
What this changes
A GitHub noreply committer address is
<id>+<login>@users.noreply.github.com, and it names the login. The id is not worth matching on, sincebot_idis a configurable input and the App's own id differs from the default, but the login is stable andagent_loginsalready lists the agents. So a commit also counts when its committer address is a GitHub noreply address whose login is inagent_logins.get_detection_reasonhad an assert that the email is inagent_emails, which would now fire, so it reports which rule matched instead. The three places that document the input say what the login match covers.What this does not fix
use_commit_signing: truestill gets through. Those commits go to/git/commitswith no committer (src/mcp/github-file-ops-server.ts:344), so GitHub stampsnoreply@github.com, which every commit made through the web UI also carries. It cannot go in an allowlist without waving through humans. Catching that one needscommitter { user { login } }added toGRAPHQL_PR_QUERYand carried through the normalizer. Happy to do it in this PR if you want it here rather than separately.Test Plan
There is no test harness for
agent_approval_check.pyin the repo, so I drove the module directly: loaded it withimportlib, built anAgentConfigwith the shipped defaults, and ranis_agent_commit,get_detection_reasonandcheck_for_agent_activityover the seven addresses above. The table is that run, before and after. The twoclaude[bot]addresses are not invented, they come fromsearch/commits?q=author:claude[bot]on live repos.python3 -m py_compileclean,prettier --checkclean on the README, the action metadata and the example YAML, andbun test test/action-metadata.test.tspasses.If you would like a
tests/file for this action I am happy to add one, but it would be the first, so I did not assume the layout.