fix(claude-sdk-oauth): ignore volatile thinking timing - #751
Conversation
|
Hi @code-yeongyu — the Per |
|
Validated #751 independently against #691 on current Senpi Fresh Docker reproduction:
I also checked the fix boundary. It removes only On a live affected session, 38 of 40 continuity decisions were I tested Hindsight separately because it was enabled on the affected machine. Recommendation: merge #751 rather than open a duplicate issue or competing PR. |
# Conflicts: # packages/coding-agent/CHANGELOG.md
Why
Claude SDK OAuth captures the provider-final assistant message during the last
message_update, before agent-core adds display-onlystartedAtandendedAtfields to thinking blocks. Comparing that capture with the committed
message_endcontent therefore classified otherwise identical turns asassistant_rewritten.That false divergence abandoned resident-session continuity and repeatedly
re-sent the growing conversation history, increasing cache writes and eventually
exposing the replay buffer limit reported in #691.
What
startedAtandendedAtfields from thecommit-boundary digest
all other semantic content in rewrite detection
non-mutation, thinking rewrites, and text rewrites
Verification
npm --prefix packages/coding-agent test -- test/suite/regressions/691-claude-sdk-oauth-thinking-timing.test.tsnpm run checknpm run buildclean; semanticrewrites remained
rewrittenFixes #691
Summary by cubic
Prevents
assistant_rewrittenforks inclaude-sdk-oauthwhen only thinking timing changes by excludingstartedAt/endedAtfrom continuity hashing. Preserves resident-session and prompt-cache continuity (fixes #691).startedAt/endedAtin thinking blocks from the continuity hash; keep all semantic fields.CHANGELOG.mdand the provider’schanges.md.Written for commit cb1f05e. Summary will update on new commits.