Skip to content

Spill oversized PreToolUse additionalContext#22529

Merged
abhinav-oai merged 1 commit into
mainfrom
abhinav/pretooluse-additional-context-spill
May 13, 2026
Merged

Spill oversized PreToolUse additionalContext#22529
abhinav-oai merged 1 commit into
mainfrom
abhinav/pretooluse-additional-context-spill

Conversation

@abhinav-oai

@abhinav-oai abhinav-oai commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Why

PreToolUse.additionalContext became model-visible after #20692, but the hook-output spilling path from #21069 never picked up that newer lane. As a result, oversized PreToolUse context could bypass the truncation/spill treatment that already applies to the other hook outputs Codex forwards to the model.

What

  • Run PreToolUseOutcome.additional_contexts through maybe_spill_texts(...)
  • Add an integration test proving a large PreToolUse.additionalContext is replaced with a truncated preview plus spill-file pointer, while the full text is preserved on disk.

@abhinav-oai abhinav-oai changed the title [codex] Spill large PreToolUse hook context [codex] Spill oversized PreToolUse additionalContext May 13, 2026
@abhinav-oai abhinav-oai changed the title [codex] Spill oversized PreToolUse additionalContext Spill oversized PreToolUse additionalContext May 13, 2026
@abhinav-oai abhinav-oai marked this pull request as ready for review May 13, 2026 18:21
@abhinav-oai abhinav-oai requested a review from a team as a code owner May 13, 2026 18:21
@abhinav-oai abhinav-oai merged commit 23bb524 into main May 13, 2026
27 checks passed
@abhinav-oai abhinav-oai deleted the abhinav/pretooluse-additional-context-spill branch May 13, 2026 22:21
@github-actions github-actions Bot locked and limited conversation to collaborators May 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants