Repository navigation
Description
Describe the feature or problem you’d like to solve
AI coding agents increasingly use gh to create issue and pull-request comments while authenticated as a human user. These comments currently look entirely human-authored because GitHub displays only the authenticated user.
GitHub should distinguish authorship from assistance. The user remains the author and responsible party, while the agent that helped prepare the comment should be shown next to the username.
For example:
@octocat · Assisted by Codex
Comment text…
This would make agent involvement visible without adding repetitive attribution text to every comment body.
This is related to #12522, which explores making gh a better interface for agents.
Proposed solution
When creating a comment, gh should detect common agent environment variables and send structured assistance metadata to GitHub.
For example:
gh issue comment 123 --body-file response.mdWhen invoked inside a recognized agent environment, gh could attach metadata resembling:
{
"assisted_by": {
"name": "Codex"
}
}GitHub would then:
- Display “Assisted by Codex” next to the comment author.
- Expose the attribution through REST and GraphQL APIs.
- Preserve it when the comment is edited.
- Include it in issue, pull-request, review, and discussion comments.
- Keep the authenticated user as the comment’s author and responsible party.
gh could maintain a registry of well-known signals, such as the environment variables set by Codex, Claude Code, Copilot CLI, and other agents. Detection should use only the presence or documented value of these signals and should not transmit unrelated environment data.
The CLI should also support explicit control:
# Override or provide attribution
gh issue comment 123 --assisted-by "Codex" --body-file response.md
# Suppress automatically detected attribution
gh issue comment 123 --no-assisted-by --body-file response.mdAn environment variable could support agents that are not yet recognized:
GH_ASSISTED_BY="My Agent" gh issue comment 123 --body-file response.mdSuggested behavior:
--assisted-bytakes precedence.--no-assisted-bydisables attribution.GH_ASSISTED_BYprovides an explicit environment-level value.- Otherwise,
ghchecks its registry of known agent environment signals. - If nothing is detected, the comment is created normally.
Additional context
A visible footer is insufficient because it is unstructured, inconsistently formatted, easy to omit, and visually noisy. A hidden HTML marker is machine-readable but does not inform readers viewing the comment.
First-class metadata would support transparency while preserving the distinction between authorship and assistance. It would also let repository owners audit or establish policies around agent-assisted interactions.
This likely requires coordination between gh, the GitHub API, and GitHub’s comment UI. The CLI can perform agent detection, but the platform must store and render the resulting metadata.
Activity
cli-triage commentedon Jul 17, 2026
This is a well-described enhancement request to add structured agent-attribution metadata to comments created by
gh, including auto-detection of known agent environments and explicit--assisted-by/--no-assisted-byflags. No duplicate was found - the related #12522 is a broader exploration issue that this proposal builds on rather than duplicating. I'm suggesting theenhancementlabel since the feature doesn't exist yet and the request is clear and actionable (pending GitHub API/platform support for the metadata field).github-actions commentedon Jul 20, 2026
Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
BagToad commentedon Jul 20, 2026
Thanks for the issue @domenkozar. This is an interesting idea, but needs platform / API support for such a thing, so I'm labeling it as blocked. Please feel free to ask for and advocate for this platform side feature in the GitHub Community discussions.
My 2c is that this is invasive and controversial. It's similar to AI harnesses adding their authorship to commits, which people have varying opinions about. Most of those cases have a way to turn it off as well.
domenkozar commentedon Jul 20, 2026
Closest I could find is https://github.com/orgs/community/discussions/178715
I'm fine if it's opt-in. The choice is between undisclosed and disclosed use of AI, given that git was always about tracking who did what, I'd say that's not invasive especially since it's transparent and you're able to turn it off. The social cost of not knowing AI was used is much bigger than the alternative. my 2c :)
BagToad commentedon Jul 20, 2026
FWIW I'm on board with knowing when AI is used, and I think something like this is an intriguing proposal.
My point is just that this is invasive when I put on the
ghmaintainer and designer hat. Users don't like new on-by-default things that alter their output. I think we generally try to avoid it unless it has clear value. Not saying this doesn't have value or anything like that, but I'm just sharing a bit of what we're up against trying to get a feature like this to land.NorfairKing commentedon Jul 21, 2026
Hard agree on this.
It's pretty silly right now:
domenkozar commentedon Jul 29, 2026
Looks like that codex already does this via apps
Merge 'fix Linux panics when opening connections during active reads'…