Skip to content

Detect GitHub Copilot app in CLI telemetry - #19740

Merged
Damian Edwards (DamianEdwards) merged 2 commits into
mainfrom
damianedwards-coding-agent-detection
Aug 27, 2026
Merged

Detect GitHub Copilot app in CLI telemetry#19740
Damian Edwards (DamianEdwards) merged 2 commits into
mainfrom
damianedwards-coding-agent-detection

Conversation

@DamianEdwards

Copy link
Copy Markdown
Member

Description

The Aspire CLI does not currently identify commands run from the GitHub Copilot app separately from the underlying Copilot CLI. This keeps CodingAgentDetector aligned with the latest detection rules in dotnet/sdk.

When AI_AGENT=github_copilot_app_agent is present, telemetry now reports copilot-app. The Copilot app also sets COPILOT_CLI, so its complete coding-agent value is copilot-cli, copilot-app.

Validation:

dotnet test --project tests\Aspire.Cli.Tests\Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-method "*.CodingAgentDetector_DetectsKnownCodingAgents" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e757dd54-eb42-4b0a-b112-2ea77e4eacc7
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 19740

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 19740"

Copilot AI 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.

Pull request overview

Adds GitHub Copilot app detection to Aspire CLI telemetry, matching the .NET SDK rules.

Changes:

  • Detects AI_AGENT=github_copilot_app_agent as copilot-app.
  • Tests standalone and combined Copilot CLI/app detection.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Aspire.Cli/Telemetry/CodingAgentDetector.cs Adds the Copilot app detection rule.
tests/Aspire.Cli.Tests/Telemetry/AspireCliTelemetryTests.cs Adds regression test cases.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@github-actions

This comment has been minimized.

Comment thread src/Aspire.Cli/Telemetry/CodingAgentDetector.cs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e757dd54-eb42-4b0a-b112-2ea77e4eacc7
Copilot AI review requested due to automatic review settings August 27, 2026 15:38

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector (audit mode)

The full test matrix and all jobs still run in audit mode. The tests and jobs below are what selective CI would run under enforcement.

2 / 102 test projects · 4 jobs, from 2 changed files.

Selected test projects (2 / 102)

Aspire.Cli.EndToEnd.Tests, Aspire.Cli.Tests

Selected jobs (4)

deployment-e2e, extension-e2e, polyglot, typescript-api-compat


How these were chosen — grouped by what changed

📦 affected project Aspire.Cli
1 test: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Cli.Tests/Telemetry/AspireCliTelemetryTests.cs (changed test)
1 directly: Aspire.Cli.Tests

Job reasons

Job Triggered by
deployment-e2e affected project Aspire.Cli
extension-e2e src/Aspire.Cli/Telemetry/CodingAgentDetector.cs, tests/Aspire.Cli.Tests/Telemetry/AspireCliTelemetryTests.cs
• affected project Aspire.Cli
polyglot affected project Aspire.Cli
typescript-api-compat affected project Aspire.Cli

Selection computed for commit e7686ba.

@DamianEdwards
Damian Edwards (DamianEdwards) merged commit 737ef6e into main Aug 27, 2026
390 checks passed
@DamianEdwards
Damian Edwards (DamianEdwards) deleted the damianedwards-coding-agent-detection branch August 27, 2026 16:14
@microsoft-github-policy-service microsoft-github-policy-service Bot added this to the 13.6 milestone Aug 27, 2026
@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Pull request created: #1589

Generated by PR Documentation Check · auto · 102.1 AIC · ⌖ 7.18 AIC · ⊞ 19.6K

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

📝 Documentation has been drafted in microsoft/aspire.dev#1589 targeting release/13.6.

Added a 13.6 data-points row to the Microsoft-collected CLI telemetry doc noting that the CLI now separately reports copilot-app for the GitHub Copilot desktop app (detected via AI_AGENT=github_copilot_app_agent), alongside the existing copilot-cli value.

  • Modified: src/frontend/src/content/docs/reference/cli/microsoft-collected-cli-telemetry.mdx

Note

This draft PR needs human review before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants