From 52d6a68ce90a5bef838ec33e8097bae3299d5c3e Mon Sep 17 00:00:00 2001 From: Owen Lin Date: Mon, 3 Nov 2025 07:32:43 -0800 Subject: [PATCH] fix --- codex-rs/app-server/src/codex_message_processor.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/codex-rs/app-server/src/codex_message_processor.rs b/codex-rs/app-server/src/codex_message_processor.rs index 95f06a3039..4f80180fc6 100644 --- a/codex-rs/app-server/src/codex_message_processor.rs +++ b/codex-rs/app-server/src/codex_message_processor.rs @@ -1140,15 +1140,13 @@ impl CodexMessageProcessor { let canonical_sessions_dir = match tokio::fs::canonicalize(&rollout_folder).await { Ok(path) => path, Err(err) => { - let error = JSONRPCErrorError { + return Err(JSONRPCErrorError { code: INTERNAL_ERROR_CODE, message: format!( "failed to archive conversation: unable to resolve sessions directory: {err}" ), data: None, - }; - self.outgoing.send_error(request_id, error).await; - return; + }); } }; let canonical_rollout_path = tokio::fs::canonicalize(rollout_path).await; @@ -1157,16 +1155,14 @@ impl CodexMessageProcessor { { path } else { - let error = JSONRPCErrorError { + return Err(JSONRPCErrorError { code: INVALID_REQUEST_ERROR_CODE, message: format!( "rollout path `{}` must be in sessions directory", rollout_path.display() ), data: None, - }; - self.outgoing.send_error(request_id, error).await; - return; + }); }; // Verify file name matches conversation id.