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

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 ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗