fix: respect env vars for client config paths and add Codex local scope#7
Merged
fix: respect env vars for client config paths and add Codex local scope#7
Conversation
…pe support - Claude Code: check CLAUDE_CONFIG_DIR before defaulting to ~/.claude.json - VS Code: check XDG_CONFIG_HOME on Linux before defaulting to ~/.config - Codex: enable local config (SupportsLocal=true) with trust-level validation; reads projects.<cwd>.trust_level from global config.toml and returns an informative error if the project is not trusted Closes #1, #2 Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
#1): CheckCLAUDE_CONFIG_DIRenv var before defaulting to~/.claude.json#1): CheckXDG_CONFIG_HOMEon Linux before defaulting to~/.configfor the settings path#2): Enable--localflag support with trust-level validation — readsprojects.<cwd>.trust_levelfrom the globalconfig.tomland returns an informative error (with setup instructions) if the project is not marked"trusted"Closes #1, Closes #2
Test plan
TestClaudeCodeConfigPath_WithEnvVar— verifiesCLAUDE_CONFIG_DIRis usedTestClaudeCodeConfigPath_WithoutEnvVar— verifies fallback to~/.claude.jsonTestVSCodeConfigPath_WithXDGEnvVar— verifiesXDG_CONFIG_HOMEused on LinuxTestVSCodeConfigPath_WithoutXDGEnvVar— verifies fallback on LinuxTestReadCodexProjectTrustLevel_*— 5 cases covering trusted, untrusted, missing project, no config, multiple projectsTestCodexLocalPath_Trusted— happy path returns.codex/config.tomlTestCodexLocalPath_Untrusted— error when project not trustedTestCodexLocalPath_NoConfigFile— error when config absent🤖 Generated with Claude Code