From 0e31c29e2512dfe3d2a3fcec83160626772deca5 Mon Sep 17 00:00:00 2001 From: Alex Daley Date: Fri, 30 Oct 2026 18:20:28 +0000 Subject: [PATCH] Enable deferred tool world state by default (#58410) ## What changed Mark `deferred_tool_world_state` as stable and enable it by default. Deferred tool namespaces now appear in the developer `` context instead of the `tool_search` description. Explicitly disabling the feature preserves discovery metadata in the search description. ## Testing Update tool discovery tests to cover the default behavior and explicit opt-out, and refresh request snapshots for the deferred namespace context. GitOrigin-RevId: d58e369ea22754cee593c26a5ca011e41ba56e79 --- ..._startup_context_then_first_turn_diff.snap | 8 +- codex-rs/core/src/tools/spec_plan_tests.rs | 15 +++ .../core/tests/suite/mcp_tool_exposure.rs | 80 ++++------------ codex-rs/core/tests/suite/prompt_caching.rs | 16 ++++ codex-rs/core/tests/suite/rmcp_client.rs | 24 ++--- codex-rs/core/tests/suite/search_tool.rs | 96 ++++++++++--------- ...text__additional_context_simple_input.snap | 8 +- ...t__manual_compact_with_history_shapes.snap | 40 ++++++-- ...nual_compact_without_prev_user_shapes.snap | 8 +- ...__compact__mid_turn_compaction_shapes.snap | 24 +++-- ...mpling_model_switch_compaction_shapes.snap | 22 ++++- ...action_context_window_exceeded_shapes.snap | 8 +- ..._compaction_including_incoming_shapes.snap | 24 +++-- ...n_strips_incoming_model_switch_shapes.snap | 16 +++- ...ry_v2__plugin_acceptance_auth_refresh.snap | 9 +- ...le_layout_cwd_change_refreshes_agents.snap | 6 +- ...layout_resume_with_personality_change.snap | 12 ++- ...__model_visible_layout_turn_overrides.snap | 6 +- ...s__additional_context_legacy_messages.snap | 8 +- ...rios__additional_context_tool_outputs.snap | 8 +- ..._admitted_prompt_id_reaches_responses.snap | 8 +- ...arios__app_tool_exposure_CodeModeOnly.snap | 7 +- ...efresh_simplified_selection_hints_off.snap | 22 +++-- ...refresh_simplified_selection_hints_on.snap | 22 +++-- ...ra_settings_release_check_tool_shapes.snap | 6 +- ...scenarios__code_mode_catalog_messages.snap | 6 +- ...e_mode_catalog_messages_ranked_search.snap | 6 +- ...ntent_filter__content_filter_guidance.snap | 8 +- ...ol_definitions_follow_captured_models.snap | 22 +++-- ...al_masking__remote_credential_masking.snap | 8 +- ...asking__remote_credential_masking_zsh.snap | 8 +- ...narios__guardian_checkpoint_migration.snap | 44 ++++++--- ...enarios__guardian_code_mode_messaging.snap | 12 ++- ..._extra_policy_reaches_guardian_review.snap | 68 +++++++------ ...itions_keep_later_human_authorization.snap | 16 +++- ...rchestrator_connector_request_history.snap | 14 ++- ...er_context__cross_host_sender_context.snap | 36 +++++-- ..._incremental_tools__incremental_tools.snap | 36 ++++--- ...ools__incremental_tools_responses_api.snap | 22 +++-- ...ols_resume__disable_incremental_tools.snap | 24 +++-- ...sume__legacy_resume_remote_compaction.snap | 24 +++-- ...ls_resume__legacy_resume_window_reset.snap | 24 +++-- ...kpoint_requires_fresh_human_decisions.snap | 8 +- ...ource_messages__mcp_resource_messages.snap | 6 +- ...arios__mxc__preferred_mxc_permissions.snap | 34 ++++--- ..._answers__partial_answer_continuation.snap | 8 +- ...ediction_fork_inherits_parent_context.snap | 76 ++++++++------- ...rios__realtime_attachment_replacement.snap | 6 +- ...3p_cache__strict_3p_mcp_catalog_cache.snap | 29 ++++-- ...ite__scenarios__subagent_browser_auth.snap | 12 ++- ...eb_search__literature_search_and_open.snap | 12 ++- ...loud_skills_across_executor_readiness.snap | 28 ++++-- ...lls_across_executor_readiness_windows.snap | 46 ++++++--- ..._new_context_window_tool_full_context.snap | 6 +- codex-rs/core/tests/suite/token_budget.rs | 1 + ...y_images_reach_the_next_model_request.snap | 12 ++- ...suite__transfers__multi_env_copy_file.snap | 12 ++- codex-rs/features/src/lib.rs | 4 +- 58 files changed, 765 insertions(+), 416 deletions(-) diff --git a/codex-rs/core/src/session/snapshots/codex_core__codex_tests__fork_startup_context_then_first_turn_diff.snap b/codex-rs/core/src/session/snapshots/codex_core__codex_tests__fork_startup_context_then_first_turn_diff.snap index 9ea3b45252..9831fb0dfa 100644 --- a/codex-rs/core/src/session/snapshots/codex_core__codex_tests__fork_startup_context_then_first_turn_diff.snap +++ b/codex-rs/core/src/session/snapshots/codex_core__codex_tests__fork_startup_context_then_first_turn_diff.snap @@ -8,8 +8,12 @@ Scenario: First request after fork when startup preserves the parent baseline, t -- request 1 (turn; First Forked Turn Request) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/src/tools/spec_plan_tests.rs b/codex-rs/core/src/tools/spec_plan_tests.rs index 19b17318af..4f6c1ab9f2 100644 --- a/codex-rs/core/src/tools/spec_plan_tests.rs +++ b/codex-rs/core/src/tools/spec_plan_tests.rs @@ -2246,6 +2246,11 @@ async fn tool_search_cache_rebuilds_when_deferred_sources_change() { let cache = ToolSearchHandlerCache::default(); let (_session, mut first_turn) = make_session_and_context().await; + set_feature( + &mut first_turn, + Feature::DeferredToolWorldState, + /*enabled*/ false, + ); update_turn_settings_for_test(&mut first_turn, |settings| { Arc::make_mut(&mut settings.model_info).supports_search_tool = true; }); @@ -2275,6 +2280,11 @@ async fn tool_search_cache_rebuilds_when_deferred_sources_change() { let first_plan = ToolPlanProbe::from_router(first_router); let (_session, mut second_turn) = make_session_and_context().await; + set_feature( + &mut second_turn, + Feature::DeferredToolWorldState, + /*enabled*/ false, + ); update_turn_settings_for_test(&mut second_turn, |settings| { Arc::make_mut(&mut settings.model_info).supports_search_tool = true; }); @@ -2941,6 +2951,11 @@ async fn tool_mode_selector_overrides_feature_flags() { #[tokio::test] async fn v1_multi_agent_tools_defer_when_tool_search_available() { let plan = probe(|turn| { + set_feature( + turn, + Feature::DeferredToolWorldState, + /*enabled*/ false, + ); update_turn_settings_for_test(turn, |settings| { Arc::make_mut(&mut settings.model_info).supports_search_tool = true; }); diff --git a/codex-rs/core/tests/suite/mcp_tool_exposure.rs b/codex-rs/core/tests/suite/mcp_tool_exposure.rs index 237aa194ae..5e3affcc8c 100644 --- a/codex-rs/core/tests/suite/mcp_tool_exposure.rs +++ b/codex-rs/core/tests/suite/mcp_tool_exposure.rs @@ -241,13 +241,9 @@ fn format_labeled_requests_snapshot( ) } -fn enable_deferred_tool_world_state_without_agents(config: &mut Config) { +fn configure_deferred_tool_world_state_without_agents(config: &mut Config) { config.update_plan_enabled = true; config.agents_enabled = false; - config - .features - .enable(Feature::DeferredToolWorldState) - .expect("test config should allow feature update"); } fn tools_state_sections(request: &ResponsesRequest) -> Vec { @@ -1004,20 +1000,18 @@ async fn elevated_apps_catalog_limit_requires_host_owned_registration() -> Resul .await; test.submit_turn("inspect the large Apps tool catalog") .await?; - let body = response.single_request().body_json(); - let description = body["tools"] - .as_array() - .and_then(|tools| { - tools.iter().find_map(|tool| { - (tool.get("type").and_then(Value::as_str) == Some("tool_search")) - .then(|| tool.get("description").and_then(Value::as_str)) - .flatten() - }) - }) - .expect("large Apps catalogs should remain discoverable through tool_search"); + let request = response.single_request(); assert!( - description.contains("Calendar"), - "the accepted Apps catalog should remain model-discoverable: {description}" + request.body_json()["tools"] + .as_array() + .is_some_and(|tools| { tools.iter().any(|tool| tool["type"] == "tool_search") }), + "large Apps catalogs should remain discoverable through tool_search" + ); + assert!( + tools_state_sections(&request) + .iter() + .any(|text| text.contains("mcp__codex_apps__calendar")), + "the accepted Apps catalog should remain model-discoverable in world state" ); test.codex.shutdown_and_wait().await?; } @@ -1092,48 +1086,6 @@ async fn code_mode_only_exposes_direct_model_only_mcp_namespaces() -> Result<()> Ok(()) } -#[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn deferred_tool_world_state_is_disabled_by_default() -> Result<()> { - skip_if_no_network!(Ok(())); - - let server = responses::start_mock_server().await; - let apps_server = AppsTestServer::mount_searchable(&server).await?; - let response = responses::mount_sse_once( - &server, - sse(vec![ - ev_response_created("resp-1"), - ev_assistant_message("msg-1", "done"), - ev_completed("resp-1"), - ]), - ) - .await; - - let mut builder = search_capable_apps_builder(apps_server.chatgpt_base_url.clone()); - let test = builder.build(&server).await?; - test.submit_turn("inspect deferred MCP tools").await?; - - let request = response.single_request(); - assert!( - request - .message_input_texts("developer") - .into_iter() - .all(|text| !text.contains("")), - "deferred tool world state should not be injected unless its feature is enabled" - ); - assert!( - request.body_json()["tools"] - .as_array() - .is_some_and(|tools| { - tools - .iter() - .any(|tool| tool.get("type").and_then(Value::as_str) == Some("tool_search")) - }), - "disabling tool world state must not disable deferred tool discovery" - ); - - Ok(()) -} - // Keep spawned tasks on the thread with the scoped tracing subscriber. #[tokio::test(flavor = "current_thread")] async fn deferred_tool_world_state_tracks_initial_unchanged_and_removed_namespaces() -> Result<()> { @@ -1150,7 +1102,7 @@ async fn deferred_tool_world_state_tracks_initial_unchanged_and_removed_namespac let apps_server = AppsTestServer::mount_searchable(&server).await?; let response = mount_sse_sequence(&server, completed_response_sequence(/*count*/ 3)).await; let mut builder = search_capable_apps_builder(apps_server.chatgpt_base_url.clone()) - .with_config(enable_deferred_tool_world_state_without_agents); + .with_config(configure_deferred_tool_world_state_without_agents); let test = builder.build_with_auto_env(&server).await?; wait_for_mcp_server(&test.codex, CODEX_APPS_MCP_SERVER_NAME).await?; @@ -1240,7 +1192,7 @@ async fn initially_empty_deferred_tool_world_state_is_not_rendered_or_persisted( let server = responses::start_mock_server().await; let response = mount_sse_sequence(&server, completed_response_sequence(/*count*/ 1)).await; let mut builder = core_test_support::test_codex::test_codex() - .with_config(enable_deferred_tool_world_state_without_agents); + .with_config(configure_deferred_tool_world_state_without_agents); let test = builder.build_with_auto_env(&server).await?; test.submit_turn("inspect empty deferred tools").await?; @@ -1278,7 +1230,7 @@ async fn deferred_tool_world_state_survives_resume_without_duplicate_updates() - let apps_server = AppsTestServer::mount_searchable(&server).await?; let response = mount_sse_sequence(&server, completed_response_sequence(/*count*/ 2)).await; let mut builder = search_capable_apps_builder(apps_server.chatgpt_base_url.clone()) - .with_config(enable_deferred_tool_world_state_without_agents); + .with_config(configure_deferred_tool_world_state_without_agents); let initial = builder.build_with_auto_env(&server).await?; wait_for_mcp_server(&initial.codex, CODEX_APPS_MCP_SERVER_NAME).await?; initial @@ -1311,7 +1263,7 @@ async fn deferred_tool_world_state_survives_resume_without_duplicate_updates() - }) ); let mut resume_builder = search_capable_apps_builder(apps_server.chatgpt_base_url) - .with_config(enable_deferred_tool_world_state_without_agents); + .with_config(configure_deferred_tool_world_state_without_agents); let resumed = resume_builder.restart(&server, &initial).await?; drop(initial); wait_for_mcp_server(&resumed.codex, CODEX_APPS_MCP_SERVER_NAME).await?; diff --git a/codex-rs/core/tests/suite/prompt_caching.rs b/codex-rs/core/tests/suite/prompt_caching.rs index 1042bf8b6e..7ff7f0362e 100644 --- a/codex-rs/core/tests/suite/prompt_caching.rs +++ b/codex-rs/core/tests/suite/prompt_caching.rs @@ -864,6 +864,14 @@ async fn per_turn_overrides_keep_cached_prefix_and_key_constant() -> anyhow::Res expected_body2.push(expected_settings_update_msg); expected_body2.push(expected_permissions_update_msg); expected_body2.push(expected_env_msg_2); + expected_body2.push(serde_json::json!({ + "type": "message", + "role": "developer", + "content": [{ + "type": "input_text", + "text": "\nRemoved deferred tool namespaces:\n- multi_agent_v1: Tools for spawning and managing sub-agents.\nNo deferred tool namespaces remain.\n" + }] + })); expected_body2.push(expected_user_message_2); assert_eq_without_metadata_or_item_ids( body2["input"].clone(), @@ -1175,6 +1183,14 @@ async fn send_user_turn_with_changes_sends_environment_context() -> anyhow::Resu expected_settings_update_msg, expected_permissions_update_msg, expected_env_update_msg, + serde_json::json!({ + "type": "message", + "role": "developer", + "content": [{ + "type": "input_text", + "text": "\nRemoved deferred tool namespaces:\n- multi_agent_v1: Tools for spawning and managing sub-agents.\nNo deferred tool namespaces remain.\n" + }] + }), expected_user_message_2, ]); assert_eq_without_metadata_or_item_ids(body2["input"].clone(), expected_input_2); diff --git a/codex-rs/core/tests/suite/rmcp_client.rs b/codex-rs/core/tests/suite/rmcp_client.rs index 7d9aad5741..64900ec022 100644 --- a/codex-rs/core/tests/suite/rmcp_client.rs +++ b/codex-rs/core/tests/suite/rmcp_client.rs @@ -1426,23 +1426,17 @@ async fn stdio_server_round_trip(server_name: &'static str, namespace: &str) -> wait_for_event(&fixture.codex, |ev| matches!(ev, EventMsg::TurnComplete(_))).await; - let search_request = search_mock.single_request().body_json(); - let search_description = search_request - .get("tools") - .and_then(Value::as_array) - .and_then(|tools| { - tools - .iter() - .find(|tool| tool.get("type").and_then(Value::as_str) == Some("tool_search")) - }) - .and_then(|tool| tool.get("description").and_then(Value::as_str)) - .expect("the model should receive a tool search description"); + let search_request = search_mock.single_request(); + let tools_state = search_request + .message_input_texts("developer") + .into_iter() + .find(|text| text.starts_with("")) + .expect("the model should receive the deferred tools block"); assert!( - search_description.len() < 513 * 1024, - "the complete tool search description must remain bounded" + tools_state.len() <= 4 * 1024, + "the deferred tools block must remain bounded" ); - assert!(search_description.contains(&format!("- {server_name}: {expected_description}"))); - assert!(search_description.contains("🦀keep the complete MCP metadata")); + assert!(tools_state.contains(&format!("- {namespace}: "))); let search_output = call_mock .single_request() diff --git a/codex-rs/core/tests/suite/search_tool.rs b/codex-rs/core/tests/suite/search_tool.rs index ac2981427a..a917925c02 100644 --- a/codex-rs/core/tests/suite/search_tool.rs +++ b/codex-rs/core/tests/suite/search_tool.rs @@ -373,49 +373,7 @@ async fn app_search_sources_are_hidden_for_api_key_auth() -> Result<()> { } #[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn search_tool_adds_discovery_instructions_to_tool_description() -> Result<()> { - skip_if_no_network!(Ok(())); - - let server = start_mock_server().await; - let apps_server = AppsTestServer::mount_searchable(&server).await?; - let mock = mount_sse_once( - &server, - sse(vec![ - ev_response_created("resp-1"), - ev_assistant_message("msg-1", "done"), - ev_completed("resp-1"), - ]), - ) - .await; - - let mut builder = configured_builder(apps_server.chatgpt_base_url.clone()); - let test = builder.build_with_auto_env(&server).await?; - - test.submit_turn_with_approval_and_permission_profile( - "list tools", - AskForApproval::Never, - PermissionProfile::Disabled, - ) - .await?; - - let body = mock.single_request().body_json(); - let description = tool_search_description(&body).expect("tool_search description should exist"); - assert!( - SEARCH_TOOL_DESCRIPTION_SNIPPETS - .iter() - .all(|snippet| description.contains(snippet)), - "tool_search description should include the updated workflow: {description:?}" - ); - assert!( - !description.contains("remainder of the current session/thread"), - "tool_search description should not mention legacy client-side persistence: {description:?}" - ); - - Ok(()) -} - -#[tokio::test(flavor = "multi_thread", worker_threads = 2)] -async fn search_tool_omits_sources_when_deferred_tool_world_state_is_enabled() -> Result<()> { +async fn search_tool_adds_discovery_instructions_when_world_state_is_disabled() -> Result<()> { skip_if_no_network!(Ok(())); let server = start_mock_server().await; @@ -434,10 +392,60 @@ async fn search_tool_omits_sources_when_deferred_tool_world_state_is_enabled() - configured_builder(apps_server.chatgpt_base_url.clone()).with_config(|config| { config .features - .enable(Feature::DeferredToolWorldState) + .disable(Feature::DeferredToolWorldState) .expect("test config should allow feature update"); }); let test = builder.build_with_auto_env(&server).await?; + + test.submit_turn_with_approval_and_permission_profile( + "list tools", + AskForApproval::Never, + PermissionProfile::Disabled, + ) + .await?; + + let request = mock.single_request(); + assert!( + request + .message_input_texts("developer") + .into_iter() + .all(|text| !text.contains("")), + "explicitly disabling deferred tool world state must omit the tools block" + ); + let body = request.body_json(); + let description = tool_search_description(&body).expect("tool_search description should exist"); + assert!( + SEARCH_TOOL_DESCRIPTION_SNIPPETS + .iter() + .all(|snippet| description.contains(snippet)), + "tool_search description should include the updated workflow: {description:?}" + ); + assert!( + !description.contains("remainder of the current session/thread"), + "tool_search description should not mention legacy client-side persistence: {description:?}" + ); + + Ok(()) +} + +#[tokio::test(flavor = "multi_thread", worker_threads = 2)] +async fn search_tool_omits_sources_with_deferred_tool_world_state_by_default() -> Result<()> { + skip_if_no_network!(Ok(())); + + let server = start_mock_server().await; + let apps_server = AppsTestServer::mount_searchable(&server).await?; + let mock = mount_sse_once( + &server, + sse(vec![ + ev_response_created("resp-1"), + ev_assistant_message("msg-1", "done"), + ev_completed("resp-1"), + ]), + ) + .await; + + let mut builder = configured_builder(apps_server.chatgpt_base_url.clone()); + let test = builder.build_with_auto_env(&server).await?; test.submit_turn_with_approval_and_permission_profile( "list tools", AskForApproval::Never, diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__additional_context__additional_context_simple_input.snap b/codex-rs/core/tests/suite/snapshots/all__suite__additional_context__additional_context_simple_input.snap index 7512e45c0c..00b33de5ba 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__additional_context__additional_context_simple_input.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__additional_context__additional_context_simple_input.snap @@ -8,8 +8,12 @@ Scenario: additional context is inserted before the user turn input. -- request 1 (turn; Request) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/developer: run one 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__compact__manual_compact_with_history_shapes.snap b/codex-rs/core/tests/suite/snapshots/all__suite__compact__manual_compact_with_history_shapes.snap index bf1959455c..f7ea8a443c 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__compact__manual_compact_with_history_shapes.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__compact__manual_compact_with_history_shapes.snap @@ -8,8 +8,12 @@ Scenario: Manual /compact with prior user history compacts existing history and -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -19,8 +23,12 @@ Scenario: Manual /compact with prior user history compacts existing history and -- request 2 (compaction) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -34,8 +42,12 @@ Scenario: Manual /compact with prior user history compacts existing history and -- request 3 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -50,8 +62,12 @@ Scenario: Manual /compact with prior user history compacts existing history and -- request 4 (compaction) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -72,8 +88,12 @@ Scenario: Manual /compact with prior user history compacts existing history and 01:message/user: first manual turn -02:message/developer: - +02:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: 04:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__compact__manual_compact_without_prev_user_shapes.snap b/codex-rs/core/tests/suite/snapshots/all__suite__compact__manual_compact_without_prev_user_shapes.snap index 8f6cfd5b5a..be004961ca 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__compact__manual_compact_without_prev_user_shapes.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__compact__manual_compact_without_prev_user_shapes.snap @@ -15,8 +15,12 @@ Scenario: Manual /compact with no prior user turn currently still issues a compa -- request 2 (turn; Local Post-Compaction History Layout) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__compact__mid_turn_compaction_shapes.snap b/codex-rs/core/tests/suite/snapshots/all__suite__compact__mid_turn_compaction_shapes.snap index 8dff5d6c87..94f62e790a 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__compact__mid_turn_compaction_shapes.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__compact__mid_turn_compaction_shapes.snap @@ -8,8 +8,12 @@ Scenario: True mid-turn continuation compaction after tool output: compact reque -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -19,8 +23,12 @@ Scenario: True mid-turn continuation compaction after tool output: compact reque -- request 2 (compaction) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -34,8 +42,12 @@ Scenario: True mid-turn continuation compaction after tool output: compact reque -- request 3 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_sampling_model_switch_compaction_shapes.snap b/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_sampling_model_switch_compaction_shapes.snap index f24793f618..dc79dced72 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_sampling_model_switch_compaction_shapes.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_sampling_model_switch_compaction_shapes.snap @@ -8,8 +8,12 @@ Scenario: Pre-sampling compaction on model switch to a smaller context window: c -- request 1 (turn; Initial Request (Previous Model)) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -19,8 +23,12 @@ Scenario: Pre-sampling compaction on model switch to a smaller context window: c -- request 2 (compaction; Pre-sampling Compaction Request) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -34,9 +42,13 @@ Scenario: Pre-sampling compaction on model switch to a smaller context window: c -- request 3 (turn; Post-Compaction Follow-up Request (Next Model)) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_context_window_exceeded_shapes.snap b/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_context_window_exceeded_shapes.snap index c7fbb0ca90..da77364e28 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_context_window_exceeded_shapes.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_context_window_exceeded_shapes.snap @@ -8,8 +8,12 @@ Scenario: Pre-turn auto-compaction context-window failure: compaction request ex -- request 1 (compaction; Local Compaction Request (Incoming User Excluded)) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_including_incoming_shapes.snap b/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_including_incoming_shapes.snap index 36ad18f9e1..5842ce94ee 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_including_incoming_shapes.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_including_incoming_shapes.snap @@ -8,8 +8,12 @@ Scenario: Pre-turn auto-compaction uses the prior context without the incoming u -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -24,8 +28,12 @@ Scenario: Pre-turn auto-compaction uses the prior context without the incoming u -- request 3 (compaction) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -45,8 +53,12 @@ Scenario: Pre-turn auto-compaction uses the prior context without the incoming u 01:message/user: USER_ONE -02:message/developer: - +02:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: 04:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_strips_incoming_model_switch_shapes.snap b/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_strips_incoming_model_switch_shapes.snap index 6d81579582..1accfc0319 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_strips_incoming_model_switch_shapes.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__compact__pre_turn_compaction_strips_incoming_model_switch_shapes.snap @@ -8,8 +8,12 @@ Scenario: Pre-turn compaction during model switch (without pre-sampling model-sw -- request 1 (turn; Initial Request (Previous Model)) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -19,8 +23,12 @@ Scenario: Pre-turn compaction during model switch (without pre-sampling model-sw -- request 2 (compaction; Local Compaction Request) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__executor_discovery_v2__plugin_acceptance_auth_refresh.snap b/codex-rs/core/tests/suite/snapshots/all__suite__executor_discovery_v2__plugin_acceptance_auth_refresh.snap index 094d58a531..bfb42a3ee7 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__executor_discovery_v2__plugin_acceptance_auth_refresh.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__executor_discovery_v2__plugin_acceptance_auth_refresh.snap @@ -8,11 +8,16 @@ Scenario: Mid-turn auth refresh preserves skill context and executor access. Rev -- request 1 (request) -- 00:message/developer: -01:message/developer[4]: +01:message/developer[5]: [01] [02] [03] - [04] + [04] + Deferred tool namespaces: + - mcp__codex_apps__calendar: Plan events and manage your calendar. + - multi_agent_v1: Tools for spawning and managing sub-agents. + + [05] 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_cwd_change_refreshes_agents.snap b/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_cwd_change_refreshes_agents.snap index dc8e7eb97a..8eb8a5f041 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_cwd_change_refreshes_agents.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_cwd_change_refreshes_agents.snap @@ -8,9 +8,13 @@ Scenario: Second turn changes cwd to a directory with different AGENTS.md and re -- request 1 (turn; First Request (agents_one)) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user[2]: [01] [02] diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_resume_with_personality_change.snap b/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_resume_with_personality_change.snap index 95d83ba66b..ddfca10c2f 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_resume_with_personality_change.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_resume_with_personality_change.snap @@ -8,9 +8,13 @@ Scenario: First post-resume turn where resumed config model differs from rollout -- request 1 (turn; Last Request Before Resume) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -20,9 +24,13 @@ Scenario: First post-resume turn where resumed config model differs from rollout -- request 2 (turn; First Request After Resume) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_turn_overrides.snap b/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_turn_overrides.snap index 679ded9c30..88466f6f80 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_turn_overrides.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__model_visible_layout__model_visible_layout_turn_overrides.snap @@ -8,9 +8,13 @@ Scenario: Second turn changes cwd and approval policy while keeping model consta -- request 1 (turn; First Request (Baseline)) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__additional_context_legacy_messages.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__additional_context_legacy_messages.snap index 112e945915..a3b763acb7 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__additional_context_legacy_messages.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__additional_context_legacy_messages.snap @@ -8,8 +8,12 @@ Scenario: Named context changes are appended before the user; unchanged values a -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/developer: Keep the answer brief. 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__additional_context_tool_outputs.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__additional_context_tool_outputs.snap index 3f50e94cf4..12fd4b5adc 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__additional_context_tool_outputs.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__additional_context_tool_outputs.snap @@ -8,8 +8,12 @@ Scenario: Named context changes are appended before the user; unchanged values a -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/developer: Keep the answer brief. 03:function_call_output/agent.browser:The launch is on Monday. diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__admitted_prompt_id_reaches_responses.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__admitted_prompt_id_reaches_responses.snap index f099672ffa..42d9dc85bc 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__admitted_prompt_id_reaches_responses.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__admitted_prompt_id_reaches_responses.snap @@ -8,8 +8,12 @@ Scenario: An admitted prompt and an ordinary prompt with identical text reach Re -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: Repeat this input. -- request 2 (turn) -- diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__app_tool_exposure_CodeModeOnly.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__app_tool_exposure_CodeModeOnly.snap index 708b4a90b4..2044f7b8b1 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__app_tool_exposure_CodeModeOnly.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__app_tool_exposure_CodeModeOnly.snap @@ -23,9 +23,14 @@ Settings: -- request 1 (turn) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - mcp__codex_apps__notes: Tools for working with notes. + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_plugin_refresh_simplified_selection_hints_off.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_plugin_refresh_simplified_selection_hints_off.snap index ab2bdb94f8..e5fd89c09f 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_plugin_refresh_simplified_selection_hints_off.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_plugin_refresh_simplified_selection_hints_off.snap @@ -110,15 +110,19 @@ Settings: -- request 3 (turn) -- 10:message/assistant: The Notes tool is not installed yet. -11:message/developer: - - ## Skills - A skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Below is the list ...ed into an absolute path using the skill roots table. [hash=ca27c3957f42502b] - ### Skill roots - - `r0` = `/test` - ### Available skills - - notes:summarize: Summarize team notes (file: r0/notes/local/skills/summarize/SKILL.md) - +11:message/developer[2]: + [01] + ## Skills + A skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Below is the list ...ed into an absolute path using the skill roots table. [hash=ca27c3957f42502b] + ### Skill roots + - `r0` = `/test` + ### Available skills + - notes:summarize: Summarize team notes (file: r0/notes/local/skills/summarize/SKILL.md) + + [02] + Deferred tool namespaces: + - mcp__notes: Use these tools to exercise the rmcp test server. + 12:message/user: I installed Notes. Use $notes:summarize and the Notes tool to check that Mira owns the kickoff. 13:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_plugin_refresh_simplified_selection_hints_on.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_plugin_refresh_simplified_selection_hints_on.snap index 8d422f3053..0d9ca37714 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_plugin_refresh_simplified_selection_hints_on.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_plugin_refresh_simplified_selection_hints_on.snap @@ -110,15 +110,19 @@ Settings: -- request 3 (turn) -- 10:message/assistant: The Notes tool is not installed yet. -11:message/developer: - - ## Skills - A skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Below is the list ...ed into an absolute path using the skill roots table. [hash=ca27c3957f42502b] - ### Skill roots - - `r0` = `/test` - ### Available skills - - notes:summarize: Summarize team notes (file: r0/notes/local/skills/summarize/SKILL.md) - +11:message/developer[2]: + [01] + ## Skills + A skill is a set of local instructions to follow that is stored in a `SKILL.md` file. Below is the list ...ed into an absolute path using the skill roots table. [hash=ca27c3957f42502b] + ### Skill roots + - `r0` = `/test` + ### Available skills + - notes:summarize: Summarize team notes (file: r0/notes/local/skills/summarize/SKILL.md) + + [02] + Deferred tool namespaces: + - mcp__notes: Use these tools to exercise the rmcp test server. + 12:message/user: I installed Notes. Use $notes:summarize and the Notes tool to check that Mira owns the kickoff. 13:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_settings_release_check_tool_shapes.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_settings_release_check_tool_shapes.snap index 9e6a039161..82fc3fd517 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_settings_release_check_tool_shapes.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__astra_settings_release_check_tool_shapes.snap @@ -49,7 +49,7 @@ Settings: - Relevance: Determine what a plugin can help with from explicit user mention or from the plugin-associa..., MCP tools, and apps exposed elsewhere in this turn. [hash=620459a4e7b590f0] - Missing/blocked: If the user requests a plugin that does not have relevant callable capabilities for t..., say so briefly and continue with the best fallback. [hash=746b0469a8f6cb3e] -02:message/developer[2]: +02:message/developer[3]: [01] Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-full-access`...ll commands are permitted. Network access is enabled. [hash=c134061cebb94a1b] Approval policy is currently never. Do not provide the `sandbox_permissions` for any reason, commands will be rejected. @@ -70,6 +70,10 @@ Settings: Never use the `request_user_input` tool for permission requests or permission-related escalations. + [03] + Deferred tool namespaces: + - mcp__rmcp: Use these tools to exercise the rmcp test server. + 03:message/developer: You are `/root`, the primary agent in a team of agents collaborating to fulfill the user's goals. diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__code_mode_catalog_messages.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__code_mode_catalog_messages.snap index 91450ccb5c..0fbd4c3121 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__code_mode_catalog_messages.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__code_mode_catalog_messages.snap @@ -49,7 +49,7 @@ Settings: - Relevance: Determine what a plugin can help with from explicit user mention or from the plugin-associa..., MCP tools, and apps exposed elsewhere in this turn. [hash=620459a4e7b590f0] - Missing/blocked: If the user requests a plugin that does not have relevant callable capabilities for t..., say so briefly and continue with the best fallback. [hash=746b0469a8f6cb3e] -01:message/developer[2]: +01:message/developer[3]: [01] Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-full-access`...ll commands are permitted. Network access is enabled. [hash=c134061cebb94a1b] Approval policy is currently never. Do not provide the `sandbox_permissions` for any reason, commands will be rejected. @@ -70,6 +70,10 @@ Settings: Never use the `request_user_input` tool for permission requests or permission-related escalations. + [03] + Deferred tool namespaces: + - mcp__codex_apps__calendar: Plan events and manage your calendar. + 02:message/developer: You are `/root`, the primary agent in a team of agents collaborating to fulfill the user's goals. diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__code_mode_catalog_messages_ranked_search.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__code_mode_catalog_messages_ranked_search.snap index 0cc6f342e9..6b4a4634a1 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__code_mode_catalog_messages_ranked_search.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__code_mode_catalog_messages_ranked_search.snap @@ -49,7 +49,7 @@ Settings: - Relevance: Determine what a plugin can help with from explicit user mention or from the plugin-associa..., MCP tools, and apps exposed elsewhere in this turn. [hash=620459a4e7b590f0] - Missing/blocked: If the user requests a plugin that does not have relevant callable capabilities for t..., say so briefly and continue with the best fallback. [hash=746b0469a8f6cb3e] -01:message/developer[2]: +01:message/developer[3]: [01] Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-full-access`...ll commands are permitted. Network access is enabled. [hash=c134061cebb94a1b] Approval policy is currently never. Do not provide the `sandbox_permissions` for any reason, commands will be rejected. @@ -70,6 +70,10 @@ Settings: Never use the `request_user_input` tool for permission requests or permission-related escalations. + [03] + Deferred tool namespaces: + - mcp__codex_apps__calendar: Plan events and manage your calendar. + 02:message/developer: You are `/root`, the primary agent in a team of agents collaborating to fulfill the user's goals. diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__content_filter__content_filter_guidance.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__content_filter__content_filter_guidance.snap index ff9b827c29..5b7bc6f31e 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__content_filter__content_filter_guidance.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__content_filter__content_filter_guidance.snap @@ -8,8 +8,12 @@ Scenario: Repeated content-filter blocks append catalog guidance and retain deli -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__context_management_tools__catalog_context_tool_definitions_follow_captured_models.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__context_management_tools__catalog_context_tool_definitions_follow_captured_models.snap index 2985ef461d..f3abe1873e 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__context_management_tools__catalog_context_tool_definitions_follow_captured_models.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__context_management_tools__catalog_context_tool_definitions_follow_captured_models.snap @@ -15,7 +15,7 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (9; hash=2f5d124739fef213): + tools (9; hash=351b20e3aa629305): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/request_user_input: Request user input for one to three short questions and wait for the response. This tool is only ...; args=[questions]; hash=64a729b25c424fc6 @@ -23,13 +23,17 @@ Settings: - function/get_context_remaining: Catalog context guidance.; args=[]; hash=802b1cf4a796b439 - custom/apply_patch: The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the pat...; hash=dea9f12b0111a4ba - function/view_image: View a local image file from the filesystem when visual inspection is needed. Use this for images...; args=[detail, path]; hash=3b766d5bdec5d50e - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=f103e327c6870a46 -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/developer[3]: [01] [02] @@ -46,14 +50,18 @@ Settings: ## Window 2 (after request 1) Settings: relative to window 1 model: "context-tools-updated" - tools (9; hash=bc76e2d214a3ede5): + tools (9; hash=6f6db580112d2227): ~ function/new_context; args=[]; hash=b9263827b0adbb78 ~ function/get_context_remaining; args=[]; hash=3e96d66806c56bdd -- request 2 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/developer[3]: [01] [02] diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__credential_masking__remote_credential_masking.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__credential_masking__remote_credential_masking.snap index c2b061d2aa..228dad22f1 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__credential_masking__remote_credential_masking.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__credential_masking__remote_credential_masking.snap @@ -8,8 +8,12 @@ Scenario: A remote executor masks its credential before the command output reach -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__credential_masking__remote_credential_masking_zsh.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__credential_masking__remote_credential_masking_zsh.snap index 5af06702d2..0126f8b8d7 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__credential_masking__remote_credential_masking_zsh.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__credential_masking__remote_credential_masking_zsh.snap @@ -8,8 +8,12 @@ Scenario: A remote executor masks its credential before the command output reach -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_checkpoint_migration.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_checkpoint_migration.snap index a00de7a1f5..6eb2f12c77 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_checkpoint_migration.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_checkpoint_migration.snap @@ -15,13 +15,13 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (7; hash=c7eaf521f176989a): + tools (7; hash=f47d2e65b8d3bd06): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/request_user_input: Request user input for one to three short questions and wait for the response. This tool is only ...; args=[questions]; hash=7c8f464569dbaa9c - custom/apply_patch: The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the pat...; hash=dea9f12b0111a4ba - function/view_image: View a local image file from the filesystem when visual inspection is needed. Use this for images...; args=[detail, path]; hash=3b766d5bdec5d50e - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=f103e327c6870a46 -- request 1 (turn) -- 00:message/developer: @@ -29,8 +29,12 @@ Settings: 01:compaction:encrypted=true; chars=17; hash=3733598f92aa081a 02:message/user: Keep the working tree unchanged. -03:message/developer: - +03:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 04:message/user: 05:message/user: @@ -59,8 +63,12 @@ Settings: relative to window 1 02:message/user: Keep the working tree unchanged. -03:message/developer: - +03:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 04:message/user: 05:message/user: @@ -186,8 +194,12 @@ Settings: same as window 2 02:message/user: Keep the working tree unchanged. -03:message/developer: - +03:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 04:message/user: 05:message/user: @@ -218,8 +230,12 @@ Settings: same as window 2 Confirm where publishing is allowed. 04:message/user: Continue with the new model. -05:message/developer: - +05:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 06:message/user: 07:message/user: @@ -342,8 +358,12 @@ Settings: same as window 2 Confirm where publishing is allowed. 04:message/user: Continue with the new model. -05:message/developer: - +05:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 06:message/user: 07:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_code_mode_messaging.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_code_mode_messaging.snap index 50e04f491c..2a8ddef117 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_code_mode_messaging.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_code_mode_messaging.snap @@ -8,9 +8,13 @@ Scenario: A root uses Code Mode to send a confirmation and receives a real user -- request 1 (turn) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - mcp__codex_apps__user_message: Tools for working with user_message. + 02:message/developer: You are `/root`, the primary agent in a team of agents collaborating to fulfill the user's goals. @@ -52,9 +56,13 @@ Scenario: A root uses Code Mode to send a confirmation and receives a real user -- request 5 (turn) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - mcp__codex_apps__user_message: Tools for working with user_message. + 02:message/developer: You are `/root`, the primary agent in a team of agents collaborating to fulfill the user's goals. diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_extra_policy__extra_policy_reaches_guardian_review.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_extra_policy__extra_policy_reaches_guardian_review.snap index eccb34211f..a42476eddd 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_extra_policy__extra_policy_reaches_guardian_review.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_extra_policy__extra_policy_reaches_guardian_review.snap @@ -15,13 +15,13 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (7; hash=9ca29162272b7d54): + tools (7; hash=994c9baf5d9a36a0): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/request_user_input: Request user input for one to three short questions and wait for the response. This tool is only ...; args=[questions]; hash=64a729b25c424fc6 - custom/apply_patch: The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the pat...; hash=dea9f12b0111a4ba - function/view_image: View a local image file from the filesystem when visual inspection is needed. Use this for images...; args=[detail, path]; hash=3b766d5bdec5d50e - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=f103e327c6870a46 -- request 1 (turn) -- 00:message/developer: @@ -46,24 +46,28 @@ Settings: User set the goal: "Inspect the workspace; do not run commands outside the sandbox." -02:message/developer: - - Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-only`: The san... permits reading files. Network access is restricted. [hash=be7da4425f89053c] - # Escalation Requests +02:message/developer[2]: + [01] + Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-only`: The san... permits reading files. Network access is restricted. [hash=be7da4425f89053c] + # Escalation Requests - Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] + Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] - - Pipes: | - - Logical operators: &&, || - - Good examples of prefixes: - - ["npm", "run", "dev"] - - ["gh", "pr", "check"] - - ["cargo", "test"] + - Pipes: | + - Logical operators: &&, || + + Good examples of prefixes: + - ["npm", "run", "dev"] + - ["gh", "pr", "check"] + - ["cargo", "test"] - `approvals_reviewer` is `auto_review`: Sandbox escalations with require_escalated will be reviewed for c...he risk and send a final message to ask for approval. [hash=c592d119d24cd2d6] - + `approvals_reviewer` is `auto_review`: Sandbox escalations with require_escalated will be reviewed for c...he risk and send a final message to ask for approval. [hash=c592d119d24cd2d6] + + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: @@ -206,24 +210,28 @@ Settings: same as window 1 User set the goal: "Inspect the workspace; do not run commands outside the sandbox." -02:message/developer: - - Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-only`: The san... permits reading files. Network access is restricted. [hash=be7da4425f89053c] - # Escalation Requests +02:message/developer[2]: + [01] + Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-only`: The san... permits reading files. Network access is restricted. [hash=be7da4425f89053c] + # Escalation Requests - Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] + Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] - - Pipes: | - - Logical operators: &&, || - - Good examples of prefixes: - - ["npm", "run", "dev"] - - ["gh", "pr", "check"] - - ["cargo", "test"] + - Pipes: | + - Logical operators: &&, || + + Good examples of prefixes: + - ["npm", "run", "dev"] + - ["gh", "pr", "check"] + - ["cargo", "test"] - `approvals_reviewer` is `auto_review`: Sandbox escalations with require_escalated will be reviewed for c...he risk and send a final message to ask for approval. [hash=c592d119d24cd2d6] - + `approvals_reviewer` is `auto_review`: Sandbox escalations with require_escalated will be reviewed for c...he risk and send a final message to ask for approval. [hash=c592d119d24cd2d6] + + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_heartbeat__heartbeat_repetitions_keep_later_human_authorization.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_heartbeat__heartbeat_repetitions_keep_later_human_authorization.snap index ac9ea9767f..bdd2d6d2b0 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_heartbeat__heartbeat_repetitions_keep_later_human_authorization.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_heartbeat__heartbeat_repetitions_keep_later_human_authorization.snap @@ -8,8 +8,12 @@ Scenario: Three scheduled runs share one instruction body, a human overrides its -- request 1 (request) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -173,8 +177,12 @@ Scenario: Three scheduled runs share one instruction body, a human overrides its -- request 7 (request) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_orchestrator_connector__host_owned_orchestrator_connector_request_history.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_orchestrator_connector__host_owned_orchestrator_connector_request_history.snap index 3701040c32..d9d02a556f 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_orchestrator_connector__host_owned_orchestrator_connector_request_history.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_orchestrator_connector__host_owned_orchestrator_connector_request_history.snap @@ -9,9 +9,14 @@ Scenario: Guardian reviews a host-owned orchestrator connector, then the parent -- request 1 (request) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - mcp__codex_apps__calendar: Plan events and manage your calendar. + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -154,9 +159,14 @@ Scenario: Guardian reviews a host-owned orchestrator connector, then the parent -- request 4 (request) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - mcp__codex_apps__calendar: Plan events and manage your calendar. + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_sender_context__cross_host_sender_context.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_sender_context__cross_host_sender_context.snap index b4392fbd4b..4d38c6b29c 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_sender_context__cross_host_sender_context.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__guardian_sender_context__cross_host_sender_context.snap @@ -15,19 +15,23 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (7; hash=9ca29162272b7d54): + tools (7; hash=994c9baf5d9a36a0): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/request_user_input: Request user input for one to three short questions and wait for the response. This tool is only ...; args=[questions]; hash=64a729b25c424fc6 - custom/apply_patch: The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the pat...; hash=dea9f12b0111a4ba - function/view_image: View a local image file from the filesystem when visual inspection is needed. Use this for images...; args=[detail, path]; hash=3b766d5bdec5d50e - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=f103e327c6870a46 -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -49,8 +53,12 @@ Settings: same as window 1 01:message/user: Inspect the staging job. -02:message/developer: - +02:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: 04:message/user: @@ -65,8 +73,12 @@ Settings: relative to window 2 -- request 5 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:function_call_output/cloud_threads.send_message:Inspect. @@ -146,8 +158,12 @@ Settings: same as window 3 -- request 7 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:function_call_output/cloud_threads.send_message:Inspect. diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools__incremental_tools.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools__incremental_tools.snap index 6e02804c35..0a5e7cbacf 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools__incremental_tools.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools__incremental_tools.snap @@ -16,7 +16,7 @@ Settings: text: {"verbosity":"low"} tool_choice: "auto" -- request 1 (turn) -- -00:additional_tools/developer (2; hash=49f981f03ae5c5ce): +00:additional_tools/developer (2; hash=b07492b5514a41d0): - namespace/functions; hash=cc6e8cf0e5405f3a - custom/exec - function/wait @@ -25,11 +25,15 @@ Settings: - function/request_user_input - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: -02:message/developer: - +02:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: 04:message/user: @@ -42,7 +46,7 @@ Settings: Settings: relative to window 1 model: "updated-tools-model" -- request 3 (turn) -- -00:additional_tools/developer (2; hash=49f981f03ae5c5ce): +00:additional_tools/developer (2; hash=b07492b5514a41d0): - namespace/functions; hash=cc6e8cf0e5405f3a - custom/exec - function/wait @@ -51,11 +55,15 @@ Settings: relative to window 1 - function/request_user_input - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: -02:message/developer: - +02:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: 04:message/user: @@ -85,7 +93,7 @@ Settings: relative to window 1 ## Window 3 (after request 5: input diverged at item 00) Settings: same as window 2 -- request 6 (turn) -- -00:additional_tools/developer (2; hash=1322c3a339378659): +00:additional_tools/developer (2; hash=f9f0840b2e42f7f5): - namespace/functions; hash=9d5d7a0adab05fef - custom/exec - function/wait @@ -94,7 +102,7 @@ Settings: same as window 2 - function/request_user_input - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: 02:message/user: @@ -103,8 +111,12 @@ Settings: same as window 2 Continue with the same tools. 04:message/user: Continue with the updated execution instructions. -05:message/developer: - +05:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 06:message/user: 07:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools__incremental_tools_responses_api.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools__incremental_tools_responses_api.snap index 1a2a3c8593..89fc6a472f 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools__incremental_tools_responses_api.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools__incremental_tools_responses_api.snap @@ -15,7 +15,7 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (9; hash=b0011e3ae8ca7fd2): + tools (9; hash=7ebf49dda2901fbc): - custom/exec: Run JavaScript code to orchestrate/compose tool calls - Evaluates the provided JavaScript code in...; hash=3b60611486072e76 - function/wait: Waits on a yielded `exec` cell and returns new output or completion. - Use `wait` only after `exe...; args=[cell_id, max_tokens, terminate, yield_time_ms]; hash=6692d8f6c55be489 - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction. exec tool dec...; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=759843fc2a7d41a0 @@ -23,13 +23,17 @@ Settings: - function/request_user_input: Request user input for one to three short questions and wait for the response. This tool is only ...; args=[questions]; hash=64a729b25c424fc6 - custom/apply_patch: The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the pat...; hash=11c5b5ed4fb972e8 - function/view_image: View a local image file from the filesystem when visual inspection is needed. Use this for images...; args=[detail, path]; hash=1b87dd8874f6fa10 - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=e214d4db1bc49e89 -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: @@ -41,13 +45,17 @@ Settings: ## Window 2 (after request 2) Settings: relative to window 1 model: "updated-tools-model" - tools (9; hash=717c46ada005dfd7): + tools (9; hash=6531bfd30ee7d343): ~ custom/exec: Updated execution instructions. Some deferred nested tools may be omitted from this description....; hash=7af6961848c10849 -- request 3 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__disable_incremental_tools.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__disable_incremental_tools.snap index 54f4bd41dd..b774f42d52 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__disable_incremental_tools.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__disable_incremental_tools.snap @@ -16,18 +16,22 @@ Settings: text: {"verbosity":"low"} tool_choice: "auto" -- request 1 (turn) -- -00:additional_tools/developer (2; hash=44f4cad2ce4ab17d): +00:additional_tools/developer (2; hash=7b4c6a992fd91f91): - namespace/functions; hash=101d32aa59ea258b - function/exec_command - function/write_stdin - function/request_user_input - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: -02:message/developer: - +02:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: 04:message/user: @@ -52,19 +56,23 @@ Settings: ## Window 2 (after request 3: input diverged at item 00) Settings: same as window 1 -- request 4 (turn) -- -00:additional_tools/developer (2; hash=434a400f3708d1bc): +00:additional_tools/developer (2; hash=3b0da5c6c5e4fd8e): - namespace/functions; hash=36c9912d971c5be8 - function/update_plan - function/request_user_input - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: 02:message/user: Begin with all tools. -03:message/developer: - +03:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 04:message/user: 05:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__legacy_resume_remote_compaction.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__legacy_resume_remote_compaction.snap index 4f7dde808a..96ac689242 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__legacy_resume_remote_compaction.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__legacy_resume_remote_compaction.snap @@ -16,7 +16,7 @@ Settings: text: {"verbosity":"low"} tool_choice: "auto" -- request 1 (turn) -- -00:additional_tools/developer (2; hash=49f981f03ae5c5ce): +00:additional_tools/developer (2; hash=b07492b5514a41d0): - namespace/functions; hash=cc6e8cf0e5405f3a - custom/exec - function/wait @@ -25,11 +25,15 @@ Settings: - function/request_user_input - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: -02:message/developer: - +02:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: 04:message/user: @@ -45,7 +49,7 @@ Settings: ## Window 2 (after request 3: input diverged at item 02) Settings: same as window 1 -- request 4 (turn) -- -00:additional_tools/developer (2; hash=49f981f03ae5c5ce): +00:additional_tools/developer (2; hash=b07492b5514a41d0): - namespace/functions; hash=cc6e8cf0e5405f3a - custom/exec - function/wait @@ -54,13 +58,17 @@ Settings: same as window 1 - function/request_user_input - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: 02:message/user: Begin with the legacy tool prefix. -03:message/developer: - +03:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 04:message/user: 05:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__legacy_resume_window_reset.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__legacy_resume_window_reset.snap index a4594486b8..167399454c 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__legacy_resume_window_reset.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__incremental_tools_resume__legacy_resume_window_reset.snap @@ -16,7 +16,7 @@ Settings: text: {"verbosity":"low"} tool_choice: "auto" -- request 1 (turn) -- -00:additional_tools/developer (2; hash=30feffe01b108a65): +00:additional_tools/developer (2; hash=f1d0adb3566d1b59): - namespace/functions; hash=dfb4b8684addc20d - custom/exec - function/wait @@ -27,11 +27,15 @@ Settings: - function/get_context_remaining - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: -02:message/developer: - +02:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/developer[3]: [01] [02] @@ -53,7 +57,7 @@ Settings: ## Window 2 (after request 2: input diverged at item 03) Settings: same as window 1 -- request 3 (turn) -- -00:additional_tools/developer (2; hash=30feffe01b108a65): +00:additional_tools/developer (2; hash=f1d0adb3566d1b59): - namespace/functions; hash=dfb4b8684addc20d - custom/exec - function/wait @@ -64,11 +68,15 @@ Settings: same as window 1 - function/get_context_remaining - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: -02:message/developer: - +02:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/developer[3]: [01] [02] diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__managed_human_approval__managed_checkpoint_requires_fresh_human_decisions.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__managed_human_approval__managed_checkpoint_requires_fresh_human_decisions.snap index 723d54493b..dea3db191c 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__managed_human_approval__managed_checkpoint_requires_fresh_human_decisions.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__managed_human_approval__managed_checkpoint_requires_fresh_human_decisions.snap @@ -8,8 +8,12 @@ Scenario: Managed command checkpoints override saved allow rules and automatic r -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__mcp_resource_messages__mcp_resource_messages.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__mcp_resource_messages__mcp_resource_messages.snap index 984bfdddbf..196308756b 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__mcp_resource_messages__mcp_resource_messages.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__mcp_resource_messages__mcp_resource_messages.snap @@ -49,7 +49,7 @@ Settings: - Relevance: Determine what a plugin can help with from explicit user mention or from the plugin-associa..., MCP tools, and apps exposed elsewhere in this turn. [hash=620459a4e7b590f0] - Missing/blocked: If the user requests a plugin that does not have relevant callable capabilities for t..., say so briefly and continue with the best fallback. [hash=746b0469a8f6cb3e] -01:message/developer[2]: +01:message/developer[3]: [01] Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `danger-full-access`...ll commands are permitted. Network access is enabled. [hash=c134061cebb94a1b] Approval policy is currently never. Do not provide the `sandbox_permissions` for any reason, commands will be rejected. @@ -70,6 +70,10 @@ Settings: Never use the `request_user_input` tool for permission requests or permission-related escalations. + [03] + Deferred tool namespaces: + - mcp__resources: Use these tools to exercise the rmcp test server. + 02:message/developer: You are `/root`, the primary agent in a team of agents collaborating to fulfill the user's goals. diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__mxc__preferred_mxc_permissions.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__mxc__preferred_mxc_permissions.snap index 2e77e6b0bd..963fd81194 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__mxc__preferred_mxc_permissions.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__mxc__preferred_mxc_permissions.snap @@ -24,24 +24,28 @@ Scenario: Resolved local MXC selection preserves workspace-write permissions in - Before performing file edits of any kind, you provide updates explaining what edits you are making. - Tone of your updates must match your personality. -01:message/developer: - - Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `workspace-write`: T...ries requires approval. Network access is restricted. [hash=99963de5837f6638] - # Escalation Requests +01:message/developer[2]: + [01] + Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `workspace-write`: T...ries requires approval. Network access is restricted. [hash=99963de5837f6638] + # Escalation Requests - Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] + Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] - - Pipes: | - - Logical operators: &&, || - + - Pipes: | + - Logical operators: &&, || + - ### Examples - Good examples of prefixes: - - ["npm", "run", "dev"] - - ["gh", "pr", "check"] - - ["cargo", "test"] - The writable root is ``. - + ### Examples + Good examples of prefixes: + - ["npm", "run", "dev"] + - ["gh", "pr", "check"] + - ["cargo", "test"] + The writable root is ``. + + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__partial_answers__partial_answer_continuation.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__partial_answers__partial_answer_continuation.snap index 71def9b1a1..7cad02f9ff 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__partial_answers__partial_answer_continuation.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__partial_answers__partial_answer_continuation.snap @@ -8,8 +8,12 @@ Scenario: A nonterminal answer continues sampling; its phase survives an ordinar -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__prediction_fork_inherits_parent_context.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__prediction_fork_inherits_parent_context.snap index 0dc61134a1..c125d36503 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__prediction_fork_inherits_parent_context.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__prediction_fork_inherits_parent_context.snap @@ -16,14 +16,14 @@ Settings: text: {"verbosity":"low"} tool_choice: "auto" -- request 1 (turn) -- -00:additional_tools/developer (2; hash=44f4cad2ce4ab17d): +00:additional_tools/developer (2; hash=7b4c6a992fd91f91): - namespace/functions; hash=101d32aa59ea258b - function/exec_command - function/write_stdin - function/request_user_input - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: You are Codex, a coding agent based on GPT-5. You and the user share one workspace, and your job is to c...rate with them until their goal is genuinely handled. [hash=2a3efec66e7f8963] @@ -42,24 +42,28 @@ Settings: - Before performing file edits of any kind, you provide updates explaining what edits you are making. - Tone of your updates must match your personality. -02:message/developer: - - Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-only`: The san... permits reading files. Network access is restricted. [hash=be7da4425f89053c] - # Escalation Requests +02:message/developer[2]: + [01] + Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-only`: The san... permits reading files. Network access is restricted. [hash=be7da4425f89053c] + # Escalation Requests - Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] + Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] - - Pipes: | - - Logical operators: &&, || - - NEVER provide a prefix_rule if your command uses a heredoc or herestring. + - Pipes: | + - Logical operators: &&, || + + NEVER provide a prefix_rule if your command uses a heredoc or herestring. - ### Examples - Good examples of prefixes: - - ["npm", "run", "dev"] - - ["gh", "pr", "check"] - - ["cargo", "test"] - + ### Examples + Good examples of prefixes: + - ["npm", "run", "dev"] + - ["gh", "pr", "check"] + - ["cargo", "test"] + + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: @@ -89,14 +93,14 @@ Settings: ## Window 2 (after request 3: input repeated) Settings: same as window 1 -- request 4 (turn) -- -00:additional_tools/developer (2; hash=44f4cad2ce4ab17d): +00:additional_tools/developer (2; hash=7b4c6a992fd91f91): - namespace/functions; hash=101d32aa59ea258b - function/exec_command - function/write_stdin - function/request_user_input - custom/apply_patch - function/view_image - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 01:message/developer: You are Codex, a coding agent based on GPT-5. You and the user share one workspace, and your job is to c...rate with them until their goal is genuinely handled. [hash=2a3efec66e7f8963] @@ -115,24 +119,28 @@ Settings: same as window 1 - Before performing file edits of any kind, you provide updates explaining what edits you are making. - Tone of your updates must match your personality. -02:message/developer: - - Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-only`: The san... permits reading files. Network access is restricted. [hash=be7da4425f89053c] - # Escalation Requests +02:message/developer[2]: + [01] + Filesystem sandboxing defines which files can be read or written. `sandbox_mode` is `read-only`: The san... permits reading files. Network access is restricted. [hash=be7da4425f89053c] + # Escalation Requests - Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] + Commands are run outside the sandbox if they are approved by the user, or match an existing rule that al...hell control operators, including but not limited to: [hash=d24ebf5fa4e4b9bb] - - Pipes: | - - Logical operators: &&, || - - NEVER provide a prefix_rule if your command uses a heredoc or herestring. + - Pipes: | + - Logical operators: &&, || + + NEVER provide a prefix_rule if your command uses a heredoc or herestring. - ### Examples - Good examples of prefixes: - - ["npm", "run", "dev"] - - ["gh", "pr", "check"] - - ["cargo", "test"] - + ### Examples + Good examples of prefixes: + - ["npm", "run", "dev"] + - ["gh", "pr", "check"] + - ["cargo", "test"] + + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__realtime_attachment_replacement.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__realtime_attachment_replacement.snap index fdb0fa988b..4bb91b8c82 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__realtime_attachment_replacement.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__realtime_attachment_replacement.snap @@ -7,7 +7,7 @@ Scenario: A replacement fences an older pending connection and stale stops; only ## Window 1 -- request 1 (turn) -- -00:message/developer[2]: +00:message/developer[3]: [01] Realtime conversation started. @@ -20,6 +20,10 @@ Scenario: A replacement fences an older pending connection and stale stops; only - Keep responses concise and action-oriented. Your updates should help the intermediary respond to the user. [02] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 01:message/user: 02:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__strict_3p_cache__strict_3p_mcp_catalog_cache.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__strict_3p_cache__strict_3p_mcp_catalog_cache.snap index 52e6b8529e..6119981a5e 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__strict_3p_cache__strict_3p_mcp_catalog_cache.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__strict_3p_cache__strict_3p_mcp_catalog_cache.snap @@ -58,47 +58,58 @@ Settings: Output: | [] -- request 3 (turn; turn 2: register MCP with lookup; omit-all, direct-only and excluded) -- -10:message/user: +10:message/developer: + + Deferred tool namespaces: + - mcp__environment + +11:message/user: List and call the tools provided by the environment MCP server. -- request 4 (turn; turn 2: exec discovery and call results) -- -11:custom_tool_call/exec:const available = ALL_TOOLS.filter(t => t.name.startsWith("mcp__environment__")).sort((a, b) => a.name.localeCompare(b.name)); +12:custom_tool_call/exec:const available = ALL_TOOLS.filter(t => t.name.startsWith("mcp__environment__")).sort((a, b) => a.name.localeCompare(b.name)); const results = []; for (const t of available) { const result = await tools[t.name]({}); results.push({name: t.name, result: result.content[0].text}); } text(JSON.stringify(results)); -12:custom_tool_call_output:Script completed +13:custom_tool_call_output:Script completed Wall time seconds Output: | [{"name":"mcp__environment__lookup","result":"called lookup for at with "}] -- request 5 (turn; turn 3: same MCP name, new endpoint; replace lookup with resolve and search) -- -13:message/user: +14:message/user: List and call the tools provided by the environment MCP server. -- request 6 (turn; turn 3: exec discovery and call results) -- -14:custom_tool_call/exec:const available = ALL_TOOLS.filter(t => t.name.startsWith("mcp__environment__")).sort((a, b) => a.name.localeCompare(b.name)); +15:custom_tool_call/exec:const available = ALL_TOOLS.filter(t => t.name.startsWith("mcp__environment__")).sort((a, b) => a.name.localeCompare(b.name)); const results = []; for (const t of available) { const result = await tools[t.name]({}); results.push({name: t.name, result: result.content[0].text}); } text(JSON.stringify(results)); -15:custom_tool_call_output:Script completed +16:custom_tool_call_output:Script completed Wall time seconds Output: | [{"name":"mcp__environment__resolve","result":"called resolve for at with "},{"name":"mcp__environment__search","result":"called search for at with "}] -- request 7 (turn; turn 4: remove MCP server from config) -- -16:message/user: +17:message/developer: + + Removed deferred tool namespaces: + - mcp__environment + No deferred tool namespaces remain. + +18:message/user: List and call the tools provided by the environment MCP server. -- request 8 (turn; turn 4: exec discovery and call results) -- -17:custom_tool_call/exec:const available = ALL_TOOLS.filter(t => t.name.startsWith("mcp__environment__")).sort((a, b) => a.name.localeCompare(b.name)); +19:custom_tool_call/exec:const available = ALL_TOOLS.filter(t => t.name.startsWith("mcp__environment__")).sort((a, b) => a.name.localeCompare(b.name)); const results = []; for (const t of available) { const result = await tools[t.name]({}); results.push({name: t.name, result: result.content[0].text}); } text(JSON.stringify(results)); -18:custom_tool_call_output:Script completed +20:custom_tool_call_output:Script completed Wall time seconds Output: | [] diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__subagent_browser_auth.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__subagent_browser_auth.snap index e74a63d04e..fa81cf35e6 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__subagent_browser_auth.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__subagent_browser_auth.snap @@ -15,7 +15,7 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (10; hash=1d541727c70b02b8): + tools (10; hash=df5c5997ff843305): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/list_mcp_resources: Lists resources provided by MCP servers. Resources allow servers to share data that provides cont...; args=[cursor, server]; hash=6792edaff13561bd @@ -24,13 +24,17 @@ Settings: - function/request_user_input: Request user input for one to three short questions and wait for the response. This tool is only ...; args=[questions]; hash=64a729b25c424fc6 - custom/apply_patch: The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the pat...; hash=dea9f12b0111a4ba - function/view_image: View a local image file from the filesystem when visual inspection is needed. Use this for images...; args=[detail, path]; hash=3b766d5bdec5d50e - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=cea8b3c4515459b0 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=f103e327c6870a46 -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - mcp__elicitation + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__web_search__literature_search_and_open.snap b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__web_search__literature_search_and_open.snap index ea3ecd6e69..45e9cc1a0a 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__web_search__literature_search_and_open.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__scenarios__web_search__literature_search_and_open.snap @@ -15,7 +15,7 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (7; hash=b542554f4fc96824): + tools (7; hash=dba1108606ea8676): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/request_user_input: Request user input for one to three short questions and wait for the response. This tool is only ...; args=[questions]; hash=64a729b25c424fc6 @@ -23,12 +23,16 @@ Settings: - function/view_image: View a local image file from the filesystem when visual inspection is needed. Use this for images...; args=[detail, path]; hash=3b766d5bdec5d50e - namespace/web: Tools in the web namespace.; hash=c60e4db83b9fd6b0 - function/run - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__skills_extension__cloud_skills_across_executor_readiness.snap b/codex-rs/core/tests/suite/snapshots/all__suite__skills_extension__cloud_skills_across_executor_readiness.snap index 04c7bf270f..6e80f50f16 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__skills_extension__cloud_skills_across_executor_readiness.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__skills_extension__cloud_skills_across_executor_readiness.snap @@ -15,7 +15,7 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (9; hash=1df9146cc32e8188): + tools (9; hash=92200068832c7bdc): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/wait_for_environment: Wait for the selected environment.; args=[environment_id]; hash=aac8552da86b3b20 @@ -25,12 +25,12 @@ Settings: - namespace/skills: Tools in the skills namespace.; hash=998a720eb0f017bc - function/list - function/read - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=f103e327c6870a46 -- request 1 (turn) -- 00:message/developer: -01:message/developer[3]: +01:message/developer[4]: [01] [02] ## Execution environments @@ -40,7 +40,11 @@ Settings: Wait only when the current task needs that environment. Continue using tools that are already available for unrelated work. - [03] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + + [04] 02:message/user: 03:message/user: @@ -73,7 +77,7 @@ Settings: relative to window 1 -- request 4 (compaction) -- 00:message/developer: -01:message/developer[3]: +01:message/developer[4]: [01] [02] ## Execution environments @@ -83,7 +87,11 @@ Settings: relative to window 1 Wait only when the current task needs that environment. Continue using tools that are already available for unrelated work. - [03] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + + [04] 02:message/user: 03:message/user: @@ -107,7 +115,7 @@ Settings: same as window 1 01:message/user: Inspect the available skills. -02:message/developer[4]: +02:message/developer[5]: [01] [02] ## Execution environments @@ -117,8 +125,12 @@ Settings: same as window 1 Wait only when the current task needs that environment. Continue using tools that are already available for unrelated work. - [03] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + [04] + [05] 03:message/user: 04:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__skills_extension__cloud_skills_across_executor_readiness_windows.snap b/codex-rs/core/tests/suite/snapshots/all__suite__skills_extension__cloud_skills_across_executor_readiness_windows.snap index 5288ff80f0..a439024029 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__skills_extension__cloud_skills_across_executor_readiness_windows.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__skills_extension__cloud_skills_across_executor_readiness_windows.snap @@ -15,7 +15,7 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (9; hash=1df9146cc32e8188): + tools (9; hash=92200068832c7bdc): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/wait_for_environment: Wait for the selected environment.; args=[environment_id]; hash=aac8552da86b3b20 @@ -25,12 +25,12 @@ Settings: - namespace/skills: Tools in the skills namespace.; hash=998a720eb0f017bc - function/list - function/read - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=f103e327c6870a46 -- request 1 (turn) -- 00:message/developer: -01:message/developer[3]: +01:message/developer[4]: [01] [02] ## Execution environments @@ -40,7 +40,11 @@ Settings: Wait only when the current task needs that environment. Continue using tools that are already available for unrelated work. - [03] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + + [04] 02:message/user: 03:message/user: @@ -48,12 +52,12 @@ Settings: ## Window 2 (after request 1) Settings: relative to window 1 - tools (9; hash=1df9146cc32e8188): + tools (9; hash=92200068832c7bdc): ~ function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 -- request 2 (turn) -- 00:message/developer: -01:message/developer[3]: +01:message/developer[4]: [01] [02] ## Execution environments @@ -63,7 +67,11 @@ Settings: relative to window 1 Wait only when the current task needs that environment. Continue using tools that are already available for unrelated work. - [03] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + + [04] 02:message/user: 03:message/user: @@ -95,7 +103,7 @@ Settings: relative to window 2 -- request 4 (compaction) -- 00:message/developer: -01:message/developer[3]: +01:message/developer[4]: [01] [02] ## Execution environments @@ -105,7 +113,11 @@ Settings: relative to window 2 Wait only when the current task needs that environment. Continue using tools that are already available for unrelated work. - [03] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + + [04] 02:message/user: 03:message/user: @@ -129,7 +141,7 @@ Settings: same as window 1 01:message/user: Inspect the available skills. -02:message/developer[4]: +02:message/developer[5]: [01] [02] ## Execution environments @@ -139,8 +151,12 @@ Settings: same as window 1 Wait only when the current task needs that environment. Continue using tools that are already available for unrelated work. - [03] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + [04] + [05] 03:message/user: 04:message/user: @@ -162,7 +178,7 @@ Settings: same as window 2 01:message/user: Inspect the available skills. -02:message/developer[4]: +02:message/developer[5]: [01] [02] ## Execution environments @@ -172,8 +188,12 @@ Settings: same as window 2 Wait only when the current task needs that environment. Continue using tools that are already available for unrelated work. - [03] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + [04] + [05] 03:message/user: 04:message/user: diff --git a/codex-rs/core/tests/suite/snapshots/all__suite__token_budget__token_budget_new_context_window_tool_full_context.snap b/codex-rs/core/tests/suite/snapshots/all__suite__token_budget__token_budget_new_context_window_tool_full_context.snap index fbee7acd92..66378384f2 100644 --- a/codex-rs/core/tests/suite/snapshots/all__suite__token_budget__token_budget_new_context_window_tool_full_context.snap +++ b/codex-rs/core/tests/suite/snapshots/all__suite__token_budget__token_budget_new_context_window_tool_full_context.snap @@ -8,9 +8,13 @@ Scenario: New context window tool installs fresh full context before the next fo -- request 1 (turn; Final Follow-Up Request) -- 00:message/developer: -01:message/developer[2]: +01:message/developer[3]: [01] [02] + [03] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/developer[3]: [01] [02] diff --git a/codex-rs/core/tests/suite/token_budget.rs b/codex-rs/core/tests/suite/token_budget.rs index 041d2c6b3e..06489bd53b 100644 --- a/codex-rs/core/tests/suite/token_budget.rs +++ b/codex-rs/core/tests/suite/token_budget.rs @@ -293,6 +293,7 @@ async fn token_budget_guidance_precedes_standalone_context_window( assert!(request.has_content_kinds(&[ "token_budget.context_window_guidance", "permissions.instructions", + "tools.deferred_namespaces", ])); assert!(request.has_content_kinds(&["token_budget.context_window"; 3])); let developer_texts = request.message_input_texts("developer"); diff --git a/codex-rs/ext/history-notes/tests/snapshots/image_model_input__history_images_reach_the_next_model_request.snap b/codex-rs/ext/history-notes/tests/snapshots/image_model_input__history_images_reach_the_next_model_request.snap index 12bd58d554..b37c385c1a 100644 --- a/codex-rs/ext/history-notes/tests/snapshots/image_model_input__history_images_reach_the_next_model_request.snap +++ b/codex-rs/ext/history-notes/tests/snapshots/image_model_input__history_images_reach_the_next_model_request.snap @@ -15,7 +15,7 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (9; hash=33554259377e0d47): + tools (9; hash=1186bd4f51756f11): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=c04108e51a8548c5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/request_user_input: Request user input for one to three short questions and wait for the response. This tool is only ...; args=[questions]; hash=64a729b25c424fc6 @@ -32,13 +32,17 @@ Settings: - function/read_file - function/search_contents - function/write_file - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=f103e327c6870a46 -- request 1 (turn) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/ext/multi-env-copy-file/tests/suite/snapshots/copy_file__suite__transfers__multi_env_copy_file.snap b/codex-rs/ext/multi-env-copy-file/tests/suite/snapshots/copy_file__suite__transfers__multi_env_copy_file.snap index 3319dc7ab6..e7c15e7c6f 100644 --- a/codex-rs/ext/multi-env-copy-file/tests/suite/snapshots/copy_file__suite__transfers__multi_env_copy_file.snap +++ b/codex-rs/ext/multi-env-copy-file/tests/suite/snapshots/copy_file__suite__transfers__multi_env_copy_file.snap @@ -15,20 +15,24 @@ Settings: stream: true text: {"verbosity":"low"} tool_choice: "auto" - tools (8; hash=a5c9313910564c2e): + tools (8; hash=32acf3e69aebed70): - function/exec_command: Runs a command in a PTY, returning output or a session ID for ongoing interaction.; args=[cmd, environment_id, justification, login, max_output_tokens, prefix_rule, sandbox_permissions, shell, tty, workdir, yield_time_ms]; hash=e7a0fbdd42b934a5 - function/write_stdin: Writes characters to an existing unified exec session and returns recent output.; args=[chars, max_output_tokens, session_id, yield_time_ms]; hash=7fb62d8a3e2df4e2 - function/request_user_input: Request user input for one to three short questions and wait for the response. This tool is only ...; args=[questions]; hash=64a729b25c424fc6 - custom/apply_patch: The `apply_patch` tool can be used to edit files. This is a FREEFORM tool, so do not wrap the pat...; hash=6673c610c90583ae - function/view_image: View a local image file from the filesystem when visual inspection is needed. Use this for images...; args=[detail, environment_id, path]; hash=a81dcaff856f99c8 - function/multi_env_copy_file: Copy a file between two different environments without loading it into context. Returns bytes cop...; args=[source_environment_id, source_path, target_environment_id, target_path]; hash=1fc19c22b5ee2122 - - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=400cd6ac61d524a9 + - tool_search: # Tool discovery Searches over deferred tool metadata with BM25 and exposes matching tools for t...; args=[limit, query]; hash=b573ed69c0b0e6c7 - web_search; hash=e214d4db1bc49e89 -- request 1 (request) -- 00:message/developer: -01:message/developer: - +01:message/developer[2]: + [01] + [02] + Deferred tool namespaces: + - multi_agent_v1: Tools for spawning and managing sub-agents. + 02:message/user: 03:message/user: diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index c91e727d69..8a9a0975ed 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -1736,8 +1736,8 @@ pub const FEATURES: &[FeatureSpec] = &[ FeatureSpec { id: Feature::DeferredToolWorldState, key: "deferred_tool_world_state", - stage: Stage::UnderDevelopment, - default_enabled: false, + stage: Stage::Stable, + default_enabled: true, }, FeatureSpec { id: Feature::IncrementalTools,