add support for detecting OpenAI Codex usage of the dotnet CLI#52861
Closed
baronfel wants to merge 4 commits intodotnet:release/10.0.3xxfrom
Closed
add support for detecting OpenAI Codex usage of the dotnet CLI#52861baronfel wants to merge 4 commits intodotnet:release/10.0.3xxfrom
baronfel wants to merge 4 commits intodotnet:release/10.0.3xxfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for detecting OpenAI Codex usage of the dotnet CLI through telemetry. However, it also includes undocumented changes to the detection rules for Claude Code and Cursor AI environments.
Changes:
- Adds new telemetry detection for OpenAI Codex via the CODEX_THREAD_ID environment variable
- Changes CLAUDECODE and CURSOR_EDITOR detection from AnyPresentEnvironmentRule to BooleanEnvironmentRule
- Adds test case for CODEX_THREAD_ID detection
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Cli/dotnet/Telemetry/LLMEnvironmentDetectorForTelemetry.cs | Adds Codex detection rule and changes Claude/Cursor rules from AnyPresentEnvironmentRule to BooleanEnvironmentRule |
| test/dotnet.Tests/TelemetryCommonPropertiesTests.cs | Adds test case for CODEX_THREAD_ID environment variable |
MiYanni
approved these changes
Feb 6, 2026
Member
Author
|
@copilot make the rules I added/changed all use the 'accept any' strategy - I am dumb and forgot that the values might not be booleans which is causing the test failures. |
Member
Author
|
/azp run dotnet-sdk-public-ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
22 tasks
Member
Author
|
Going to close this in favor of #52878 which is more comprehensive. |
auto-merge was automatically disabled
February 6, 2026 18:59
Pull request was closed
This was referenced Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Quick PR to add one more heuristic.