Skip to content

fix(context): reject truncated conversation summaries - #256

Closed
KaiEureka wants to merge 1 commit into
mainfrom
codex/fix-audit-summary-truncation-20261025
Closed

KaiEureka wants to merge 1 commit into
mainfrom
codex/fix-audit-summary-truncation-20261025

Conversation

@KaiEureka

Copy link
Copy Markdown
Collaborator

A context summary that ended at the model output limit could replace the original request history and enter the summary cache. Later requests then lost requirements that were missing from the partial summary.

Reject the existing normalized truncation reasons before formatting a summary. Single-request summaries use the existing non-cacheable fallback, so the default context shaper retains the original history. Chunked summaries keep their existing failure and transcript recovery behavior. Complete summaries and their cache behavior remain unchanged.

The new regressions reproduce the lost requirement through native OpenAI Chat, Responses and Anthropic SDK transports. They also verify usage accounting, retry and cache behavior, complete stop reasons, and a truncated later chunk. The regression set passed all 47 cases and related context, budget and cancellation tests passed all 270 cases. Repository Ruff, import constraints and dependency checks passed.

@KaiEureka KaiEureka closed this Oct 25, 2026
@KaiEureka
KaiEureka deleted the codex/fix-audit-summary-truncation-20261025 branch October 25, 2026 15:42
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