This commit is contained in:
jif-oai
2026-03-31 11:22:38 +02:00
committed by GitHub
parent 873e466549
commit 25fbd7e40e
3 changed files with 99 additions and 73 deletions

View File

@@ -4772,8 +4772,8 @@ mod handlers {
}
}
/// Records an inter-agent assistant envelope and, when requested, wakes the recipient by
/// starting a regular turn if the session is currently idle.
/// Records an inter-agent assistant envelope, then lets the shared pending-work scheduler
/// decide whether an idle session should start a regular turn.
pub async fn inter_agent_communication(
sess: &Arc<Session>,
sub_id: String,
@@ -4782,7 +4782,7 @@ mod handlers {
let trigger_turn = communication.trigger_turn;
sess.enqueue_mailbox_communication(communication);
if trigger_turn {
sess.ensure_task_for_pending_inputs_with_sub_id(sub_id)
sess.maybe_start_turn_for_pending_work_with_sub_id(sub_id)
.await;
}
}