mirror of
https://github.com/openai/codex.git
synced 2026-10-24 18:18:41 +00:00
Preserve strict MCP auto-review outcomes (#40031)
## What changed Propagate canonical denial, timeout, and abort responses from strict MCP auto-review instead of replacing them with a generic decline. This preserves the reviewer's action and metadata, including denial rationale, while still failing closed when no canonical decision is available. Update the fallback message to direct the agent to request explicit user approval before proceeding. ## Testing Add unit and app-server integration coverage for strict auto-review denials and cancellations. GitOrigin-RevId: d8126ab223ab546b95e2d984f6e4dd540a324a59
This commit is contained in:
@@ -807,7 +807,14 @@ async fn review_guardian_mcp_elicitation(
|
||||
)
|
||||
.await;
|
||||
|
||||
return Ok(matches!(decision, ReviewDecision::Approved).then(|| {
|
||||
return Ok(matches!(
|
||||
decision,
|
||||
ReviewDecision::Approved
|
||||
| ReviewDecision::Denied { .. }
|
||||
| ReviewDecision::TimedOut
|
||||
| ReviewDecision::Abort
|
||||
)
|
||||
.then(|| {
|
||||
mcp_elicitation_response_from_guardian_decision(decision, &turn_context.model_info)
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user