Expand description
Single authoritative pre-execution session mutation point.
Historically three execution entry points each duplicated — with subtly
different logic — the work of (a) placing the authoritative leading System
message and (b) setting session.model before handing the session to the
agent loop. This module consolidates that into prepare_session_for_execution
so there is exactly one place that defines the pre-execution mutation.
The three callers are:
- the SDK facade (
bamboo_sdk::agent::Agent::execute_internal), which owns a configured instruction and model and passes both; - the server spawn path (
runtime::execution::agent_spawn::spawn_session_execution), whose caller has already placed the system prompt, so it passesNoneforsystem_promptand only the resolved model; - the child spawn path (
sdk::spawn::run_child_spawn), likewiseNonefor the system prompt and only the child model.
Functions§
- prepare_
session_ for_ execution - Apply the authoritative pre-execution mutations to
session.