Fix Claude autolog to prioritize settings.json over OS environment variables#20376
Merged
B-Step62 merged 1 commit intomlflow:masterfrom Jan 27, 2026
Merged
Fix Claude autolog to prioritize settings.json over OS environment variables#20376B-Step62 merged 1 commit intomlflow:masterfrom
B-Step62 merged 1 commit intomlflow:masterfrom
Conversation
…riables Project-specific configuration in .claude/settings.json should take precedence over global OS environment variables. This ensures that MLFLOW_EXPERIMENT_ID set in the project config is not overridden by values inherited from the shell environment. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Alkis Polyzotis <alkis.polyzotis@databricks.com>
Contributor
🛠 DevTools 🛠
Install mlflow from this PRFor Databricks, use the following command: |
Contributor
|
Documentation preview for 4f846a1 is available at: More info
|
smoorjani
approved these changes
Jan 27, 2026
B-Step62
approved these changes
Jan 27, 2026
harupy
pushed a commit
to harupy/mlflow
that referenced
this pull request
Jan 28, 2026
…riables (mlflow#20376) Signed-off-by: Alkis Polyzotis <alkis.polyzotis@databricks.com> Co-authored-by: Claude <noreply@anthropic.com>
harupy
pushed a commit
to harupy/mlflow
that referenced
this pull request
Jan 28, 2026
…riables (mlflow#20376) Signed-off-by: Alkis Polyzotis <alkis.polyzotis@databricks.com> Co-authored-by: Claude <noreply@anthropic.com>
harupy
pushed a commit
that referenced
this pull request
Jan 28, 2026
…riables (#20376) Signed-off-by: Alkis Polyzotis <alkis.polyzotis@databricks.com> Co-authored-by: Claude <noreply@anthropic.com>
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.
Related Issues/PRs
#xxxWhat changes are proposed in this pull request?
The
get_env_var()function inmlflow/claude_code/config.pypreviously checked OS environment variables first and only fell back tosettings.json. This caused project-specific configuration to be overridden by global environment variables (e.g.,MLFLOW_EXPERIMENT_IDfrom a different project).This PR inverts the priority order so that
.claude/settings.jsonvalues take precedence over OS environment variables:.claude/settings.json(project-specific config)How is this PR tested?
New tests added:
test_get_env_var_settings_takes_precedence_over_os_env- verifies settings.json takes prioritytest_get_env_var_falls_back_to_os_env_when_not_in_settings- verifies fallback behaviorDoes this PR require documentation update?
Release Notes
Is this a user-facing change?
Claude Code autolog now correctly prioritizes project-specific configuration in
.claude/settings.jsonover OS environment variables, preventing global environment settings from overriding project-specific experiment IDs and tracking URIs.What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityHow should the PR be classified in the release notes? Choose one:
rn/bug-fix- A user-facing bug fix worth mentioning in the release notesShould this PR be included in the next patch release?