mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Include sender user messages in Guardian delegation reviews (#46179)
## Why A delegated task can omit restrictions from the sender's user messages. Guardian needs that context when reviewing actions in the receiving thread. ## What changed - When thread-owned Guardian context is enabled, capture up to three recent local user messages when a `send_message_to_thread` delivery from `codex_app` or `codex_tui` is accepted. - Provide a bounded snapshot to synchronous and asynchronous reviewers, with explicit notices for unavailable evidence and a reminder that historical context does not transfer permission. Keep the snapshot out of the worker prompt. - Retain snapshots with their deliveries across replay, compaction, and rollback, and strip them from forked agent history. ## Testing Add coverage for reviewer-only visibility, missing sender provenance, context-budget preservation, checkpoint replay and rollback, fork isolation, and input serialization that rejects harness metadata. GitOrigin-RevId: 3870ba762aa81689713b56d4cb3b98566bffed88
This commit is contained in:
1 parent
b0659c5386
commit
e269f2164c
22 files changed
+666
-19
No files matched your search
@@ -18,6 +18,7 @@ use codex_protocol::models::ResponseItem;
|
||||
use authorization::RootConversationSection;
|
||||
use authorization::TrustedUserAnswersSection;
|
||||
use retained_instructions::RetainedUserInstructionsSection;
|
||||
use sender_user_messages::SenderUserMessagesSection;
|
||||
use transcript::ConversationTranscriptSection;
|
||||
|
||||
pub use action::ActionPresentation;
|
||||
@@ -44,6 +45,7 @@ pub use verified_answers::render_verified_answer;
|
||||
pub use verified_answers::render_verified_answers;
|
||||
|
||||
mod retained_instructions;
|
||||
mod sender_user_messages;
|
||||
|
||||
mod action;
|
||||
mod enforcement;
|
||||
@@ -254,6 +256,7 @@ pub fn default_registry() -> &'static SectionRegistry {
|
||||
registry.register(trusted_tool::TrustedToolSection);
|
||||
registry.register(trusted_skills::TrustedSkillsSection);
|
||||
registry.register(RootConversationSection);
|
||||
registry.register(SenderUserMessagesSection);
|
||||
registry.register(RetainedUserInstructionsSection);
|
||||
registry.register(TrustedUserAnswersSection);
|
||||
registry.register(ConversationTranscriptSection);
|
||||
|
||||
Reference in new issue
Block a user