From 37a30d2f380b33ee4ebbd0f3ccf30fc186b8a9cd Mon Sep 17 00:00:00 2001 From: jif-oai Date: Wed, 22 Oct 2025 19:26:03 +0100 Subject: [PATCH] Add back error messages --- codex-rs/core/src/tools/orchestrator.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/codex-rs/core/src/tools/orchestrator.rs b/codex-rs/core/src/tools/orchestrator.rs index bdc4e3aff7..a338a217fb 100644 --- a/codex-rs/core/src/tools/orchestrator.rs +++ b/codex-rs/core/src/tools/orchestrator.rs @@ -161,12 +161,10 @@ fn build_never_denied_message_from_output(output: &ExecToolCallOutput) -> String match detail { Some(tag) => format!("failed in sandbox: {tag}"), - None => "failed in sandbox".to_string(), + None => format!("failed in sandbox: {}", output.aggregated_output.text), } } -fn build_denial_reason_from_output(_output: &ExecToolCallOutput) -> String { - // Keep approval reason terse and stable for UX/tests, but accept the - // output so we can evolve heuristics later without touching call sites. - "command failed; retry without sandbox?".to_string() +fn build_denial_reason_from_output(output: &ExecToolCallOutput) -> String { + format!("command failed: {}\nretry without sandbox?", output.aggregated_output.text) }