mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +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
@@ -266,9 +266,12 @@ async fn run_compact_task_inner_impl(
|
||||
|
||||
let compaction_response_id = loop {
|
||||
// Clone is required because of the loop
|
||||
let turn_input = history
|
||||
let mut turn_input = history
|
||||
.clone()
|
||||
.for_prompt(&turn_context.model_info().input_modalities);
|
||||
sess.services
|
||||
.executed_tool_calls
|
||||
.strip_disabled_direct_metadata(&mut turn_input);
|
||||
let turn_input_len = turn_input.len();
|
||||
let prompt = Prompt {
|
||||
input: turn_input,
|
||||
|
||||
Reference in new issue
Block a user