Skip to content

fix(459): 🐛 fix claude code env var bug#467

Merged
SeanAlexanderHarris merged 1 commit into
mainfrom
459-fix-claude-code-env-var-bug
Jul 23, 2026
Merged

fix(459): 🐛 fix claude code env var bug#467
SeanAlexanderHarris merged 1 commit into
mainfrom
459-fix-claude-code-env-var-bug

Conversation

@SeanAlexanderHarris

Copy link
Copy Markdown
Contributor

corrects a fat finger error in the claude code env var that should not include an underscore

Copilot AI review requested due to automatic review settings July 23, 2026 16:07
@SeanAlexanderHarris
SeanAlexanderHarris requested review from a team as code owners July 23, 2026 16:07
@prolific-snyk

prolific-snyk commented Jul 23, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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

Updates the agent-environment detection used for composing the CLI User-Agent header by correcting the Claude Code environment variable name (removing the underscore) and aligning related tests.

Changes:

  • Rename the Claude Code detection env var from CLAUDE_CODE to CLAUDECODE.
  • Update agent detection source list to use the corrected env var.
  • Adjust unit tests that isolate/seed agent env vars to match the new name.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
client/client_test.go Updates user-agent composition tests to use CLAUDECODE when simulating an agent-driven environment.
agentenv/agentenv.go Switches the Claude Code detection source env var to CLAUDECODE.
agentenv/agentenv_test.go Updates agent detection tests to use CLAUDECODE and keeps isolation of known agent env vars consistent.

Comment thread agentenv/agentenv.go
@SeanAlexanderHarris
SeanAlexanderHarris enabled auto-merge (rebase) July 23, 2026 16:09
corrects a fat finger error in the claude code env var that should not include an underscore
@SeanAlexanderHarris
SeanAlexanderHarris force-pushed the 459-fix-claude-code-env-var-bug branch from 1b020fa to 0f8bac4 Compare July 23, 2026 16:10
@SeanAlexanderHarris
SeanAlexanderHarris merged commit a4dd482 into main Jul 23, 2026
7 checks passed
@SeanAlexanderHarris
SeanAlexanderHarris deleted the 459-fix-claude-code-env-var-bug branch July 23, 2026 16:33
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.

6 participants