From c06c3a90f5665209f5f1056528236655439354a8 Mon Sep 17 00:00:00 2001 From: Alex Netsch Date: Thu, 27 Nov 2025 17:12:56 +0000 Subject: [PATCH] Up codex version to 0.63.0, up codex protocol (#1382) --- Cargo.lock | 320 +++++++++++++++++- crates/executors/Cargo.toml | 6 +- crates/executors/src/executors/codex.rs | 15 +- .../executors/src/executors/codex/client.rs | 19 +- .../src/executors/codex/normalize_logs.rs | 63 +++- shared/schemas/codex.json | 19 +- shared/types.ts | 4 +- 7 files changed, 416 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0e0ba25c..bb7598ac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -224,6 +224,56 @@ dependencies = [ "libc", ] +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.60.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.60.2", +] + [[package]] name = "anyhow" version = "1.0.100" @@ -719,12 +769,24 @@ version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +[[package]] +name = "bytemuck" +version = "1.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" + [[package]] name = "byteorder" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + [[package]] name = "bytes" version = "1.10.1" @@ -799,29 +861,92 @@ dependencies = [ ] [[package]] -name = "codex-app-server-protocol" -version = "0.44.0" -source = "git+https://github.com/openai/codex.git?rev=488ec061bf4d36916b8f477c700ea4fde4162a7a#488ec061bf4d36916b8f477c700ea4fde4162a7a" +name = "clap" +version = "4.5.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "clap_lex" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" + +[[package]] +name = "codex-app-server-protocol" +version = "0.63.0" +source = "git+https://github.com/openai/codex.git?rev=80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc#80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc" +dependencies = [ + "anyhow", + "clap", "codex-protocol", - "paste", + "mcp-types", + "schemars 0.8.22", "serde", "serde_json", "strum_macros", + "thiserror 2.0.17", "ts-rs 11.1.0", "uuid", ] +[[package]] +name = "codex-git" +version = "0.63.0" +source = "git+https://github.com/openai/codex.git?rev=80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc#80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc" +dependencies = [ + "once_cell", + "regex", + "schemars 0.8.22", + "serde", + "tempfile", + "thiserror 2.0.17", + "ts-rs 11.1.0", + "walkdir", +] + [[package]] name = "codex-protocol" -version = "0.44.0" -source = "git+https://github.com/openai/codex.git?rev=488ec061bf4d36916b8f477c700ea4fde4162a7a#488ec061bf4d36916b8f477c700ea4fde4162a7a" +version = "0.63.0" +source = "git+https://github.com/openai/codex.git?rev=80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc#80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc" dependencies = [ "base64", + "codex-git", + "codex-utils-image", "icu_decimal", "icu_locale_core", + "icu_provider", "mcp-types", "mime_guess", + "schemars 0.8.22", "serde", "serde_json", "serde_with", @@ -833,6 +958,34 @@ dependencies = [ "uuid", ] +[[package]] +name = "codex-utils-cache" +version = "0.63.0" +source = "git+https://github.com/openai/codex.git?rev=80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc#80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc" +dependencies = [ + "lru", + "sha1", + "tokio", +] + +[[package]] +name = "codex-utils-image" +version = "0.63.0" +source = "git+https://github.com/openai/codex.git?rev=80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc#80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc" +dependencies = [ + "base64", + "codex-utils-cache", + "image", + "thiserror 2.0.17", + "tokio", +] + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + [[package]] name = "command-group" version = "5.0.1" @@ -909,6 +1062,15 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -1491,6 +1653,15 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + [[package]] name = "ff" version = "0.13.1" @@ -1545,6 +1716,16 @@ dependencies = [ "writeable", ] +[[package]] +name = "flate2" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fluent-uri" version = "0.1.4" @@ -2315,6 +2496,21 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "image" +version = "0.25.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6506c6c10786659413faa717ceebcb8f70731c0a60cbae39795fdf114519c1a" +dependencies = [ + "bytemuck", + "byteorder-lite", + "moxcms", + "num-traits", + "png", + "zune-core", + "zune-jpeg", +] + [[package]] name = "impl-more" version = "0.1.9" @@ -2399,6 +2595,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + [[package]] name = "itertools" version = "0.12.1" @@ -2696,6 +2898,15 @@ version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +[[package]] +name = "lru" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" +dependencies = [ + "hashbrown 0.15.5", +] + [[package]] name = "lru-slab" version = "0.1.2" @@ -2737,9 +2948,10 @@ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "mcp-types" -version = "0.44.0" -source = "git+https://github.com/openai/codex.git?rev=488ec061bf4d36916b8f477c700ea4fde4162a7a#488ec061bf4d36916b8f477c700ea4fde4162a7a" +version = "0.63.0" +source = "git+https://github.com/openai/codex.git?rev=80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc#80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc" dependencies = [ + "schemars 0.8.22", "serde", "serde_json", "ts-rs 11.1.0", @@ -2799,6 +3011,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] @@ -2834,6 +3047,16 @@ dependencies = [ "uuid", ] +[[package]] +name = "moxcms" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbdd3d7436f8b5e892b8b7ea114271ff0fa00bc5acae845d53b07d498616ef6" +dependencies = [ + "num-traits", + "pxfm", +] + [[package]] name = "multer" version = "3.1.0" @@ -3090,6 +3313,12 @@ version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + [[package]] name = "open" version = "5.3.2" @@ -3366,6 +3595,19 @@ dependencies = [ "time", ] +[[package]] +name = "png" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97baced388464909d42d89643fe4361939af9b7ce7a31ee32a168f832a70f2a0" +dependencies = [ + "bitflags 2.10.0", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + [[package]] name = "polling" version = "3.11.0" @@ -3449,6 +3691,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "pxfm" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3cbdf373972bf78df4d3b518d07003938e2c7d1fb5891e55f9cb6df57009d84" +dependencies = [ + "num-traits", +] + [[package]] name = "quick-xml" version = "0.37.5" @@ -3989,6 +4240,18 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "schemars_derive 0.8.22", + "serde", + "serde_json", +] + [[package]] name = "schemars" version = "0.9.0" @@ -4010,12 +4273,24 @@ dependencies = [ "chrono", "dyn-clone", "ref-cast", - "schemars_derive", + "schemars_derive 1.0.4", "serde", "serde_json", "uuid", ] +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.108", +] + [[package]] name = "schemars_derive" version = "1.0.4" @@ -4512,6 +4787,12 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "similar" version = "2.7.0" @@ -5584,6 +5865,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "utils" version = "0.0.124" @@ -6477,6 +6764,21 @@ dependencies = [ "syn 2.0.108", ] +[[package]] +name = "zune-core" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111f7d9820f05fd715df3144e254d6fc02ee4088b0644c0ffd0efc9e6d9d2773" + +[[package]] +name = "zune-jpeg" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc6fb7703e32e9a07fb3f757360338b3a567a5054f21b5f52a666752e333d58e" +dependencies = [ + "zune-core", +] + [[package]] name = "zvariant" version = "5.8.0" diff --git a/crates/executors/Cargo.toml b/crates/executors/Cargo.toml index bb80b82e..7dc268ec 100644 --- a/crates/executors/Cargo.toml +++ b/crates/executors/Cargo.toml @@ -40,9 +40,9 @@ sqlx = "0.8.6" axum = { workspace = true } shlex = "1.3.0" agent-client-protocol = "0.4" -codex-protocol = { git = "https://github.com/openai/codex.git", package = "codex-protocol", rev = "488ec061bf4d36916b8f477c700ea4fde4162a7a" } -codex-app-server-protocol = { git = "https://github.com/openai/codex.git", package = "codex-app-server-protocol", rev = "488ec061bf4d36916b8f477c700ea4fde4162a7a" } -codex-mcp-types = { git = "https://github.com/openai/codex.git", package = "mcp-types", rev = "488ec061bf4d36916b8f477c700ea4fde4162a7a" } +codex-protocol = { git = "https://github.com/openai/codex.git", package = "codex-protocol", rev = "80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc" } +codex-app-server-protocol = { git = "https://github.com/openai/codex.git", package = "codex-app-server-protocol", rev = "80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc" } +codex-mcp-types = { git = "https://github.com/openai/codex.git", package = "mcp-types", rev = "80d6a3868ef1414e0fb1c2e28a369f2ef4fa4dcc" } sha2 = "0.10" derivative = "2.2.0" icu_provider = { version = "2.1.1", default-features = false, features = ["sync"] } diff --git a/crates/executors/src/executors/codex.rs b/crates/executors/src/executors/codex.rs index 42ab7e75..bf0afa80 100644 --- a/crates/executors/src/executors/codex.rs +++ b/crates/executors/src/executors/codex.rs @@ -78,6 +78,7 @@ pub enum ReasoningEffort { Low, Medium, High, + Xhigh, } /// Model reasoning summary style @@ -124,9 +125,13 @@ pub struct Codex { #[serde(default, skip_serializing_if = "Option::is_none")] pub base_instructions: Option, #[serde(default, skip_serializing_if = "Option::is_none")] - pub include_plan_tool: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] pub include_apply_patch_tool: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub model_provider: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub compact_prompt: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub developer_instructions: Option, #[serde(flatten)] pub cmd: CmdOverrides, @@ -197,7 +202,7 @@ impl StandardCodingAgentExecutor for Codex { impl Codex { pub fn base_command() -> &'static str { - "npx -y @openai/codex@0.60.1" + "npx -y @openai/codex@0.63.0" } fn build_command_builder(&self) -> CommandBuilder { @@ -238,8 +243,10 @@ impl Codex { sandbox, config: self.build_config_overrides(), base_instructions: self.base_instructions.clone(), - include_plan_tool: self.include_plan_tool, include_apply_patch_tool: self.include_apply_patch_tool, + model_provider: self.model_provider.clone(), + compact_prompt: self.compact_prompt.clone(), + developer_instructions: self.developer_instructions.clone(), } } diff --git a/crates/executors/src/executors/codex/client.rs b/crates/executors/src/executors/codex/client.rs index 61c83a80..535cc0ce 100644 --- a/crates/executors/src/executors/codex/client.rs +++ b/crates/executors/src/executors/codex/client.rs @@ -98,8 +98,10 @@ impl AppServerClient { let request = ClientRequest::ResumeConversation { request_id: self.next_request_id(), params: ResumeConversationParams { - path: rollout_path, + path: Some(rollout_path), overrides: Some(overrides), + conversation_id: None, + history: None, }, }; self.send_request(request, "resumeConversation").await @@ -111,7 +113,10 @@ impl AppServerClient { ) -> Result { let request = ClientRequest::AddConversationListener { request_id: self.next_request_id(), - params: AddConversationListenerParams { conversation_id }, + params: AddConversationListenerParams { + conversation_id, + experimental_raw_events: false, + }, }; self.send_request(request, "addConversationListener").await } @@ -216,6 +221,16 @@ impl AppServerClient { } Ok(()) } + ServerRequest::CommandExecutionRequestApproval { .. } + | ServerRequest::FileChangeRequestApproval { .. } => { + // These are unreachable until switching to v2 APIs for starting the session. + // https://github.com/openai/codex/blob/cbd7d0d54330443887852b21636c816f60f1bde8/codex-rs/app-server-protocol/src/protocol/common.rs#L445 + tracing::error!("received unsupported server request: {:?}", request); + Err( + ExecutorApprovalError::RequestFailed("unsupported server request".to_string()) + .into(), + ) + } } } diff --git a/crates/executors/src/executors/codex/normalize_logs.rs b/crates/executors/src/executors/codex/normalize_logs.rs index b726b1f5..0084b0c9 100644 --- a/crates/executors/src/executors/codex/normalize_logs.rs +++ b/crates/executors/src/executors/codex/normalize_logs.rs @@ -17,7 +17,7 @@ use codex_protocol::{ ErrorEvent, EventMsg, ExecApprovalRequestEvent, ExecCommandBeginEvent, ExecCommandEndEvent, ExecCommandOutputDeltaEvent, ExecOutputStream, FileChange as CodexProtoFileChange, McpInvocation, McpToolCallBeginEvent, McpToolCallEndEvent, PatchApplyBeginEvent, - PatchApplyEndEvent, StreamErrorEvent, TokenUsageInfo, ViewImageToolCallEvent, + PatchApplyEndEvent, StreamErrorEvent, TokenUsageInfo, ViewImageToolCallEvent, WarningEvent, WebSearchBeginEvent, WebSearchEndEvent, }, }; @@ -460,15 +460,21 @@ pub fn normalize_logs(msg_store: Arc, worktree_path: &Path) { upsert_normalized_entry(&msg_store, index, entry, is_new); state.thinking = None; } - EventMsg::AgentReasoningSectionBreak(AgentReasoningSectionBreakEvent {}) => { + EventMsg::AgentReasoningSectionBreak(AgentReasoningSectionBreakEvent { + item_id: _, + summary_index: _, + }) => { state.assistant = None; state.thinking = None; } EventMsg::ExecApprovalRequest(ExecApprovalRequestEvent { call_id, + turn_id: _, command, cwd: _, reason, + risk: _, + parsed_cmd: _, }) => { state.assistant = None; state.thinking = None; @@ -504,6 +510,7 @@ pub fn normalize_logs(msg_store: Arc, worktree_path: &Path) { } EventMsg::ApplyPatchApprovalRequest(ApplyPatchApprovalRequestEvent { call_id, + turn_id: _, changes, reason: _, grant_root: _, @@ -539,7 +546,13 @@ pub fn normalize_logs(msg_store: Arc, worktree_path: &Path) { } } EventMsg::ExecCommandBegin(ExecCommandBeginEvent { - call_id, command, .. + call_id, + turn_id: _, + command, + cwd: _, + parsed_cmd: _, + source: _, + interaction_input: _, }) => { state.assistant = None; state.thinking = None; @@ -596,6 +609,12 @@ pub fn normalize_logs(msg_store: Arc, worktree_path: &Path) { } EventMsg::ExecCommandEnd(ExecCommandEndEvent { call_id, + turn_id: _, + command: _, + cwd: _, + parsed_cmd: _, + source: _, + interaction_input: _, stdout: _, stderr: _, aggregated_output: _, @@ -635,7 +654,10 @@ pub fn normalize_logs(msg_store: Arc, worktree_path: &Path) { }, ); } - EventMsg::StreamError(StreamErrorEvent { message }) => { + EventMsg::StreamError(StreamErrorEvent { + message, + codex_error_info, + }) => { add_normalized_entry( &msg_store, &entry_index, @@ -644,7 +666,7 @@ pub fn normalize_logs(msg_store: Arc, worktree_path: &Path) { entry_type: NormalizedEntryType::ErrorMessage { error_type: NormalizedEntryError::Other, }, - content: format!("Stream error: {message}"), + content: format!("Stream error: {message} {codex_error_info:?}"), metadata: None, }, ); @@ -918,7 +940,7 @@ pub fn normalize_logs(msg_store: Arc, worktree_path: &Path) { }, ); } - EventMsg::Error(ErrorEvent { message }) => { + EventMsg::Warning(WarningEvent { message }) => { add_normalized_entry( &msg_store, &entry_index, @@ -932,6 +954,23 @@ pub fn normalize_logs(msg_store: Arc, worktree_path: &Path) { }, ); } + EventMsg::Error(ErrorEvent { + message, + codex_error_info, + }) => { + add_normalized_entry( + &msg_store, + &entry_index, + NormalizedEntry { + timestamp: None, + entry_type: NormalizedEntryType::ErrorMessage { + error_type: NormalizedEntryError::Other, + }, + content: format!("Error: {message} {codex_error_info:?}"), + metadata: None, + }, + ); + } EventMsg::TokenCount(payload) => { if let Some(info) = payload.info { state.token_usage_info = Some(info); @@ -944,10 +983,20 @@ pub fn normalize_logs(msg_store: Arc, worktree_path: &Path) { | EventMsg::TurnDiff(..) | EventMsg::GetHistoryEntryResponse(..) | EventMsg::McpListToolsResponse(..) + | EventMsg::McpStartupComplete(..) + | EventMsg::McpStartupUpdate(..) + | EventMsg::DeprecationNotice(..) + | EventMsg::UndoCompleted(..) + | EventMsg::UndoStarted(..) + | EventMsg::RawResponseItem(..) + | EventMsg::ItemStarted(..) + | EventMsg::ItemCompleted(..) + | EventMsg::AgentMessageContentDelta(..) + | EventMsg::ReasoningContentDelta(..) + | EventMsg::ReasoningRawContentDelta(..) | EventMsg::ListCustomPromptsResponse(..) | EventMsg::TurnAborted(..) | EventMsg::ShutdownComplete - | EventMsg::ConversationPath(..) | EventMsg::EnteredReviewMode(..) | EventMsg::ExitedReviewMode(..) | EventMsg::TaskComplete(..) => {} diff --git a/shared/schemas/codex.json b/shared/schemas/codex.json index ff635338..32baf17e 100644 --- a/shared/schemas/codex.json +++ b/shared/schemas/codex.json @@ -61,6 +61,7 @@ "low", "medium", "high", + "xhigh", null ] }, @@ -102,15 +103,27 @@ "null" ] }, - "include_plan_tool": { + "include_apply_patch_tool": { "type": [ "boolean", "null" ] }, - "include_apply_patch_tool": { + "model_provider": { "type": [ - "boolean", + "string", + "null" + ] + }, + "compact_prompt": { + "type": [ + "string", + "null" + ] + }, + "developer_instructions": { + "type": [ + "string", "null" ] }, diff --git a/shared/types.ts b/shared/types.ts index 678a2ea6..ff259c5d 100644 --- a/shared/types.ts +++ b/shared/types.ts @@ -244,13 +244,13 @@ export type Gemini = { append_prompt: AppendPrompt, model?: string | null, yolo? export type Amp = { append_prompt: AppendPrompt, dangerously_allow_all?: boolean | null, base_command_override?: string | null, additional_params?: Array | null, }; -export type Codex = { append_prompt: AppendPrompt, sandbox?: SandboxMode | null, ask_for_approval?: AskForApproval | null, oss?: boolean | null, model?: string | null, model_reasoning_effort?: ReasoningEffort | null, model_reasoning_summary?: ReasoningSummary | null, model_reasoning_summary_format?: ReasoningSummaryFormat | null, profile?: string | null, base_instructions?: string | null, include_plan_tool?: boolean | null, include_apply_patch_tool?: boolean | null, base_command_override?: string | null, additional_params?: Array | null, }; +export type Codex = { append_prompt: AppendPrompt, sandbox?: SandboxMode | null, ask_for_approval?: AskForApproval | null, oss?: boolean | null, model?: string | null, model_reasoning_effort?: ReasoningEffort | null, model_reasoning_summary?: ReasoningSummary | null, model_reasoning_summary_format?: ReasoningSummaryFormat | null, profile?: string | null, base_instructions?: string | null, include_apply_patch_tool?: boolean | null, model_provider?: string | null, compact_prompt?: string | null, developer_instructions?: string | null, base_command_override?: string | null, additional_params?: Array | null, }; export type SandboxMode = "auto" | "read-only" | "workspace-write" | "danger-full-access"; export type AskForApproval = "unless-trusted" | "on-failure" | "on-request" | "never"; -export type ReasoningEffort = "low" | "medium" | "high"; +export type ReasoningEffort = "low" | "medium" | "high" | "xhigh"; export type ReasoningSummary = "auto" | "concise" | "detailed" | "none";