mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
## Why Plaintext agent messages injected through `thread/inject_items` could be saved to root-thread history without waking the thread, even when agent-message wakes were enabled. ## What changed After persisting a batch of plaintext agent messages with unspecified retention, let the native multi-agent v2 root thread's mailbox scheduler apply its usual wake and turn-admission rules. Use the recorded history sequence to skip a wake if another turn already read the messages and to deliver the mail directly from history without re-enqueueing it. ## Testing Cover app-server injection with wakes enabled and disabled, wake a reloaded sleeping root with its previous turn context, and verify that a paused turn-admission gate defers the wake and the eventual model request contains the message once. GitOrigin-RevId: 5fde8062a179fd7a7919d240373592f2dbb4a389