mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
Propagate approval rejection reasons (#34400)
## What changed - Change `ReviewDecision::Denied` to carry a rejection string and update the generated protocol schemas. - Preserve specific rejection reasons through command, patch, network, MCP, delegated, and automatic approval flows so tool results can return them to the model. - Distinguish invalid approval responses from user declines and truncate oversized rejection messages before adding them to model context. ## Testing - Add coverage for denial serialization, invalid app-server approval responses, dropped automatic reviews, network rejection propagation, and rejection-message truncation. GitOrigin-RevId: d48a55643aa03c7ecfa08a8e4b669913eec5464a
This commit is contained in:
@@ -94,7 +94,7 @@ impl From<CoreReviewDecision> for CommandExecutionApprovalDecision {
|
||||
network_policy_amendment: network_policy_amendment.into(),
|
||||
},
|
||||
CoreReviewDecision::Abort => Self::Cancel,
|
||||
CoreReviewDecision::Denied => Self::Decline,
|
||||
CoreReviewDecision::Denied { .. } => Self::Decline,
|
||||
CoreReviewDecision::TimedOut => Self::Decline,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user