@@ -3512,7 +3512,6 @@ impl Session {
35123512 {
35133513 developer_envelope. push ( subagent_roster) ;
35143514 }
3515- if let Some ( developer_message) = developer_envelope. build ( ) {
35163515 let mut items = Vec :: with_capacity ( 3 ) ;
35173516 if let Some ( developer_message) = developer_envelope. build ( ) {
35183517 items. push ( developer_message) ;
@@ -5640,6 +5639,7 @@ pub(crate) async fn run_turn(
56405639 . await ;
56415640 let mut last_agent_message: Option < String > = None ;
56425641 let mut stop_hook_active = false ;
5642+ let mut pending_stop_hook_message: Option < String > = None ;
56435643 // Although from the perspective of codex.rs, TurnDiffTracker has the lifecycle of a Task which contains
56445644 // many turns, from the perspective of the user, it is a single turn.
56455645 let turn_diff_tracker = Arc :: new ( tokio:: sync:: Mutex :: new ( TurnDiffTracker :: new ( ) ) ) ;
@@ -5838,13 +5838,7 @@ pub(crate) async fn run_turn(
58385838 if stop_outcome. should_block {
58395839 if let Some ( continuation_prompt) = stop_outcome. continuation_prompt . clone ( )
58405840 {
5841- let developer_message: ResponseItem =
5842- DeveloperInstructions :: new ( continuation_prompt) . into ( ) ;
5843- sess. record_conversation_items (
5844- & turn_context,
5845- std:: slice:: from_ref ( & developer_message) ,
5846- )
5847- . await ;
5841+ pending_stop_hook_message = Some ( continuation_prompt) ;
58485842 stop_hook_active = true ;
58495843 continue ;
58505844 } else {
0 commit comments