Wire SubAgentManager into Session at CLI and workflow call sites

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Helmkamp 2026-03-23 13:18:31 -04:00
parent 60e5e2fad1
commit 2f75191935
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View file

@ -472,6 +472,7 @@ pub async fn run_with_args_and_client(
let profile: Arc<dyn AgentProfile> = Arc::from(profile);
let mut session = Session::new(client, profile, env, config);
session.set_subagent_manager(manager_for_callback.clone());
// Wire subagent event callback to parent session's emitter
manager_for_callback

View file

@ -242,6 +242,7 @@ impl AgentApiBackend {
let profile: Arc<dyn AgentProfile> = Arc::from(profile);
let mut session = Session::new(client, profile, Arc::clone(sandbox), config);
session.set_subagent_manager(manager_for_callback.clone());
if !env.is_empty() {
session.set_tool_env(env.clone());
}