Skip to content

Fix native Codex compaction through protected inference - #5447

Merged
freeqaz-openai merged 1 commit into
mainfrom
fix/native-compaction-turn-metadata
Nov 11, 2026
Merged

freeqaz-openai merged 1 commit into
mainfrom
fix/native-compaction-turn-metadata

Conversation

@freeqaz-openai

Copy link
Copy Markdown
Collaborator

Problem

Codex 0.164.0 adds a nested compaction object to its turn metadata during manual compaction. Protected inference rejected that Responses request before credential access, interrupting the turn.

Change

Validate the five fields emitted by native Responses compaction with the Memento strategy. Accept the object only when request_kind is compaction. Forward the original request after the existing model, tool, route and size checks.

Verification

  • On the base commit, the new protected-inference integration case failed at request resolution. With the fix, all 85 cases in tests/integration/static-egress.test.mjs passed. The new case checks that the provider receives the full body and that malformed metadata, an out-of-grant model and a provider-executed tool cause no credential read or provider send.
  • A controlled run of the native client against a synthetic loopback provider reproduced the refusal before the fix. With the validator change, the initial turn, manual compaction and continuation using the returned summary completed. This used synthetic input and no live provider credentials.
  • Workspace boundaries, lint, typecheck, formatting, flow validation and documentation checks passed. The 2,499-word flow keeps the complete protected credential request lifecycle together. Independent source review found no blocking issues for the selected Responses/Memento path.

@freeqaz-openai
freeqaz-openai requested a review from a team as a code owner November 11, 2026 09:45
@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@freeqaz-openai
freeqaz-openai merged commit 6a7f87d into main Nov 11, 2026
42 checks passed
@freeqaz-openai
freeqaz-openai deleted the fix/native-compaction-turn-metadata branch November 11, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant