mirror of
https://github.com/openai/codex.git
synced 2026-11-17 14:58:36 +00:00
Bind direct tool-call metadata to invocation outputs (#45185)
## Why Direct tool-call records need to stay associated with the invocation that produced each output, including when call IDs are reused. Completeness must describe the recorded call inventory, independently of tool success. ## What changed - Attach direct-call records to outputs before they enter history, and set `tool_calls_complete` when the invocation's arguments are fully recorded. - Bound pending recordings and retained metadata, release reservations on completion or cancellation, and invalidate pending records when capture is disabled. - Apply request budgets to direct metadata and strip it from inference and compaction inputs when capture is disabled. - Remove executed-call metadata from app-server raw response notifications and exclude its size from Guardian history retention budgets. - Track call IDs that bypass dispatch so their reuse cannot incorrectly establish Code Mode completeness. ## Testing Add regression coverage for direct-call attribution, malformed calls, metadata budgets, cancellation, configuration changes, compaction, notification filtering, and Guardian context isolation. GitOrigin-RevId: 2ebd39c7f141d04788736491495109841656b4c0
This commit is contained in:
1 parent
e61f381900
commit
1715e55076
24 files changed
+1760
-297
No files matched your search
@@ -961,7 +961,8 @@ pub struct InternalChatMessageMetadataPassthrough {
|
||||
#[schemars(skip)]
|
||||
#[ts(skip)]
|
||||
pub content_item_kinds: Option<Vec<ContentItemKind>>,
|
||||
// Ignore input values so requests cannot fake tool call records.
|
||||
// Ignore input values so requests and rollout reloads cannot fake tool call records.
|
||||
// A resumed thread can record new calls, but cannot prove old calls from this payload.
|
||||
/// Host-owned Code Mode cell shared by its `exec` and subsequent `wait` outputs.
|
||||
#[serde(default, skip_deserializing, skip_serializing_if = "Option::is_none")]
|
||||
#[schemars(skip)]
|
||||
@@ -972,8 +973,9 @@ pub struct InternalChatMessageMetadataPassthrough {
|
||||
#[schemars(skip)]
|
||||
#[ts(skip)]
|
||||
pub executed_tool_calls: Option<Vec<ExecutedToolCall>>,
|
||||
/// Whether the host finished recording this cell's calls without losing calls or arguments.
|
||||
/// This describes the call inventory across the cell's outputs, not tool success.
|
||||
/// Whether the host recorded the complete call inventory without losing calls or arguments.
|
||||
/// For a direct tool output this covers its single invocation; with `cell_id`, it covers
|
||||
/// the Code Mode cell across its outputs. Neither case describes tool success.
|
||||
#[serde(default, skip_deserializing, skip_serializing_if = "Option::is_none")]
|
||||
#[schemars(skip)]
|
||||
#[ts(skip)]
|
||||
|
||||
Reference in new issue
Block a user