Skip to content

Fix #35751: preserve Responses Lite tools after compaction - #2

Draft
fscfede-beep wants to merge 10 commits into
mainfrom
fix/35751-compaction-websocket-tools-final
Draft

Fix #35751: preserve Responses Lite tools after compaction#2
fscfede-beep wants to merge 10 commits into
mainfrom
fix/35751-compaction-websocket-tools-final

Conversation

@fscfede-beep

Copy link
Copy Markdown
Owner

Problem

Resumed compacted threads can lose the usable exec/code-mode tool surface when Responses WebSocket reuses a previous response and sends only an incremental suffix.

Root cause

ModelClientSession::get_incremental_items() currently treats any strict input extension as a websocket delta. Compaction and ContextCompaction are context-replacement boundaries, so treating them as incremental payload items can omit the runtime AdditionalTools prefix rebuilt by build_responses_request() for Responses Lite.

Proposed fix

  • Treat ResponseItem::Compaction and ResponseItem::ContextCompaction as a hard full-request boundary.
  • Preserve ordinary incremental-extension optimization.
  • Add focused regression coverage for both compaction variants and the ordinary-extension control case.

TDD

This branch currently contains the regression tests only. RED must be established by CI before production code is added.

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