Skip to content

Add AI agent detection to telemetry#1444

Merged
matv-stripe merged 3 commits intomasterfrom
matv/addaitelemetry
Feb 17, 2026
Merged

Add AI agent detection to telemetry#1444
matv-stripe merged 3 commits intomasterfrom
matv/addaitelemetry

Conversation

@matv-stripe
Copy link
Contributor

Adds detection for AI coding agents that invoke the CLI, including Claude Code, Cursor, Cline, and others. The agent name is captured in telemetry events via a new ai_agent field.

Detection is based on well-known environment variables set by each agent. The check happens once per CLI invocation when telemetry metadata is initialized, with no performance impact.

Uses omitempty tag so the field is only sent when an AI agent is detected, keeping telemetry data clean.

Committed-By-Agent: claude

Reviewers

r? @vcheung-stripe
cc @stripe/developer-products

Adds detection for AI coding agents that invoke the CLI, including
Claude Code, Cursor, Cline, and others. The agent name is captured
in telemetry events via a new ai_agent field.

Detection is based on well-known environment variables set by each
agent. The check happens once per CLI invocation when telemetry
metadata is initialized, with no performance impact.

Uses omitempty tag so the field is only sent when an AI agent is
detected, keeping telemetry data clean.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Committed-By-Agent: claude
@matv-stripe matv-stripe requested a review from a team as a code owner February 13, 2026 20:36
Dustin4444

This comment was marked as spam.

Committed-By-Agent: claude
@matv-stripe
Copy link
Contributor Author

r? @vcheung-stripe

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.

3 participants