config.schema.json incorrectly says agents.max_threads is unbounded when unset

Resolved 💬 2 comments Opened Mar 8, 2026 by aryasaatvik Closed Mar 8, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

The generated config schema currently says:

"Maximum number of agent threads that can be open concurrently. When unset, no limit is enforced."

for agents.max_threads.

That no longer matches runtime behavior.

Current behavior

In the current code, unset agents.max_threads falls back to a default of 6, not unbounded:

  • DEFAULT_AGENT_MAX_THREADS = Some(6) in codex-rs/core/src/config/mod.rs
  • config loading applies that default when agents.max_threads is unset

Where the stale text appears

  • codex-rs/core/config.schema.json
  • the AgentsToml.max_threads doc comment in codex-rs/core/src/config/mod.rs

Why this matters

This is user-visible and misleading for anyone relying on the schema or raw config reference to understand multi-agent limits.

In practice it makes it easy to incorrectly assume that:

  • unset max_threads means unbounded
  • explicitly setting a large value like 100 is close to default behavior

But the actual default is much tighter.

Expected fix

Update the schema/doc text to reflect the real behavior, for example:

Maximum number of agent threads that can be open concurrently. Defaults to 6 when unset.

If there is a reason the runtime default and schema are intentionally diverging, that should be documented explicitly.

Related

  • Related but not duplicate: [#12546](<https://github.com/openai/codex/issues/12546>) (docs request to surface agents.max_threads in official config reference)

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #12546

Powered by Codex Action

etraut-openai contributor · 5 months ago

Thanks for the bug report. This is now fixed in the docs.