fix(transcript-policy): don't preserve thinking signatures for kimi-coding (#39798)#39841
Merged
steipete merged 2 commits intoopenclaw:mainfrom Mar 8, 2026
Conversation
Contributor
Greptile SummaryThis PR fixes a multi-turn session crash for the
Confidence Score: 5/5
Last reviewed commit: 3cb39a6 |
steipete
added a commit
that referenced
this pull request
Mar 8, 2026
Contributor
|
Landed via temp rebase onto main. Thanks @VarunChopra11! |
dustin-olenslager
pushed a commit
to dustin-olenslager/ironclaw-supreme
that referenced
this pull request
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kimi-coding(which usesmodelApi: "anthropic-messages") received its ownthinkingSignatureblobs back as context on turn 2+, causing JSON parse crashes and session termination.kimi-coding/ k2p5 session crashes on turn 2 withUnexpected non-whitespace character after JSON at position N.preserveSignaturesis nowisAnthropic && provider !== "kimi-coding"— kimi-coding is excluded from signature preservation despite using the Anthropic messages API.kimi-coding.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
kimi-coding/ k2p5 multi-turn sessions no longer crash on turn 2. Thinking blocks from prior turns are stripped before being re-sent, matching the pre-v2026.3.7 behaviour.Security Impact (required)
Repro + Verification
Environment
Steps
provider: kimi-coding,model: k2p5Unexpected non-whitespace character after JSON at position NExpected
Session continues across multiple turns.
Actual (before fix)
Session crashes on turn 2 with a JSON parse error originating from re-sent
thinkingSignatureblobs.Evidence
15 tests pass in
src/agents/transcript-policy.test.ts, including the new regression test for kimi-coding (does not preserve signatures for kimi-coding provider (#39798)).Human Verification (required)
resolveTranscriptPolicy({ provider: "kimi-coding", modelApi: "anthropic-messages" })returnspreserveSignatures: falsepreserveSignatures: true; Google/OpenAI/Mistral unaffectedCompatibility / Migration
Failure Recovery (if this breaks)
src/agents/transcript-policy.ts(remove&& provider !== "kimi-coding")src/agents/transcript-policy.tsonly