mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Preserve delivered messages through post-tool hook failures (#47039)
## Why Guardian can lose a confirmed User Messaging message from its parent context when a `PostToolUse` hook blocks the result or is cancelled. The message has already been sent and remains relevant to interpreting the user's authorization. ## What changed Capture confirmed message text after input-rewriting hooks in shared per-call state before awaiting post-tool processing. Attach that evidence to the response metadata even when dispatch returns a blocked or aborted result, while keeping post-tool hooks cancellable. Calls cancelled before delivery confirmation contribute no message evidence. ## Testing Extend Guardian subagent authorization coverage to verify retained messages after post-tool hook blocking and cancellation, and their absence when cancellation precedes delivery confirmation. GitOrigin-RevId: 9abb7959980eada20d0fb5c0b3a4a8669e4cd0a3
This commit is contained in:
@@ -402,6 +402,7 @@ fn submit_nested_tool(
|
||||
runtime_tool_call_id,
|
||||
},
|
||||
cancellation_token,
|
||||
Arc::default(),
|
||||
);
|
||||
Ok(async move { Ok(result.await?.code_mode_result()) })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user