@@ -3516,7 +3516,6 @@ impl Session {
35163516 {
35173517 developer_envelope. push ( subagent_roster) ;
35183518 }
3519- if let Some ( developer_message) = developer_envelope. build ( ) {
35203519 let mut items = Vec :: with_capacity ( 3 ) ;
35213520 if let Some ( developer_message) = developer_envelope. build ( ) {
35223521 items. push ( developer_message) ;
@@ -5646,6 +5645,7 @@ pub(crate) async fn run_turn(
56465645 . await ;
56475646 let mut last_agent_message: Option < String > = None ;
56485647 let mut stop_hook_active = false ;
5648+ let mut pending_stop_hook_message: Option < String > = None ;
56495649 // Although from the perspective of codex.rs, TurnDiffTracker has the lifecycle of a Task which contains
56505650 // many turns, from the perspective of the user, it is a single turn.
56515651 let turn_diff_tracker = Arc :: new ( tokio:: sync:: Mutex :: new ( TurnDiffTracker :: new ( ) ) ) ;
@@ -5844,13 +5844,7 @@ pub(crate) async fn run_turn(
58445844 if stop_outcome. should_block {
58455845 if let Some ( continuation_prompt) = stop_outcome. continuation_prompt . clone ( )
58465846 {
5847- let developer_message: ResponseItem =
5848- DeveloperInstructions :: new ( continuation_prompt) . into ( ) ;
5849- sess. record_conversation_items (
5850- & turn_context,
5851- std:: slice:: from_ref ( & developer_message) ,
5852- )
5853- . await ;
5847+ pending_stop_hook_message = Some ( continuation_prompt) ;
58545848 stop_hook_active = true ;
58555849 continue ;
58565850 } else {
0 commit comments