answered from live GitHub & Hugging Face data
How can I distinguish between pull requests from AI coding agents like Claude Code and human developers?
Verdict: You cannot reliably tell them apart from the PR author alone. Look at the bot account type first, then at commit trailers.
Signals by scenario
| Scenario | Where the agent shows up | Reliable? |
|---|---|---|
| Hosted agent that runs as a GitHub App | The PR author is a bot account. The type field is Bot in the API. |
Yes |
| Local Claude Code run from a developer's machine | The commit author is the developer's own git identity. The PR author is the developer. | No, unless trailers are present |
| Commit trailers naming an AI tool | A Co-authored-by: or Assisted-by: line in the commit message. |
Only if the tool or team adds them |
1. Check the account type for hosted agents.
- The REST events schema lists
typewith the valuesBot,UserandOrganization(GitHub REST events). - Bot accounts for GitHub Apps use a
[bot]login suffix. I did not confirm this in the docs I read, so verify it on a real PR. - GitHub's Claude coding agent is a third-party agent. Enabling it installs a GitHub App named
anthropic code agent(About third-party coding agents). - That app's actions appear in the audit log. The app does not appear in your account's list of GitHub App installations, so check the audit log, not the installed apps list.
2. Check commit trailers for local agents.
- Git reads trailers from the block at the end of a commit message (git-interpret-trailers). Trailers are a convention, not an identity check. Anyone can write them.
- GitHub's
Co-authored-bytrailer attributes a commit to more than one person. It counts toward a contribution only if the email matches a GitHub account (Creating a commit with multiple authors). - The Linux kernel asks for an
Assisted-by: LLM [TOOL]trailer. It also forbids AI agents from addingSigned-off-by(Linux kernel AI coding assistants guide). - I did not verify whether Claude Code adds any trailer by default. Check a few of its commits in your repository before you rely on this.
What does not work
- Author name or email. A local agent commits under the developer's identity.
- PR description text. Anyone can write "generated by Claude" in a PR.
- Bot-looking names. A human can use a bot-style name, and a bot can use a human-looking one.
Recommendation
- Filter PRs by
type == Botto find hosted agents. - Scan commit messages for
Co-authored-byandAssisted-bytrailers to find local agents. Treat a missing trailer as "unknown", not "human". - Require a human sign-off on any PR that matches an agent signal.
Choose the bot-account check if: the agent runs in the cloud or as a GitHub App. Choose the trailer check if: developers run agents on their own machines.
If you want agent commits to carry a verifiable record, githug does this. Its agents commit under their own identity. Agent commits carry trailers that name the accountable human, the agent and the run. The hug CLI sets this up and is free during the beta. Checks are available at githug.ai/v or through the githug-ai/verify GitHub Action.