Skip to content

Replace thinking-only replay turns with a stable marker - #554

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-6909-thinking-only-replay-guard
Aug 23, 2026
Merged

Replace thinking-only replay turns with a stable marker#554
TheGreatAxios merged 2 commits into
mainfrom
cl-6909-thinking-only-replay-guard

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Thinking-only assistant turns (no text, no tool_call) are replaced with a stable text marker in the shared replay sanitizer instead of being dropped.
  • Consecutive requests after a thinking-only turn differ, and leftover-only turns no longer reach adapters as empty or citation-only content.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • Replay-sanitizer tests cover role alternation, differing buildRequest bodies across builtin and Corbits adapters, leftover-only turns, and unchanged text/tool_call turns

Fixes CL-6909

transformMessages only drops an assistant turn when stripping thinking
leaves empty content. Leftover thinking-only turns then replay as an
identical request. Mark those turns at the sanitizer instead of dropping
them.
@linear-code

linear-code Bot commented Aug 23, 2026

Copy link
Copy Markdown

CL-6909

@TheGreatAxios
TheGreatAxios merged commit 77a58a0 into main Aug 23, 2026
5 checks passed
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