Lightweight coding agent that runs in your terminal
Rust
fix(app-server): add will_retry to ErrorNotification (#7611)
Owen Line8f6d6589947
diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rsindex f650d4d1f0..cef25ca1b7 100644--- a/codex-rs/app-server-protocol/src/protocol/v2.rs+++ b/codex-rs/app-server-protocol/src/protocol/v2.rs@@ -942,6 +942,9 @@ pub struct TurnError {#[ts(export_to = "v2/")]pub struct ErrorNotification {pub error: TurnError,+ // Set to true if the error is transient and the app-server process will automatically retry.+ // If true, this will not interrupt a turn.+ pub will_retry: bool,pub thread_id: String,pub turn_id: String,}diff --git a/codex-rs/app-server/src/bespoke_event_handling.rs b/codex-rs/app-server/src/bespoke_event_handling.rsindex 547daf08b7..c9ecd01161 100644--- a/codex-rs/app-server/src/bespoke_event_handling.rs+++ b/codex-rs/app-server/src/bespoke_event_handling.rs@@ -333,6 +333,7 @@ pub(crate) async fn apply_bespoke_event_handling(outgoing.send_server_notification(ServerNotification::Error(ErrorNotification {error: turn_error,+ will_retry: false,thread_id: conversation_id.to_string(),turn_id: event_turn_id.clone(),}))@@ -348,6 +349,7 @@ pub(crate) async fn apply_bespoke_event_handling(outgoing.send_server_notification(ServerNotification::Error(ErrorNotification {error: turn_error,+ will_retry: true,thread_id: conversation_id.to_string(),turn_id: event_turn_id.clone(),}))