feat(config): add named configuration profiles#171
Merged
emal-avala merged 3 commits intomainfrom Apr 23, 2026
Merged
Conversation
`/profile save|load|list|delete` persists Config snapshots under <config_dir>/agent-code/profiles/<name>.toml. Loading a profile replaces the runtime config wholesale — merging two user-maintained configs is where most "why is this setting ignored?" bugs come from, so the design is deliberately simple. New `services::profiles` module with save / load / list / delete + profile-name validation. Name validation is the load-bearing piece: rejects empty, oversize, path separators, `..`, shell metachars, so a malicious or careless name can't escape the profiles directory. Slash command surface: /profile list saved profiles /profile list (same) /profile save <name> save current config /profile load <name> replace runtime config /profile delete <name> remove /profile help usage Env var overrides (AGENT_CODE_MODEL etc.) are NOT re-applied on load — the runtime process keeps using whatever env said at startup, and /profile load swaps in the TOML-declared values verbatim. Documented in the load output so it's not a surprise.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
# Conflicts: # crates/cli/src/commands/mod.rs
# Conflicts: # crates/cli/src/commands/mod.rs
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 named config profiles. `/profile save|load|list|delete` persists `Config` snapshots under `<config_dir>/agent-code/profiles/.toml`. Loading a profile replaces the runtime config wholesale.
Commands:
```
/profile list saved profiles
/profile list (same)
/profile save save current config
/profile load replace runtime config
/profile delete remove
/profile help usage
```
Design notes
Files
Test plan