-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Expose thread-level multi-agent mode #28792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,7 @@ use codex_experimental_api_macros::ExperimentalApi; | |
| pub use codex_protocol::capabilities::CapabilityRootLocation; | ||
| pub use codex_protocol::capabilities::SelectedCapabilityRoot; | ||
| use codex_protocol::config_types::CollaborationMode; | ||
| use codex_protocol::config_types::MultiAgentMode; | ||
| use codex_protocol::config_types::Personality; | ||
| use codex_protocol::config_types::ReasoningSummary; | ||
| pub use codex_protocol::dynamic_tools::DynamicToolFunctionSpec; | ||
|
|
@@ -93,6 +94,12 @@ pub struct ThreadStartParams { | |
| pub developer_instructions: Option<String>, | ||
| #[ts(optional = nullable)] | ||
| pub personality: Option<Personality>, | ||
| /// Set the initial multi-agent mode for this thread. | ||
| /// Omitted leaves the thread without a selected mode. Eligible multi-agent | ||
| /// v2 turns still default to `explicitRequestOnly`. | ||
| #[experimental("thread/start.multiAgentMode")] | ||
| #[ts(optional = nullable)] | ||
| pub multi_agent_mode: Option<MultiAgentMode>, | ||
| #[ts(optional = nullable)] | ||
| pub ephemeral: Option<bool>, | ||
| #[ts(optional = nullable)] | ||
|
|
@@ -179,6 +186,10 @@ pub struct ThreadStartResponse { | |
| #[serde(default)] | ||
| pub active_permission_profile: Option<ActivePermissionProfile>, | ||
| pub reasoning_effort: Option<ReasoningEffort>, | ||
| /// Current selected multi-agent mode for this thread, if one was selected. | ||
| #[experimental("thread/start.multiAgentMode")] | ||
| #[serde(default)] | ||
| pub multi_agent_mode: Option<MultiAgentMode>, | ||
| } | ||
|
|
||
| impl ThreadStartResponse { | ||
|
|
@@ -239,6 +250,10 @@ pub struct ThreadSettingsUpdateParams { | |
| #[experimental("thread/settings/update.collaborationMode")] | ||
| #[ts(optional = nullable)] | ||
| pub collaboration_mode: Option<CollaborationMode>, | ||
| /// Select the multi-agent mode for subsequent turns. | ||
| #[experimental("thread/settings/update.multiAgentMode")] | ||
| #[ts(optional = nullable)] | ||
| pub multi_agent_mode: Option<MultiAgentMode>, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| /// Override the personality for subsequent turns. | ||
| #[ts(optional = nullable)] | ||
| pub personality: Option<Personality>, | ||
|
|
@@ -249,7 +264,7 @@ pub struct ThreadSettingsUpdateParams { | |
| #[ts(export_to = "v2/")] | ||
| pub struct ThreadSettingsUpdateResponse {} | ||
|
|
||
| #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)] | ||
| #[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS, ExperimentalApi)] | ||
| #[serde(rename_all = "camelCase")] | ||
| #[ts(export_to = "v2/")] | ||
| pub struct ThreadSettings { | ||
|
|
@@ -264,6 +279,10 @@ pub struct ThreadSettings { | |
| pub effort: Option<ReasoningEffort>, | ||
| pub summary: Option<ReasoningSummary>, | ||
| pub collaboration_mode: CollaborationMode, | ||
| /// Current selected multi-agent mode for this thread, if one was selected. | ||
| #[experimental("thread/settings.multiAgentMode")] | ||
| #[serde(default)] | ||
| pub multi_agent_mode: Option<MultiAgentMode>, | ||
| pub personality: Option<Personality>, | ||
| } | ||
|
|
||
|
|
@@ -400,6 +419,10 @@ pub struct ThreadResumeResponse { | |
| #[serde(default)] | ||
| pub active_permission_profile: Option<ActivePermissionProfile>, | ||
| pub reasoning_effort: Option<ReasoningEffort>, | ||
| /// Current selected multi-agent mode for this thread, if one was selected. | ||
| #[experimental("thread/resume.multiAgentMode")] | ||
| #[serde(default)] | ||
| pub multi_agent_mode: Option<MultiAgentMode>, | ||
| /// `thread/turns/list` page returned when requested by `initialTurnsPage`. | ||
| #[experimental("thread/resume.initialTurnsPage")] | ||
| #[serde(default)] | ||
|
|
@@ -555,6 +578,10 @@ pub struct ThreadForkResponse { | |
| #[serde(default)] | ||
| pub active_permission_profile: Option<ActivePermissionProfile>, | ||
| pub reasoning_effort: Option<ReasoningEffort>, | ||
| /// Current selected multi-agent mode for this thread, if one was selected. | ||
| #[experimental("thread/fork.multiAgentMode")] | ||
| #[serde(default)] | ||
| pub multi_agent_mode: Option<MultiAgentMode>, | ||
| } | ||
|
|
||
| impl ThreadForkResponse { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit is 656 changed lines across 46 files, and the edits are not mechanical: the option is threaded through protocol/schema/docs, app-server start/resume/fork/settings behavior, core spawn/resume/fork inheritance, analytics/TUI call sites, and test suites. Because that is a complex logic change over the 500-line target, split it into smaller reviewable stages, such as landing settings/API plumbing separately from AgentControl/ThreadManager lifecycle inheritance.
AGENTS.md reference: AGENTS.md:L125-L131
Useful? React with 👍 / 👎.