Repository navigation
Conversation
Read `default_args` from `<codex_home>/codex-local.toml` and insert them after argv[0] before clap parses the multitool CLI. Only -c/--config, -m/--model and -p/--profile are allowed (`--flag v` and `--flag=v`). Defaults are skipped when CODEX_LOCAL_NO_DEFAULTS=1, when a pre-parse of the original argv fails, or when the subcommand is outside the runtime set accepted by profile_v2_for_subcommand (RUNTIME_SUBCOMMANDS, guarded by a parity test over every subcommand). A user -m drops the default -m; a user -p drops the default -p and -m; -c defaults are always kept. A malformed file prints one warning and leaves argv unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185nJxTpL8i9DEagqMF4r8H
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
Add fork-only default CLI flags from
<codex_home>/codex-local.tomlfor runtime invocations. Supported defaults are-c/--config,-m/--model, and-p/--profile. Explicit user model and profile flags win; a user profile also drops the default model.CODEX_LOCAL_NO_DEFAULTS=1bypasses the file.The implementation is stacked on A1, and its upstream-merge guidance is in
codex-rs/chat-completions/MERGE_NOTES.md.Verification
cargo test -p codex-cli --bin codex local_defaults -j 1: 21 passed.cargo fmt --check: passed.cargo clippy -p codex-cli --bin codex -j 1 -- -D warnings: passed.Please review against the A1 branch. After A1 merges, retarget this PR to
mainand merge with a merge commit.