From 6b5b9a687e4597d5d9fb09f3bc7c9ef1345ab3ca Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Tue, 2 Dec 2025 15:43:25 -0800 Subject: [PATCH 1/2] feat: support --version flag for @openai/codex-shell-tool-mcp (#7504) I find it helpful to easily verify which version is running. Tested: ```shell ~/code/codex3/codex-rs/exec-server$ cargo run --bin codex-exec-mcp-server -- --help Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.19s Running `/Users/mbolin/code/codex3/codex-rs/target/debug/codex-exec-mcp-server --help` Usage: codex-exec-mcp-server [OPTIONS] Options: --execve Executable to delegate execve(2) calls to in Bash --bash Path to Bash that has been patched to support execve() wrapping -h, --help Print help -V, --version Print version ~/code/codex3/codex-rs/exec-server$ cargo run --bin codex-exec-mcp-server -- --version Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s Running `/Users/mbolin/code/codex3/codex-rs/target/debug/codex-exec-mcp-server --version` codex-exec-server 0.0.0 ``` --- codex-rs/exec-server/src/posix.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/codex-rs/exec-server/src/posix.rs b/codex-rs/exec-server/src/posix.rs index b4dd0fbf40..3a4a4b9525 100644 --- a/codex-rs/exec-server/src/posix.rs +++ b/codex-rs/exec-server/src/posix.rs @@ -78,6 +78,7 @@ mod stopwatch; const CODEX_EXECVE_WRAPPER_EXE_NAME: &str = "codex-execve-wrapper"; #[derive(Parser)] +#[clap(version)] struct McpServerCli { /// Executable to delegate execve(2) calls to in Bash. #[arg(long = "execve")] From f75a902abce523b6d363dc7980571bfc959a1e44 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Tue, 2 Dec 2025 16:30:21 -0800 Subject: [PATCH 2/2] fix: inline function marked as dead code --- codex-rs/core/src/rollout/list.rs | 7 ------- codex-rs/core/src/rollout/tests.rs | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/codex-rs/core/src/rollout/list.rs b/codex-rs/core/src/rollout/list.rs index 781e3fe372..941550d0ae 100644 --- a/codex-rs/core/src/rollout/list.rs +++ b/codex-rs/core/src/rollout/list.rs @@ -141,13 +141,6 @@ pub(crate) async fn get_conversations( Ok(result) } -/// Load the full contents of a single conversation session file at `path`. -/// Returns the entire file contents as a String. -#[allow(dead_code)] -pub(crate) async fn get_conversation(path: &Path) -> io::Result { - tokio::fs::read_to_string(path).await -} - /// Load conversation file paths from disk using directory traversal. /// /// Directory layout: `~/.codex/sessions/YYYY/MM/DD/rollout-YYYY-MM-DDThh-mm-ss-.jsonl` diff --git a/codex-rs/core/src/rollout/tests.rs b/codex-rs/core/src/rollout/tests.rs index f367782b12..1c2a6dcdb0 100644 --- a/codex-rs/core/src/rollout/tests.rs +++ b/codex-rs/core/src/rollout/tests.rs @@ -16,7 +16,6 @@ use crate::rollout::INTERACTIVE_SESSION_SOURCES; use crate::rollout::list::ConversationItem; use crate::rollout::list::ConversationsPage; use crate::rollout::list::Cursor; -use crate::rollout::list::get_conversation; use crate::rollout::list::get_conversations; use anyhow::Result; use codex_protocol::ConversationId; @@ -510,7 +509,7 @@ async fn test_get_conversation_contents() { .unwrap(); let path = &page.items[0].path; - let content = get_conversation(path).await.unwrap(); + let content = tokio::fs::read_to_string(path).await.unwrap(); // Page equality (single item) let expected_path = home