From 63e0e6025d7562f426c3ec70fe87fb499444aef0 Mon Sep 17 00:00:00 2001 From: Alex Kotliarskyi Date: Fri, 16 Jan 2026 19:30:55 -0800 Subject: [PATCH] fix: accept legacy approval decisions in v2 --- codex-rs/app-server-protocol/src/protocol/v2.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/codex-rs/app-server-protocol/src/protocol/v2.rs b/codex-rs/app-server-protocol/src/protocol/v2.rs index b44e1575ad..a758c04d34 100644 --- a/codex-rs/app-server-protocol/src/protocol/v2.rs +++ b/codex-rs/app-server-protocol/src/protocol/v2.rs @@ -512,17 +512,22 @@ pub struct ConfigEdit { #[ts(export_to = "v2/")] pub enum CommandExecutionApprovalDecision { /// User approved the command. + #[serde(alias = "approved")] Accept, /// User approved the command and future identical commands should run without prompting. + #[serde(alias = "approved_for_session")] AcceptForSession, /// User approved the command, and wants to apply the proposed execpolicy amendment so future /// matching commands can run without prompting. + #[serde(alias = "approved_with_amendment")] AcceptWithExecpolicyAmendment { execpolicy_amendment: ExecPolicyAmendment, }, /// User denied the command. The agent will continue the turn. + #[serde(alias = "denied")] Decline, /// User denied the command. The turn will also be immediately interrupted. + #[serde(alias = "abort")] Cancel, } @@ -531,12 +536,16 @@ pub enum CommandExecutionApprovalDecision { #[ts(export_to = "v2/")] pub enum FileChangeApprovalDecision { /// User approved the file changes. + #[serde(alias = "approved")] Accept, /// User approved the file changes and future changes to the same files should run without prompting. + #[serde(alias = "approved_for_session")] AcceptForSession, /// User denied the file changes. The agent will continue the turn. + #[serde(alias = "denied")] Decline, /// User denied the file changes. The turn will also be immediately interrupted. + #[serde(alias = "abort")] Cancel, }