Skip to content

Add nickname_candidates to config.toml#15143

Closed
baumann-oai wants to merge 3 commits intomainfrom
baumann-oai/nickname-pool-fallback
Closed

Add nickname_candidates to config.toml#15143
baumann-oai wants to merge 3 commits intomainfrom
baumann-oai/nickname-pool-fallback

Conversation

@baumann-oai
Copy link
Copy Markdown
Contributor

@baumann-oai baumann-oai commented Mar 19, 2026

Summary

  • Allow config.toml to define a global nickname_candidates list for spawned agents, with role-specific candidates still taking precedence when present.
  • Keep the fallback behavior narrow: role config first, then global config, then built-in defaults.
  • Update config loading/validation and the generated schema to use the same key, and cover user-vs-project precedence plus empty/duplicate cleanup in tests.

Testing

  • just write-config-schema
  • cargo test -p codex-core

@github-actions
Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


Nick Baumann seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@baumann-oai baumann-oai changed the title Tighten agent config naming Add nickname_candidates to config.toml Mar 19, 2026
@etraut-openai etraut-openai added the oai PRs contributed by OpenAI employees label Mar 20, 2026
if let Some(metrics) = codex_otel::metrics::global() {
let _ = metrics.counter(
"codex.multi_agent.nickname_pool_reset",
"codex.multi_agent.nickname_candidates_reset",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

}

#[tokio::test]
async fn spawn_thread_subagent_prefers_role_candidates_over_global_nickname_candidates() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems a bit useless

Ok(Some(normalized_candidates))
}

pub(crate) fn normalize_global_agent_nickname_candidates(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make sure we don't already have code doing the exact same thing?

Also, I don't think this should be pub(crate)

}

#[tokio::test]
async fn user_agents_nickname_candidates_are_used_without_project_override() -> std::io::Result<()>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's avoid adding useless tests. Most of them are very low value. Let's try to have one very good test instead


/// Named global fallback nickname candidate packs keyed by pack name.
#[serde(default)]
pub nickname_packs: BTreeMap<String, Vec<String>>,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this? This sounds going a bit too far IMO

Customisation is cool but up to a given limit IMO

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 4, 2026

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oai PRs contributed by OpenAI employees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants