Skip to content

multi-agent: move concurrency guidance into v2 usage hints - #27569

Merged
jif-oai merged 4 commits into
mainfrom
jif/prompt-conc
Jun 11, 2026
Merged

multi-agent: move concurrency guidance into v2 usage hints#27569
jif-oai merged 4 commits into
mainfrom
jif/prompt-conc

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Why

Native Codex currently teaches multi-agent concurrency through the spawn_agent tool description, while bridge-driven evals frame the same limit as a shared pool of active agent slots. That mismatch makes the model-facing story harder to reason about, especially because the tool-level wording does not make it explicit that the limit covers the whole agent team, including the current agent.

This change gives native Codex the same mental model: tell the root agent and subagents how many active slots exist, and remove the separate spawn_agent limit wording.

What changed

  • Extend the built-in multi_agent_v2 root and subagent usage hints with shared-slot guidance derived from the resolved max_concurrent_threads_per_session value.
  • Keep the complete default hints in MultiAgentV2Config so initial context and forked histories consume the same canonical strings.
  • Drop the redundant spawn_agent description text and remove the now-unused limit plumbing from the tool spec path.

Testing

  • just test -p codex-core usage_hint
  • just test -p codex-core multi_agent_v2_default_session_thread_cap_counts_root
  • just test -p codex-core multi_agent_v2_default_usage_hints_use_configured_thread_cap
  • just test -p codex-core spawn_agent_tool_v2_requires_task_name_and_lists_visible_models
  • just test -p codex-core multi_agent_feature_selects_one_agent_tool_family

@jif-oai
jif-oai requested a review from a team as a code owner June 11, 2026 09:14
@jif-oai

jif-oai commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@jif-oai jif-oai changed the title feat: update max concurrency message multi-agent: move concurrency guidance into v2 usage hints Jun 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 168cddddc1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/session/multi_agents.rs Outdated
Comment thread codex-rs/core/src/session/multi_agents.rs Outdated
Comment thread codex-rs/core/src/session/multi_agents.rs Outdated
@jif-oai

jif-oai commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fe04e86efa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/agent/control/spawn.rs Outdated
Comment thread codex-rs/core/src/session/multi_agents.rs Outdated
Comment thread codex-rs/core/src/session/multi_agents.rs Outdated
Comment thread codex-rs/core/src/session/multi_agents.rs Outdated
@jif-oai

jif-oai commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92644c48f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/config/mod.rs Outdated
Comment thread codex-rs/core/src/config/mod.rs
Comment thread codex-rs/core/src/config/mod.rs
@jif-oai

jif-oai commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e13920ef12

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/config/mod.rs
Comment thread codex-rs/core/src/config/config_tests.rs
@jif-oai

jif-oai commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

For the record we won't support backward compatibility so it's not a big deal

@jif-oai
jif-oai merged commit 0870352 into main Jun 11, 2026
31 checks passed
@jif-oai
jif-oai deleted the jif/prompt-conc branch June 11, 2026 10:41
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant