feat(config): settings.local.toml — gitignored project overrides#234
Merged
emal-avala merged 1 commit intomainfrom Apr 23, 2026
Merged
feat(config): settings.local.toml — gitignored project overrides#234emal-avala merged 1 commit intomainfrom
emal-avala merged 1 commit intomainfrom
Conversation
Adds a new config precedence tier above `settings.toml` and below env vars: `.agent/settings.local.toml`. Intended for machine-specific or developer- specific overrides that shouldn't be committed (e.g. pointing at a local proxy base URL while leaving the team's shared `settings.toml` intact). Precedence (highest → lowest): 1. CLI flags / env vars 2. `.agent/settings.local.toml` (gitignored, developer-local) ← new 3. `.agent/settings.toml` (committed, shared) 4. `~/.config/agent-code/config.toml` (user-global) Both walks are independent, so a repo-root `settings.toml` plus a crate- local `settings.local.toml` compose correctly. `watch_config` now also watches the local file so `/reload` picks up changes. Tests: 5 new cases covering partial override, stand-alone local layer, permission-rules extend ordering, walk-up, and no-cross-contamination with `settings.toml`. Full config suite: 81 pass, 0 fail.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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
Adds a new config precedence tier:
.agent/settings.local.toml, a gitignored overlay that sits on top of the committedsettings.toml. Intended for developer-local overrides (e.g. a personal API base URL) without mutating the team's shared config.Precedence (highest → lowest)
.agent/settings.local.toml.agent/settings.toml~/.config/agent-code/config.tomlBoth project-file walks are independent, so a repo-root
settings.tomlplus a crate-localsettings.local.tomlcompose correctly — you can place the overlay at a different ancestor level than the shared file.Scope
load_innerpicks up the local layer after the project layer so it overrides.watch_configobserves the local file too, so/reloaddetects edits.permissions.ruleskeep extend-semantics — user + project + local rules concatenate in order, matching existing behavior for the two-layer case.[api]field without clobbering the rest.Tests
5 new cases:
local_layer_overrides_project_layerlocal_layer_partial_override_leaves_other_fields_intactlocal_layer_without_project_still_overlays_on_userlocal_layer_permission_rules_extend_across_all_layerse2e_find_local_config_walks_up_from_nested_dir,…_is_independent_from_settings_toml,…_stops_at_first_matchFull
config::suite: 81 pass, 0 fail. Clippy clean under-D warnings.Test plan
cargo test -p agent-code-lib --lib config::cargo clippy --workspace --tests --no-deps -- -D warningscargo fmt --all --check