Skip to content

Attribute Link CLI requests to invoking AI agents - #344

Merged
raubrey-stripe merged 2 commits into
mainfrom
ericgan/agent-attribution
Sep 25, 2026
Merged

raubrey-stripe merged 2 commits into
mainfrom
ericgan/agent-attribution

Conversation

@ericgan-stripe

@ericgan-stripe ericgan-stripe commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Link CLI requests currently identify the CLI version but not the invoking coding agent. Append AIAgent/<normalized-agent> to the default User-Agent on Link API and authentication requests when a recognized environment signal is present. For example, a Codex invocation sends link-cli/<version> AIAgent/codex_cli.

The detector follows Stripe CLI's current eight-agent taxonomy and first-match priority, including Claude and Codex host fallbacks. It emits only normalized slugs.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@ericgan-stripe
ericgan-stripe marked this pull request as ready for review September 25, 2026 19:32
@ericgan-stripe
ericgan-stripe requested a review from a team as a code owner September 25, 2026 19:33
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>

@raubrey-stripe raubrey-stripe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I actually see we diverged in the mpp pay command and have separate logic there to pass through user agent. Would you mind this logic there as well? I can clean up the duplicate code ~soon

@raubrey-stripe

Copy link
Copy Markdown
Contributor

Eh actually it's fine I can follow up with that

@raubrey-stripe
raubrey-stripe merged commit 73af809 into main Sep 25, 2026
11 checks passed
@raubrey-stripe
raubrey-stripe deleted the ericgan/agent-attribution branch September 25, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants