-
Notifications
You must be signed in to change notification settings - Fork 14.2k
[codex] Store pending response items directly #24865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0a683cc
49cb5a6
8c80006
59b96e5
7a37149
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -568,7 +568,7 @@ async fn drain_to_completed( | |
| }; | ||
| match event { | ||
| Ok(ResponseEvent::OutputItemDone(item)) => { | ||
| sess.record_into_history(std::slice::from_ref(&item), turn_context) | ||
| sess.record_conversation_items(turn_context, std::slice::from_ref(&item)) | ||
| .await; | ||
|
Comment on lines
570
to
572
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
In local compaction, Useful? React with 👍 / 👎.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. replace_compacted_history "will" wipe these extra items anyway.
Comment on lines
+571
to
572
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For local compaction, this now persists and emits each compaction model Useful? React with 👍 / 👎. |
||
| } | ||
| Ok(ResponseEvent::ServerReasoningIncluded(included)) => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When
CodexThread::inject_response_itemsis called while a turn is active, this now routes throughinject_no_new_turn, whoseinject_if_runningsuccess path only appends the items to the active turn's pending-input queue and returns without recording them. The method still returnsOkafterflush_rollout, but the items are not in history/rollout until a later pending-input drain; if the active turn is interrupted or aborted first,abort_all_tasksclears that pending input, so an API call that previously durably appended raw items can silently lose them.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporary cost of unification for an advanced-use method.