mirror of
https://github.com/openai/codex.git
synced 2026-11-17 22:10:37 +00:00
fix(core): populate fork mode in spawn handlers
This commit is contained in:
@@ -165,11 +165,18 @@ impl ToolHandler for Handler {
|
||||
let thread_id = spawn_watchdog(
|
||||
&session.services.agent_control,
|
||||
candidate_config,
|
||||
prompt.clone(),
|
||||
session.conversation_id,
|
||||
child_depth,
|
||||
watchdog_interval_s,
|
||||
spawn_source.clone(),
|
||||
input_items.clone(),
|
||||
Some(thread_spawn_source(
|
||||
session.conversation_id,
|
||||
&turn.session_source,
|
||||
child_depth,
|
||||
role_name,
|
||||
/*task_name*/ None,
|
||||
)?),
|
||||
SpawnAgentOptions {
|
||||
fork_parent_spawn_call_id: args.fork_context.then(|| call_id.clone()),
|
||||
fork_mode: args.fork_context.then_some(SpawnAgentForkMode::FullHistory),
|
||||
},
|
||||
)
|
||||
.await
|
||||
.map_err(collab_spawn_error)?;
|
||||
|
||||
@@ -183,8 +183,8 @@ impl ToolHandler for Handler {
|
||||
initial_agent_op.clone(),
|
||||
Some(spawn_source.clone()),
|
||||
SpawnAgentOptions {
|
||||
fork_parent_spawn_call_id: fork_context.then(|| call_id.clone()),
|
||||
..Default::default()
|
||||
fork_parent_spawn_call_id: args.fork_context.then(|| call_id.clone()),
|
||||
fork_mode: args.fork_context.then_some(SpawnAgentForkMode::FullHistory),
|
||||
},
|
||||
)
|
||||
.await;
|
||||
|
||||
Reference in New Issue
Block a user