From 3f30746237a6ac3edd104a927ac5e5e9978a6984 Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Wed, 25 Feb 2026 12:01:48 -0800 Subject: [PATCH] Add simple realtime text logs (#12807) Update realtime debug logs to include the actual text payloads in both input and output paths. - In `core/src/realtime_conversation.rs`: - `handle_start`: add extracted assistant text output to the `[realtime-text]` debug log. - `handle_text`: add incoming text input (`params.text`) to the `[realtime-text]` debug log. No tests were run (per request). --- codex-rs/core/src/realtime_conversation.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/codex-rs/core/src/realtime_conversation.rs b/codex-rs/core/src/realtime_conversation.rs index 47a4354e2..1b858aedc 100644 --- a/codex-rs/core/src/realtime_conversation.rs +++ b/codex-rs/core/src/realtime_conversation.rs @@ -29,6 +29,7 @@ use serde_json::Value; use std::sync::Arc; use tokio::sync::Mutex; use tokio::task::JoinHandle; +use tracing::debug; use tracing::error; use tracing::warn; @@ -217,6 +218,7 @@ pub(crate) async fn handle_start( _ => None, }; if let Some(text) = maybe_routed_text { + debug!(text = %text, "[realtime-text] realtime conversation text output"); let sess_for_routed_text = Arc::clone(&sess_clone); sess_for_routed_text.route_realtime_text_input(text).await; } @@ -279,6 +281,8 @@ pub(crate) async fn handle_text( sub_id: String, params: ConversationTextParams, ) { + debug!(text = %params.text, "[realtime-text] appending realtime conversation text input"); + if let Err(err) = sess.conversation.text_in(params.text).await { send_conversation_error(sess, sub_id, err.to_string(), CodexErrorInfo::BadRequest).await; }