Skip to main content

run_handoff_turn

Function run_handoff_turn 

Source
pub async fn run_handoff_turn(
    runtime: &mut Runtime,
    messages: &mut Vec<SharedMessage>,
    role: &TurnBudget,
    totals: &mut SessionTotals,
    interrupted: &Arc<AtomicBool>,
    on_event: impl FnMut(&StreamEvent, &SessionTotals),
) -> TurnReport
Expand description

After a session limit: ask for the handoff in one more turn, bounded by HANDOFF_TIMEOUT and the role’s per-turn limits, and metered into totals like every other turn (it is real spend).