From 8a7f345af729d1b2d9264e20878b2f6227d4134a Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Wed, 17 Dec 2025 10:51:30 -0800 Subject: [PATCH] fix --- codex-rs/app-server-protocol/src/protocol/common.rs | 2 +- codex-rs/app-server/README.md | 2 +- codex-rs/app-server/tests/common/mcp_process.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codex-rs/app-server-protocol/src/protocol/common.rs b/codex-rs/app-server-protocol/src/protocol/common.rs index bbd13729ef..4432d859f3 100644 --- a/codex-rs/app-server-protocol/src/protocol/common.rs +++ b/codex-rs/app-server-protocol/src/protocol/common.rs @@ -133,7 +133,7 @@ client_request_definitions! { params: v2::ReviewStartParams, response: v2::ReviewStartResponse, }, - CompactStart => "compact/start" { + CompactStart => "thread/compact" { params: v2::CompactStartParams, response: v2::TurnStartResponse, }, diff --git a/codex-rs/app-server/README.md b/codex-rs/app-server/README.md index 520b10b7a6..8c2438b45a 100644 --- a/codex-rs/app-server/README.md +++ b/codex-rs/app-server/README.md @@ -75,7 +75,7 @@ Example (from OpenAI's official VSCode extension): - `turn/start` — add user input to a thread and begin Codex generation; responds with the initial `turn` object and streams `turn/started`, `item/*`, and `turn/completed` notifications. - `turn/interrupt` — request cancellation of an in-flight turn by `(thread_id, turn_id)`; success is an empty `{}` response and the turn finishes with `status: "interrupted"`. - `review/start` — kick off Codex’s automated reviewer for a thread; responds like `turn/start` and emits `item/started`/`item/completed` notifications with `enteredReviewMode` and `exitedReviewMode` items, plus a final assistant `agentMessage` containing the review. -- `compact/start` — compact (summarize) a thread’s history to reduce context usage; responds like `turn/start` and emits `thread/compacted` when the new compacted history is installed. +- `thread/compact` — compact (summarize) a thread’s history to reduce context usage; responds like `turn/start` and emits `thread/compacted` when the new compacted history is installed. - `command/exec` — run a single command under the server sandbox without starting a thread/turn (handy for utilities and validation). - `model/list` — list available models (with reasoning effort options). - `skills/list` — list skills for one or more `cwd` values. diff --git a/codex-rs/app-server/tests/common/mcp_process.rs b/codex-rs/app-server/tests/common/mcp_process.rs index bada07d126..bbeae9cd7e 100644 --- a/codex-rs/app-server/tests/common/mcp_process.rs +++ b/codex-rs/app-server/tests/common/mcp_process.rs @@ -391,13 +391,13 @@ impl McpProcess { self.send_request("review/start", params).await } - /// Send a `compact/start` JSON-RPC request (v2). + /// Send a `thread/compact` JSON-RPC request (v2). pub async fn send_compact_start_request( &mut self, params: CompactStartParams, ) -> anyhow::Result { let params = Some(serde_json::to_value(params)?); - self.send_request("compact/start", params).await + self.send_request("thread/compact", params).await } /// Send a `cancelLoginChatGpt` JSON-RPC request.