mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
Add lifecycle hooks for inter-agent messages (#55657)
## What changed Add `MessageLifecycleContributor` hooks to capture extension state when local agent control publishes a message and notify contributors when the recipient commits it to history, before sampling. Carry shared delivery state through submissions, input queues, and mailbox eviction with `PendingAgentMessage`. Notify consumption at most once per delivery, release captured state when consumed or abandoned, and drop pending mail outside queue locks. Preserve the serialized message format without republishing restored history. ## Testing Extend the mailbox eviction test to verify that publication state survives eviction and retained messages are consumed before the first resumed model sample. GitOrigin-RevId: 9a1f6832bd48ec646a3fd179485c095e8dcc72cc
This commit is contained in:
committed by
copyberry
parent
87f3c3284e
commit
66d0de9983
@@ -404,7 +404,7 @@ impl CodexThread {
|
||||
self.io
|
||||
.submit_with_trace(
|
||||
op, trace, /*parent_turn_id*/ None, /*root_turn_id*/ None,
|
||||
/*residency_guard*/ None,
|
||||
/*residency_guard*/ None, /*message_delivery*/ None,
|
||||
)
|
||||
.await
|
||||
}
|
||||
@@ -550,6 +550,7 @@ impl CodexThread {
|
||||
parent_turn_id: None,
|
||||
root_turn_id: None,
|
||||
residency_guard: None,
|
||||
message_delivery: None,
|
||||
})
|
||||
.await
|
||||
.map_err(|_| CodexErr::Fatal("thread session has stopped".to_string()))?;
|
||||
|
||||
Reference in New Issue
Block a user