huskies: merge 967

This commit is contained in:
dave
2026-05-13 12:34:35 +00:00
parent 40ea100eae
commit 93f774fcbb
9 changed files with 165 additions and 0 deletions
+13
View File
@@ -320,6 +320,13 @@ pub(super) async fn run_agent_spawn(
.and_then(|a| a.runtime.as_deref())
.unwrap_or("claude-code");
// Extract model once so it can be shared across all runtime branches and
// passed to RuntimeContext for eager session recording (bug 967).
let agent_model = config_clone
.find_agent(&aname)
.and_then(|a| a.model.clone())
.unwrap_or_default();
let run_result = match runtime_name {
"claude-code" => {
let runtime =
@@ -335,6 +342,8 @@ pub(super) async fn run_agent_spawn(
app_ctx: app_ctx.clone(),
session_id_to_resume: session_id_to_resume_owned.clone(),
fresh_prompt: fresh_prompt.clone(),
project_root: project_root_clone.clone(),
model: agent_model.clone(),
};
runtime
.start(ctx, tx_clone.clone(), log_clone.clone(), log_writer_clone)
@@ -353,6 +362,8 @@ pub(super) async fn run_agent_spawn(
app_ctx: app_ctx.clone(),
session_id_to_resume: session_id_to_resume_owned.clone(),
fresh_prompt: fresh_prompt.clone(),
project_root: project_root_clone.clone(),
model: agent_model.clone(),
};
runtime
.start(ctx, tx_clone.clone(), log_clone.clone(), log_writer_clone)
@@ -371,6 +382,8 @@ pub(super) async fn run_agent_spawn(
app_ctx: app_ctx.clone(),
session_id_to_resume: session_id_to_resume_owned,
fresh_prompt,
project_root: project_root_clone.clone(),
model: agent_model,
};
runtime
.start(ctx, tx_clone.clone(), log_clone.clone(), log_writer_clone)