mirror of
https://github.com/openai/codex.git
synced 2026-09-13 11:47:17 +00:00
Load thread titles concurrently during session startup (#35779)
## What changed Run the thread-title lookup alongside instruction refresh and plugin and skill warmup, avoiding an additional sequential wait during session initialization. GitOrigin-RevId: 021f48abeac249c5d3fe526d026bf031acf1bed9
This commit is contained in:
@@ -954,9 +954,16 @@ impl Session {
|
||||
"session_init.plugin_skill_warmup",
|
||||
otel.name = "session_init.plugin_skill_warmup",
|
||||
));
|
||||
let ((), plugin_skill_errors) = tokio::join!(
|
||||
let thread_name_lookup =
|
||||
thread_title_from_thread_store(live_thread_init.as_ref(), &thread_store, thread_id)
|
||||
.instrument(info_span!(
|
||||
"session_init.thread_name_lookup",
|
||||
otel.name = "session_init.thread_name_lookup",
|
||||
));
|
||||
let ((), plugin_skill_errors, thread_name) = tokio::join!(
|
||||
agents_md_manager.refresh(config.as_ref(), &resolved_environments),
|
||||
plugin_skill_warmup,
|
||||
thread_name_lookup,
|
||||
);
|
||||
for err in &plugin_skill_errors {
|
||||
error!(
|
||||
@@ -965,13 +972,6 @@ impl Session {
|
||||
err.message
|
||||
);
|
||||
}
|
||||
let thread_name =
|
||||
thread_title_from_thread_store(live_thread_init.as_ref(), &thread_store, thread_id)
|
||||
.instrument(info_span!(
|
||||
"session_init.thread_name_lookup",
|
||||
otel.name = "session_init.thread_name_lookup",
|
||||
))
|
||||
.await;
|
||||
session_configuration.thread_name = thread_name.clone();
|
||||
validate_config_lock_if_configured(&session_configuration).await?;
|
||||
export_config_lock_if_configured(&session_configuration, thread_id).await?;
|
||||
|
||||
Reference in New Issue
Block a user