From 5d9779a0715123fbbea75611d420a863bfdf344f Mon Sep 17 00:00:00 2001 From: lionelchg Date: Thu, 27 Nov 2025 15:30:46 +0100 Subject: [PATCH] Pass comments of codex to enforce read-only at review_conversation level Signed-off-by: lionelchg --- codex-rs/core/src/tasks/review.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codex-rs/core/src/tasks/review.rs b/codex-rs/core/src/tasks/review.rs index 14a95dba5c..6ceb97caf9 100644 --- a/codex-rs/core/src/tasks/review.rs +++ b/codex-rs/core/src/tasks/review.rs @@ -96,6 +96,8 @@ async fn start_review_conversation( sub_agent_config.user_instructions = None; // Avoid loading project docs; reviewer only needs findings sub_agent_config.project_doc_max_bytes = 0; + // Enforce read-only sandbox for the review child session. + sub_agent_config.sandbox_mode = SandboxPolicy::ReadOnly; // Carry over review-only feature restrictions so the delegate cannot // re-enable blocked tools (web search, view image). sub_agent_config