From 1b10a3a1b2c78398c0e2f58ef2e6056b63b2c3f2 Mon Sep 17 00:00:00 2001 From: pakrym-oai Date: Tue, 21 Oct 2025 09:25:05 -0700 Subject: [PATCH] Enable plan tool by default (#5384) ## Summary - make the plan tool available by default by removing the feature flag and always registering the handler - drop plan-tool CLI and API toggles across the exec, TUI, MCP server, and app server code paths - update tests and configs to reflect the always-on plan tool and guard workspace restriction tests against env leakage ## Testing Manually tested the extension. ------ https://chatgpt.com/codex/tasks/task_i_68f67a3ff2d083209562a773f814c1f9 --- codex-rs/app-server-protocol/src/protocol.rs | 5 ---- .../app-server/src/codex_message_processor.rs | 2 -- codex-rs/core/src/codex.rs | 3 +- codex-rs/core/src/config.rs | 18 ------------ codex-rs/core/src/config_profile.rs | 1 - codex-rs/core/src/features.rs | 11 -------- codex-rs/core/src/features/legacy.rs | 11 -------- codex-rs/core/src/tools/spec.rs | 28 +++++++++---------- codex-rs/core/tests/suite/model_tools.rs | 8 ++++-- codex-rs/core/tests/suite/prompt_caching.rs | 1 - codex-rs/core/tests/suite/tool_harness.rs | 8 ++---- codex-rs/exec/src/cli.rs | 4 --- codex-rs/exec/src/lib.rs | 6 ---- codex-rs/mcp-server/src/codex_tool_config.rs | 10 ------- codex-rs/tui/src/lib.rs | 1 - scripts/debug-codex.sh | 10 +++++++ 16 files changed, 32 insertions(+), 95 deletions(-) create mode 100755 scripts/debug-codex.sh diff --git a/codex-rs/app-server-protocol/src/protocol.rs b/codex-rs/app-server-protocol/src/protocol.rs index 3574110b..473b7141 100644 --- a/codex-rs/app-server-protocol/src/protocol.rs +++ b/codex-rs/app-server-protocol/src/protocol.rs @@ -247,10 +247,6 @@ pub struct NewConversationParams { #[serde(skip_serializing_if = "Option::is_none")] pub base_instructions: Option, - /// Whether to include the plan tool in the conversation. - #[serde(skip_serializing_if = "Option::is_none")] - pub include_plan_tool: Option, - /// Whether to include the apply patch tool in the conversation. #[serde(skip_serializing_if = "Option::is_none")] pub include_apply_patch_tool: Option, @@ -886,7 +882,6 @@ mod tests { sandbox: None, config: None, base_instructions: None, - include_plan_tool: None, include_apply_patch_tool: None, }, }; diff --git a/codex-rs/app-server/src/codex_message_processor.rs b/codex-rs/app-server/src/codex_message_processor.rs index 04cfbcfd..58731e69 100644 --- a/codex-rs/app-server/src/codex_message_processor.rs +++ b/codex-rs/app-server/src/codex_message_processor.rs @@ -1421,7 +1421,6 @@ async fn derive_config_from_params( sandbox: sandbox_mode, config: cli_overrides, base_instructions, - include_plan_tool, include_apply_patch_tool, } = params; let overrides = ConfigOverrides { @@ -1434,7 +1433,6 @@ async fn derive_config_from_params( model_provider: None, codex_linux_sandbox_exe, base_instructions, - include_plan_tool, include_apply_patch_tool, include_view_image_tool: None, show_raw_agent_reasoning: None, diff --git a/codex-rs/core/src/codex.rs b/codex-rs/core/src/codex.rs index 3aee5784..785d48ec 100644 --- a/codex-rs/core/src/codex.rs +++ b/codex-rs/core/src/codex.rs @@ -1386,9 +1386,8 @@ async fn spawn_review_thread( let model = config.review_model.clone(); let review_model_family = find_family_for_model(&model) .unwrap_or_else(|| parent_turn_context.client.get_model_family()); - // For reviews, disable plan, web_search, view_image regardless of global settings. + // For reviews, disable web_search and view_image regardless of global settings. let mut review_features = config.features.clone(); - review_features.disable(crate::features::Feature::PlanTool); review_features.disable(crate::features::Feature::WebSearchRequest); review_features.disable(crate::features::Feature::ViewImageTool); review_features.disable(crate::features::Feature::StreamableShell); diff --git a/codex-rs/core/src/config.rs b/codex-rs/core/src/config.rs index fb974045..49bb23fa 100644 --- a/codex-rs/core/src/config.rs +++ b/codex-rs/core/src/config.rs @@ -216,9 +216,6 @@ pub struct Config { /// When set, restricts the login mechanism users may use. pub forced_login_method: Option, - /// Include an experimental plan tool that the model can use to update its current plan and status of each step. - pub include_plan_tool: bool, - /// Include the `apply_patch` tool for models that benefit from invoking /// file edits as a structured tool call. When unset, this falls back to the /// model family's default preference. @@ -1117,7 +1114,6 @@ pub struct ConfigOverrides { pub config_profile: Option, pub codex_linux_sandbox_exe: Option, pub base_instructions: Option, - pub include_plan_tool: Option, pub include_apply_patch_tool: Option, pub include_view_image_tool: Option, pub show_raw_agent_reasoning: Option, @@ -1147,7 +1143,6 @@ impl Config { config_profile: config_profile_key, codex_linux_sandbox_exe, base_instructions, - include_plan_tool: include_plan_tool_override, include_apply_patch_tool: include_apply_patch_tool_override, include_view_image_tool: include_view_image_tool_override, show_raw_agent_reasoning, @@ -1174,7 +1169,6 @@ impl Config { }; let feature_overrides = FeatureOverrides { - include_plan_tool: include_plan_tool_override, include_apply_patch_tool: include_apply_patch_tool_override, include_view_image_tool: include_view_image_tool_override, web_search_request: override_tools_web_search_request, @@ -1269,7 +1263,6 @@ impl Config { let history = cfg.history.unwrap_or_default(); - let include_plan_tool_flag = features.enabled(Feature::PlanTool); let include_apply_patch_tool_flag = features.enabled(Feature::ApplyPatchFreeform); let include_view_image_tool_flag = features.enabled(Feature::ViewImageTool); let tools_web_search_request = features.enabled(Feature::WebSearchRequest); @@ -1399,7 +1392,6 @@ impl Config { .unwrap_or("https://chatgpt.com/backend-api/".to_string()), forced_chatgpt_workspace_id, forced_login_method, - include_plan_tool: include_plan_tool_flag, include_apply_patch_tool: include_apply_patch_tool_flag, tools_web_search_request, use_experimental_streamable_shell_tool, @@ -1765,7 +1757,6 @@ approve_all = true profiles.insert( "work".to_string(), ConfigProfile { - include_plan_tool: Some(true), include_view_image_tool: Some(false), ..Default::default() }, @@ -1782,9 +1773,7 @@ approve_all = true codex_home.path().to_path_buf(), )?; - assert!(config.features.enabled(Feature::PlanTool)); assert!(!config.features.enabled(Feature::ViewImageTool)); - assert!(config.include_plan_tool); assert!(!config.include_view_image_tool); Ok(()) @@ -1794,7 +1783,6 @@ approve_all = true fn feature_table_overrides_legacy_flags() -> std::io::Result<()> { let codex_home = TempDir::new()?; let mut entries = BTreeMap::new(); - entries.insert("plan_tool".to_string(), false); entries.insert("apply_patch_freeform".to_string(), false); let cfg = ConfigToml { features: Some(crate::features::FeaturesToml { entries }), @@ -1807,9 +1795,7 @@ approve_all = true codex_home.path().to_path_buf(), )?; - assert!(!config.features.enabled(Feature::PlanTool)); assert!(!config.features.enabled(Feature::ApplyPatchFreeform)); - assert!(!config.include_plan_tool); assert!(!config.include_apply_patch_tool); Ok(()) @@ -2908,7 +2894,6 @@ model_verbosity = "high" base_instructions: None, forced_chatgpt_workspace_id: None, forced_login_method: None, - include_plan_tool: false, include_apply_patch_tool: false, tools_web_search_request: false, use_experimental_streamable_shell_tool: false, @@ -2977,7 +2962,6 @@ model_verbosity = "high" base_instructions: None, forced_chatgpt_workspace_id: None, forced_login_method: None, - include_plan_tool: false, include_apply_patch_tool: false, tools_web_search_request: false, use_experimental_streamable_shell_tool: false, @@ -3061,7 +3045,6 @@ model_verbosity = "high" base_instructions: None, forced_chatgpt_workspace_id: None, forced_login_method: None, - include_plan_tool: false, include_apply_patch_tool: false, tools_web_search_request: false, use_experimental_streamable_shell_tool: false, @@ -3131,7 +3114,6 @@ model_verbosity = "high" base_instructions: None, forced_chatgpt_workspace_id: None, forced_login_method: None, - include_plan_tool: false, include_apply_patch_tool: false, tools_web_search_request: false, use_experimental_streamable_shell_tool: false, diff --git a/codex-rs/core/src/config_profile.rs b/codex-rs/core/src/config_profile.rs index ba2201ed..1986d42f 100644 --- a/codex-rs/core/src/config_profile.rs +++ b/codex-rs/core/src/config_profile.rs @@ -20,7 +20,6 @@ pub struct ConfigProfile { pub model_verbosity: Option, pub chatgpt_base_url: Option, pub experimental_instructions_file: Option, - pub include_plan_tool: Option, pub include_apply_patch_tool: Option, pub include_view_image_tool: Option, pub experimental_use_unified_exec_tool: Option, diff --git a/codex-rs/core/src/features.rs b/codex-rs/core/src/features.rs index e1a89282..84e203ec 100644 --- a/codex-rs/core/src/features.rs +++ b/codex-rs/core/src/features.rs @@ -33,8 +33,6 @@ pub enum Feature { StreamableShell, /// Use the official Rust MCP client (rmcp). RmcpClient, - /// Include the plan tool. - PlanTool, /// Include the freeform apply_patch tool. ApplyPatchFreeform, /// Include the view_image tool. @@ -74,7 +72,6 @@ pub struct Features { #[derive(Debug, Clone, Default)] pub struct FeatureOverrides { - pub include_plan_tool: Option, pub include_apply_patch_tool: Option, pub include_view_image_tool: Option, pub web_search_request: Option, @@ -83,7 +80,6 @@ pub struct FeatureOverrides { impl FeatureOverrides { fn apply(self, features: &mut Features) { LegacyFeatureToggles { - include_plan_tool: self.include_plan_tool, include_apply_patch_tool: self.include_apply_patch_tool, include_view_image_tool: self.include_view_image_tool, tools_web_search: self.web_search_request, @@ -158,7 +154,6 @@ impl Features { } let profile_legacy = LegacyFeatureToggles { - include_plan_tool: config_profile.include_plan_tool, include_apply_patch_tool: config_profile.include_apply_patch_tool, include_view_image_tool: config_profile.include_view_image_tool, experimental_use_freeform_apply_patch: config_profile @@ -225,12 +220,6 @@ pub const FEATURES: &[FeatureSpec] = &[ stage: Stage::Experimental, default_enabled: false, }, - FeatureSpec { - id: Feature::PlanTool, - key: "plan_tool", - stage: Stage::Stable, - default_enabled: false, - }, FeatureSpec { id: Feature::ApplyPatchFreeform, key: "apply_patch_freeform", diff --git a/codex-rs/core/src/features/legacy.rs b/codex-rs/core/src/features/legacy.rs index 3becb07e..22d8442a 100644 --- a/codex-rs/core/src/features/legacy.rs +++ b/codex-rs/core/src/features/legacy.rs @@ -29,10 +29,6 @@ const ALIASES: &[Alias] = &[ legacy_key: "include_apply_patch_tool", feature: Feature::ApplyPatchFreeform, }, - Alias { - legacy_key: "include_plan_tool", - feature: Feature::PlanTool, - }, Alias { legacy_key: "include_view_image_tool", feature: Feature::ViewImageTool, @@ -55,7 +51,6 @@ pub(crate) fn feature_for_key(key: &str) -> Option { #[derive(Debug, Default)] pub struct LegacyFeatureToggles { - pub include_plan_tool: Option, pub include_apply_patch_tool: Option, pub include_view_image_tool: Option, pub experimental_use_freeform_apply_patch: Option, @@ -68,12 +63,6 @@ pub struct LegacyFeatureToggles { impl LegacyFeatureToggles { pub fn apply(self, features: &mut Features) { - set_if_some( - features, - Feature::PlanTool, - self.include_plan_tool, - "include_plan_tool", - ); set_if_some( features, Feature::ApplyPatchFreeform, diff --git a/codex-rs/core/src/tools/spec.rs b/codex-rs/core/src/tools/spec.rs index c70da247..84baff80 100644 --- a/codex-rs/core/src/tools/spec.rs +++ b/codex-rs/core/src/tools/spec.rs @@ -25,7 +25,6 @@ pub enum ConfigShellToolType { #[derive(Debug, Clone)] pub(crate) struct ToolsConfig { pub shell_type: ConfigShellToolType, - pub plan_tool: bool, pub apply_patch_tool_type: Option, pub web_search_request: bool, pub include_view_image_tool: bool, @@ -46,7 +45,6 @@ impl ToolsConfig { } = params; let use_streamable_shell_tool = features.enabled(Feature::StreamableShell); let experimental_unified_exec_tool = features.enabled(Feature::UnifiedExec); - let include_plan_tool = features.enabled(Feature::PlanTool); let include_apply_patch_tool = features.enabled(Feature::ApplyPatchFreeform); let include_web_search_request = features.enabled(Feature::WebSearchRequest); let include_view_image_tool = features.enabled(Feature::ViewImageTool); @@ -73,7 +71,6 @@ impl ToolsConfig { Self { shell_type, - plan_tool: include_plan_tool, apply_patch_tool_type, web_search_request: include_web_search_request, include_view_image_tool, @@ -870,10 +867,8 @@ pub(crate) fn build_specs( builder.register_handler("list_mcp_resource_templates", mcp_resource_handler.clone()); builder.register_handler("read_mcp_resource", mcp_resource_handler); - if config.plan_tool { - builder.push_spec(PLAN_TOOL.clone()); - builder.register_handler("update_plan", plan_handler); - } + builder.push_spec(PLAN_TOOL.clone()); + builder.register_handler("update_plan", plan_handler); if let Some(apply_patch_tool_type) = &config.apply_patch_tool_type { match apply_patch_tool_type { @@ -1006,7 +1001,6 @@ mod tests { let model_family = find_family_for_model("codex-mini-latest") .expect("codex-mini-latest should be a valid model family"); let mut features = Features::with_defaults(); - features.enable(Feature::PlanTool); features.enable(Feature::WebSearchRequest); features.enable(Feature::UnifiedExec); let config = ToolsConfig::new(&ToolsConfigParams { @@ -1033,7 +1027,6 @@ mod tests { fn test_build_specs_default_shell() { let model_family = find_family_for_model("o3").expect("o3 should be a valid model family"); let mut features = Features::with_defaults(); - features.enable(Feature::PlanTool); features.enable(Feature::WebSearchRequest); features.enable(Feature::UnifiedExec); let config = ToolsConfig::new(&ToolsConfigParams { @@ -1162,6 +1155,7 @@ mod tests { "list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource", + "update_plan", "web_search", "view_image", "test_server/do_something_cool", @@ -1281,6 +1275,7 @@ mod tests { "list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource", + "update_plan", "view_image", "test_server/cool", "test_server/do", @@ -1332,6 +1327,7 @@ mod tests { "list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource", + "update_plan", "apply_patch", "web_search", "view_image", @@ -1340,7 +1336,7 @@ mod tests { ); assert_eq!( - tools[7].spec, + tools[8].spec, ToolSpec::Function(ResponsesApiTool { name: "dash/search".to_string(), parameters: JsonSchema::Object { @@ -1400,6 +1396,7 @@ mod tests { "list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource", + "update_plan", "apply_patch", "web_search", "view_image", @@ -1407,7 +1404,7 @@ mod tests { ], ); assert_eq!( - tools[7].spec, + tools[8].spec, ToolSpec::Function(ResponsesApiTool { name: "dash/paginate".to_string(), parameters: JsonSchema::Object { @@ -1466,6 +1463,7 @@ mod tests { "list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource", + "update_plan", "apply_patch", "web_search", "view_image", @@ -1473,7 +1471,7 @@ mod tests { ], ); assert_eq!( - tools[7].spec, + tools[8].spec, ToolSpec::Function(ResponsesApiTool { name: "dash/tags".to_string(), parameters: JsonSchema::Object { @@ -1534,6 +1532,7 @@ mod tests { "list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource", + "update_plan", "apply_patch", "web_search", "view_image", @@ -1541,7 +1540,7 @@ mod tests { ], ); assert_eq!( - tools[7].spec, + tools[8].spec, ToolSpec::Function(ResponsesApiTool { name: "dash/value".to_string(), parameters: JsonSchema::Object { @@ -1639,6 +1638,7 @@ mod tests { "list_mcp_resources", "list_mcp_resource_templates", "read_mcp_resource", + "update_plan", "apply_patch", "web_search", "view_image", @@ -1647,7 +1647,7 @@ mod tests { ); assert_eq!( - tools[7].spec, + tools[8].spec, ToolSpec::Function(ResponsesApiTool { name: "test_server/do_something_cool".to_string(), parameters: JsonSchema::Object { diff --git a/codex-rs/core/tests/suite/model_tools.rs b/codex-rs/core/tests/suite/model_tools.rs index 0b749d47..2a04b88a 100644 --- a/codex-rs/core/tests/suite/model_tools.rs +++ b/codex-rs/core/tests/suite/model_tools.rs @@ -57,7 +57,6 @@ async fn collect_tool_identifiers_for_model(model: &str) -> Vec { config.model = model.to_string(); config.model_family = find_family_for_model(model).unwrap_or_else(|| panic!("unknown model family for {model}")); - config.features.disable(Feature::PlanTool); config.features.disable(Feature::ApplyPatchFreeform); config.features.disable(Feature::ViewImageTool); config.features.disable(Feature::WebSearchRequest); @@ -98,7 +97,8 @@ async fn model_selects_expected_tools() { "local_shell".to_string(), "list_mcp_resources".to_string(), "list_mcp_resource_templates".to_string(), - "read_mcp_resource".to_string() + "read_mcp_resource".to_string(), + "update_plan".to_string() ], "codex-mini-latest should expose the local shell tool", ); @@ -110,7 +110,8 @@ async fn model_selects_expected_tools() { "shell".to_string(), "list_mcp_resources".to_string(), "list_mcp_resource_templates".to_string(), - "read_mcp_resource".to_string() + "read_mcp_resource".to_string(), + "update_plan".to_string() ], "o3 should expose the generic shell tool", ); @@ -123,6 +124,7 @@ async fn model_selects_expected_tools() { "list_mcp_resources".to_string(), "list_mcp_resource_templates".to_string(), "read_mcp_resource".to_string(), + "update_plan".to_string(), "apply_patch".to_string() ], "gpt-5-codex should expose the apply_patch tool", diff --git a/codex-rs/core/tests/suite/prompt_caching.rs b/codex-rs/core/tests/suite/prompt_caching.rs index 3add7bbf..1bf12eb9 100644 --- a/codex-rs/core/tests/suite/prompt_caching.rs +++ b/codex-rs/core/tests/suite/prompt_caching.rs @@ -186,7 +186,6 @@ async fn prompt_tools_are_consistent_across_requests() { config.cwd = cwd.path().to_path_buf(); config.model_provider = model_provider; config.user_instructions = Some("be consistent and helpful".to_string()); - config.features.enable(Feature::PlanTool); let conversation_manager = ConversationManager::with_auth(CodexAuth::from_api_key("Test API Key")); diff --git a/codex-rs/core/tests/suite/tool_harness.rs b/codex-rs/core/tests/suite/tool_harness.rs index d9a7b0ea..e9f9552c 100644 --- a/codex-rs/core/tests/suite/tool_harness.rs +++ b/codex-rs/core/tests/suite/tool_harness.rs @@ -106,9 +106,7 @@ async fn update_plan_tool_emits_plan_update_event() -> anyhow::Result<()> { let server = start_mock_server().await; - let mut builder = test_codex().with_config(|config| { - config.features.enable(Feature::PlanTool); - }); + let mut builder = test_codex(); let TestCodex { codex, cwd, @@ -193,9 +191,7 @@ async fn update_plan_tool_rejects_malformed_payload() -> anyhow::Result<()> { let server = start_mock_server().await; - let mut builder = test_codex().with_config(|config| { - config.features.enable(Feature::PlanTool); - }); + let mut builder = test_codex(); let TestCodex { codex, cwd, diff --git a/codex-rs/exec/src/cli.rs b/codex-rs/exec/src/cli.rs index 67c072e0..f56d07dc 100644 --- a/codex-rs/exec/src/cli.rs +++ b/codex-rs/exec/src/cli.rs @@ -67,10 +67,6 @@ pub struct Cli { #[arg(long = "json", alias = "experimental-json", default_value_t = false)] pub json: bool, - /// Whether to include the plan tool in the conversation. - #[arg(long = "include-plan-tool")] - pub include_plan_tool: Option, - /// Specifies file where the last message from the agent should be written. #[arg(long = "output-last-message", short = 'o', value_name = "FILE")] pub last_message_file: Option, diff --git a/codex-rs/exec/src/lib.rs b/codex-rs/exec/src/lib.rs index f66c1db2..1d68b85f 100644 --- a/codex-rs/exec/src/lib.rs +++ b/codex-rs/exec/src/lib.rs @@ -70,14 +70,9 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option) -> any sandbox_mode: sandbox_mode_cli_arg, prompt, output_schema: output_schema_path, - include_plan_tool, config_overrides, } = cli; - if include_plan_tool.is_some() { - eprintln!("include-plan-tool is deprecated. Plan tool is now enabled by default."); - } - // Determine the prompt source (parent or subcommand) and read from stdin if needed. let prompt_arg = match &command { // Allow prompt before the subcommand by falling back to the parent-level prompt @@ -181,7 +176,6 @@ pub async fn run_main(cli: Cli, codex_linux_sandbox_exe: Option) -> any model_provider, codex_linux_sandbox_exe, base_instructions: None, - include_plan_tool: Some(include_plan_tool.unwrap_or(true)), include_apply_patch_tool: None, include_view_image_tool: None, show_raw_agent_reasoning: oss.then_some(true), diff --git a/codex-rs/mcp-server/src/codex_tool_config.rs b/codex-rs/mcp-server/src/codex_tool_config.rs index 5b5242f2..b4c4eb74 100644 --- a/codex-rs/mcp-server/src/codex_tool_config.rs +++ b/codex-rs/mcp-server/src/codex_tool_config.rs @@ -49,10 +49,6 @@ pub struct CodexToolCallParam { /// The set of instructions to use instead of the default ones. #[serde(default, skip_serializing_if = "Option::is_none")] pub base_instructions: Option, - - /// Whether to include the plan tool in the conversation. - #[serde(default, skip_serializing_if = "Option::is_none")] - pub include_plan_tool: Option, } /// Custom enum mirroring [`AskForApproval`], but has an extra dependency on @@ -145,7 +141,6 @@ impl CodexToolCallParam { sandbox, config: cli_overrides, base_instructions, - include_plan_tool, } = self; // Build the `ConfigOverrides` recognized by codex-core. @@ -159,7 +154,6 @@ impl CodexToolCallParam { model_provider: None, codex_linux_sandbox_exe, base_instructions, - include_plan_tool, include_apply_patch_tool: None, include_view_image_tool: None, show_raw_agent_reasoning: None, @@ -277,10 +271,6 @@ mod tests { "description": "Working directory for the session. If relative, it is resolved against the server process's current working directory.", "type": "string" }, - "include-plan-tool": { - "description": "Whether to include the plan tool in the conversation.", - "type": "boolean" - }, "model": { "description": "Optional override for the model name (e.g. \"o3\", \"o4-mini\").", "type": "string" diff --git a/codex-rs/tui/src/lib.rs b/codex-rs/tui/src/lib.rs index 1d3cc4c0..681b4c6c 100644 --- a/codex-rs/tui/src/lib.rs +++ b/codex-rs/tui/src/lib.rs @@ -144,7 +144,6 @@ pub async fn run_main( config_profile: cli.config_profile.clone(), codex_linux_sandbox_exe, base_instructions: None, - include_plan_tool: Some(true), include_apply_patch_tool: None, include_view_image_tool: None, show_raw_agent_reasoning: cli.oss.then_some(true), diff --git a/scripts/debug-codex.sh b/scripts/debug-codex.sh new file mode 100755 index 00000000..9583b8d1 --- /dev/null +++ b/scripts/debug-codex.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Set "chatgpt.cliExecutable": "/Users//code/codex/scripts/debug-codex.sh" in VSCode settings to always get the +# latest codex-rs binary when debugging Codex Extension. + + +set -euo pipefail + +CODEX_RS_DIR=$(realpath "$(dirname "$0")/../codex-rs") +(cd "$CODEX_RS_DIR" && cargo run --quiet --bin codex -- "$@") \ No newline at end of file