fix: negotiate disabled fork support before creation

This commit is contained in:
jif-oai
2026-06-11 15:24:49 +01:00
parent d7da47715b
commit ca90e60290
18 changed files with 324 additions and 21 deletions
+26 -9
View File
@@ -864,15 +864,8 @@ impl ThreadManager {
{
let snapshot = snapshot.into();
let history = self.initial_history_from_rollout_path(path).await?;
self.fork_thread_from_history(
snapshot,
config,
history,
MultiAgentRuntimeOverride::Inherit,
thread_source,
parent_trace,
)
.await
self.fork_thread_from_history(snapshot, config, history, thread_source, parent_trace)
.await
}
async fn initial_history_from_rollout_path(
@@ -895,6 +888,30 @@ impl ThreadManager {
/// Fork an existing thread from already-loaded store history.
pub async fn fork_thread_from_history<S>(
&self,
snapshot: S,
config: Config,
history: InitialHistory,
thread_source: Option<ThreadSource>,
parent_trace: Option<W3cTraceContext>,
) -> CodexResult<NewThread>
where
S: Into<ForkSnapshot>,
{
self.fork_thread_from_history_with_runtime_override(
snapshot,
config,
history,
MultiAgentRuntimeOverride::Inherit,
thread_source,
parent_trace,
)
.await
}
/// Fork an existing thread from already-loaded store history with an
/// explicit multi-agent runtime override.
pub async fn fork_thread_from_history_with_runtime_override<S>(
&self,
snapshot: S,
config: Config,
-1
View File
@@ -199,7 +199,6 @@ async fn fork_thread_from_history_does_not_require_source_rollout_path() {
history: source_items.clone(),
rollout_path: None,
}),
codex_core::MultiAgentRuntimeOverride::Inherit,
/*thread_source*/ None,
/*parent_trace*/ None,
)