fix(core): populate fork mode in spawn handlers

This commit is contained in:
Friel
2026-03-31 23:57:24 +00:00
parent a765eb2cef
commit 9e3862778b
2 changed files with 4 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
use super::*;
use crate::agent::control::SpawnAgentForkMode;
use crate::agent::control::SpawnAgentOptions;
use crate::agent::control::render_input_preview;
use crate::agent::role::DEFAULT_ROLE_NAME;
@@ -115,6 +116,7 @@ impl ToolHandler for Handler {
)?),
SpawnAgentOptions {
fork_parent_spawn_call_id: args.fork_context.then(|| call_id.clone()),
fork_mode: args.fork_context.then_some(SpawnAgentForkMode::FullHistory),
},
)
.await;

View File

@@ -1,4 +1,5 @@
use super::*;
use crate::agent::control::SpawnAgentForkMode;
use crate::agent::control::SpawnAgentOptions;
use crate::agent::control::render_input_preview;
use crate::agent::next_thread_spawn_depth;
@@ -139,6 +140,7 @@ impl ToolHandler for Handler {
Some(spawn_source.clone()),
SpawnAgentOptions {
fork_parent_spawn_call_id: args.fork_context.then(|| call_id.clone()),
fork_mode: args.fork_context.then_some(SpawnAgentForkMode::FullHistory),
},
)
.await;