Fix saved config profiles with env overrides#695
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b992865029
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
861a7fb to
19c3309
Compare
07a8e17 to
e7b86e9
Compare
e7b86e9 to
e3c8ea7
Compare
e3c8ea7 to
cf0babf
Compare
cf0babf to
071acdf
Compare
071acdf to
e3de47f
Compare
e3de47f to
c08cf33
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c08cf3367b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
c08cf33 to
9c8c7c3
Compare
9c8c7c3 to
2fd071a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2fd071a. Configure here.

Summary
prime config use <profile>fail when active credential/user/API URL env vars or ambientPRIME_CONTEXTwould mask the selected saved profile.--contextworking forconfig useand restore context state after the command.Testing
uv run ruff check packages/prime/src/prime_cli/core/config.py packages/prime/src/prime_cli/commands/config.py packages/prime/src/prime_cli/main.py packages/prime/tests/test_config_profiles.py packages/prime/tests/test_config_delete.pyuv run ruff format --check packages/prime/src/prime_cli/core/config.py packages/prime/src/prime_cli/commands/config.py packages/prime/src/prime_cli/main.py packages/prime/tests/test_config_profiles.py packages/prime/tests/test_config_delete.pyuv run pytest packages/prime/tests/test_config_profiles.py packages/prime/tests/test_config_delete.py packages/prime/tests/test_switch.py -q