mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Separate thread startup metadata from replay history (#46294)
## Why `CodexThread` retained the full `SessionConfiguredEvent`, including initial replay messages, and cloned it even for callers that only needed thread or session IDs. ## What changed Store `ThreadStartupMetadata` without replay history and expose it by reference through `startup_metadata()`. Update callers to read IDs from this metadata. When rejoining a running thread, rebuild the startup response using the supplied resume history for `initial_messages`. ## Testing Extend the resume test to verify that rejoining reuses the loaded thread, preserves startup metadata, and still returns the original replay messages as a prefix. GitOrigin-RevId: 9d656063088c28f091d29e5862e4b9d894b7642c
This commit is contained in:
@@ -371,7 +371,7 @@ impl QueuedItemService {
|
||||
queued_item_id: Option<String>,
|
||||
trace: Option<W3cTraceContext>,
|
||||
) -> Result<StartIfIdleSubmission, QueueServiceError> {
|
||||
let thread_id = thread.session_configured().thread_id;
|
||||
let thread_id = thread.startup_metadata().thread_id;
|
||||
let _dispatch_guard = self.dispatch_guard(thread_id).await;
|
||||
let item = self
|
||||
.list(thread_id)
|
||||
|
||||
Reference in New Issue
Block a user