Lightweight coding agent that runs in your terminal
Rust
chore(config) enable shell_command (#6843)
Dylan Hurd29ca89c414b9
diff --git a/codex-rs/core/src/model_family.rs b/codex-rs/core/src/model_family.rsindex 0758d20310..ee827ff10e 100644--- a/codex-rs/core/src/model_family.rs+++ b/codex-rs/core/src/model_family.rs@@ -149,6 +149,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {"test_sync_tool".to_string(),],supports_parallel_tool_calls: true,+ shell_type: ConfigShellToolType::ShellCommand,support_verbosity: true,truncation_policy: TruncationPolicy::Tokens(10_000),)@@ -166,7 +167,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {"list_dir".to_string(),"read_file".to_string(),],- shell_type: if cfg!(windows) { ConfigShellToolType::ShellCommand } else { ConfigShellToolType::Default },+ shell_type: ConfigShellToolType::ShellCommand,supports_parallel_tool_calls: true,support_verbosity: true,truncation_policy: TruncationPolicy::Tokens(10_000),@@ -183,7 +184,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {reasoning_summary_format: ReasoningSummaryFormat::Experimental,base_instructions: GPT_5_CODEX_INSTRUCTIONS.to_string(),apply_patch_tool_type: Some(ApplyPatchToolType::Freeform),- shell_type: if cfg!(windows) { ConfigShellToolType::ShellCommand } else { ConfigShellToolType::Default },+ shell_type: ConfigShellToolType::ShellCommand,supports_parallel_tool_calls: true,support_verbosity: false,truncation_policy: TruncationPolicy::Tokens(10_000),@@ -198,6 +199,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {base_instructions: GPT_5_1_INSTRUCTIONS.to_string(),default_reasoning_effort: Some(ReasoningEffort::Medium),truncation_policy: TruncationPolicy::Bytes(10_000),+ shell_type: ConfigShellToolType::ShellCommand,supports_parallel_tool_calls: true,)} else if slug.starts_with("gpt-5") {@@ -205,6 +207,7 @@ pub fn find_family_for_model(slug: &str) -> Option<ModelFamily> {slug, "gpt-5",supports_reasoning_summaries: true,needs_special_apply_patch_instructions: true,+ shell_type: ConfigShellToolType::ShellCommand,support_verbosity: true,truncation_policy: TruncationPolicy::Bytes(10_000),)diff --git a/codex-rs/core/src/tools/spec.rs b/codex-rs/core/src/tools/spec.rsindex 88ddbf5517..32bcd6a241 100644--- a/codex-rs/core/src/tools/spec.rs+++ b/codex-rs/core/src/tools/spec.rs@@ -1292,11 +1292,7 @@ mod tests {"gpt-5-codex",&Features::with_defaults(),&[- if cfg!(windows) {- "shell_command"- } else {- "shell"- },+ "shell_command","list_mcp_resources","list_mcp_resource_templates","read_mcp_resource",@@ -1313,11 +1309,7 @@ mod tests {"gpt-5.1-codex",&Features::with_defaults(),&[- if cfg!(windows) {- "shell_command"- } else {- "shell"- },+ "shell_command","list_mcp_resources","list_mcp_resource_templates","read_mcp_resource",@@ -1392,11 +1384,7 @@ mod tests {"gpt-5.1-codex-mini",&Features::with_defaults(),&[- if cfg!(windows) {- "shell_command"- } else {- "shell"- },+ "shell_command","list_mcp_resources","list_mcp_resource_templates","read_mcp_resource",@@ -1413,7 +1401,7 @@ mod tests {"gpt-5.1",&Features::with_defaults(),&[- "shell",+ "shell_command","list_mcp_resources","list_mcp_resource_templates","read_mcp_resource",diff --git a/codex-rs/core/tests/suite/model_tools.rs b/codex-rs/core/tests/suite/model_tools.rsindex 28593a55b8..3f5845b86f 100644--- a/codex-rs/core/tests/suite/model_tools.rs+++ b/codex-rs/core/tests/suite/model_tools.rs@@ -119,12 +119,7 @@ async fn model_selects_expected_tools() {assert_eq!(gpt5_codex_tools,vec![- if cfg!(windows) {- "shell_command"- } else {- "shell"- }- .to_string(),+ "shell_command".to_string(),"list_mcp_resources".to_string(),"list_mcp_resource_templates".to_string(),"read_mcp_resource".to_string(),@@ -138,12 +133,7 @@ async fn model_selects_expected_tools() {assert_eq!(gpt51_codex_tools,vec![- if cfg!(windows) {- "shell_command"- } else {- "shell"- }- .to_string(),+ "shell_command".to_string(),"list_mcp_resources".to_string(),"list_mcp_resource_templates".to_string(),"read_mcp_resource".to_string(),@@ -157,7 +147,7 @@ async fn model_selects_expected_tools() {assert_eq!(gpt51_tools,vec![- "shell".to_string(),+ "shell_command".to_string(),"list_mcp_resources".to_string(),"list_mcp_resource_templates".to_string(),"read_mcp_resource".to_string(),diff --git a/codex-rs/core/tests/suite/prompt_caching.rs b/codex-rs/core/tests/suite/prompt_caching.rsindex c858ea20fd..d93c2bd79d 100644--- a/codex-rs/core/tests/suite/prompt_caching.rs+++ b/codex-rs/core/tests/suite/prompt_caching.rs@@ -162,7 +162,7 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {("gpt-5.1",vec![- "shell",+ "shell_command","list_mcp_resources","list_mcp_resource_templates","read_mcp_resource",@@ -173,7 +173,7 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {("gpt-5.1",vec![- "shell",+ "shell_command","list_mcp_resources","list_mcp_resource_templates","read_mcp_resource",@@ -185,7 +185,7 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {("gpt-5.1-codex",vec![- "shell",+ "shell_command","list_mcp_resources","list_mcp_resource_templates","read_mcp_resource",@@ -197,7 +197,7 @@ async fn prompt_tools_are_consistent_across_requests() -> anyhow::Result<()> {("gpt-5.1-codex",vec![- "shell",+ "shell_command","list_mcp_resources","list_mcp_resource_templates","read_mcp_resource",