mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
Defer synchronous Guardian tool-call truncation to preparation (#56505)
## What changed Preserve complete tool-call text when collecting synchronous Guardian context, then apply the profile's tool token limit when preparing the transcript. Calculate retained bytes and token usage from the truncated text. ## Testing Extend the oversized-action regression test to verify that a subsequent review includes the previous call's arguments truncated to the 1,000-token history limit. GitOrigin-RevId: 2b52505d9ccfa3651b3535e67cc12597be819459
This commit is contained in:
@@ -267,8 +267,8 @@ pub(crate) fn render_guardian_transcript_entries(
|
||||
/// Keep both tool calls and tool results here. The reviewer often needs the
|
||||
/// agent's exact queried path / arguments as well as the returned evidence to
|
||||
/// decide whether the pending approval is justified.
|
||||
/// Per-entry truncation happens during collection, using the current review's
|
||||
/// Node REPL cap; the cursor still counts every non-empty evidence entry.
|
||||
/// Tool-call truncation happens in sync preparation; other caps still apply
|
||||
/// during collection. The cursor counts every non-empty evidence entry.
|
||||
pub(super) fn collect_guardian_context(
|
||||
history: &dyn SectionHistory,
|
||||
node_repl_result_token_limit: usize,
|
||||
|
||||
Reference in New Issue
Block a user