From 0fce9332903d1d033ed71a488b81c44f90a7e47f Mon Sep 17 00:00:00 2001 From: "Adam Perry @ OpenAI" Date: Fri, 14 Aug 2026 17:33:02 +0000 Subject: [PATCH] Remove the gRPC code-mode enabled tool limit (#38615) ## What changed Stop rejecting code-mode execute requests solely because `enabled_tools` contains more than 1,024 definitions. Continue validating each tool definition while converting the request. GitOrigin-RevId: da83b61c5f659e6aa221ed663821edcdfc29d3f1 --- codex-rs/code-mode-host/src/grpc/conversions.rs | 6 ------ codex-rs/code-mode-host/src/grpc/validation.rs | 1 - 2 files changed, 7 deletions(-) diff --git a/codex-rs/code-mode-host/src/grpc/conversions.rs b/codex-rs/code-mode-host/src/grpc/conversions.rs index 2f4f8b5f0c..a9dcabcab3 100644 --- a/codex-rs/code-mode-host/src/grpc/conversions.rs +++ b/codex-rs/code-mode-host/src/grpc/conversions.rs @@ -29,12 +29,6 @@ pub(super) fn session_limits( pub(super) fn execute_request(request: proto::ExecuteRequest) -> Result { validation::identifier(&request.tool_call_id, "tool call ID")?; - if request.enabled_tools.len() > validation::MAX_TOOL_DEFINITIONS { - return Err(Status::invalid_argument(format!( - "code-mode execution exceeds {} enabled tools", - validation::MAX_TOOL_DEFINITIONS - ))); - } Ok(ExecuteRequest { tool_call_id: request.tool_call_id, source: request.source, diff --git a/codex-rs/code-mode-host/src/grpc/validation.rs b/codex-rs/code-mode-host/src/grpc/validation.rs index 7326665897..3f0559f988 100644 --- a/codex-rs/code-mode-host/src/grpc/validation.rs +++ b/codex-rs/code-mode-host/src/grpc/validation.rs @@ -5,7 +5,6 @@ use uuid::Uuid; pub(super) use codex_code_mode_protocol::grpc::MAX_IDENTIFIER_BYTES; pub(super) use codex_code_mode_protocol::grpc::MAX_TOOL_ERROR_BYTES; pub(super) const MAX_TOOL_FILTERS: usize = 64; -pub(super) const MAX_TOOL_DEFINITIONS: usize = 1_024; pub(super) fn identifier(value: &str, field: &str) -> Result<(), Status> { if value.is_empty() {