Repository navigation
Conversation
Contributor
[Medium impact] The PR appears safe to merge; both previous thinking-replay issues are fixed. SummaryThe PR preserves signed thinking on the default Claude route.
Both previous findings are addressed. No new actionable issues were found.
|
…y signed thinking
Author
|
Both review items have been resolved in commit 01021d6:
|
xenking
added a commit
to xenking/jcode
that referenced
this pull request
Nov 22, 2026
Recognize the MultiProvider Claude route and keep every completed signed block, including empty ones, in its original position among provider-native blocks. Keep unsigned reasoning in the readable trace and honor the existing replay setting. Upstream-PR: 1jehuang#2266 Related-Upstream-PR: 1jehuang#2274 Co-authored-by: Lili Karashchuk <[email protected]> Co-authored-by: eniyanyosuva <[email protected]>
This branch has not been deployed
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.
Closes #2265
Problem
On the default Claude route (Anthropic OAuth or API key through
MultiProvider), Claude's extended thinking wasn't being preserved or echoed back on subsequent turns.This happened because:
MultiProvider::name()returns"Claude"forActiveProvider::Claude.stores_reasoning_content_for_context()only checked"openrouter" | "anthropic" | "openai", sostore_reasoning_contentevaluated tofalse.push_reasoning_blocks()only createdContentBlock::AnthropicThinkingifprovider_name.eq_ignore_ascii_case("anthropic"). For"Claude", it fell through to generic reasoning trace or dropped the signed block.Without the signed thinking block echoed back on subsequent tool-turn calls, Claude had to re-plan from scratch on every turn, causing significantly longer thinking latencies and token costs.
Solution
stores_reasoning_content_for_context(), accept"claude"in addition to"anthropic","openrouter", and"openai".push_reasoning_blocks(), accept both"anthropic"and"claude"soContentBlock::AnthropicThinkingwith cryptographic signatures is created and preserved.push_reasoning_blockswith provider name"Claude"andstores_reasoning_content_for_context("Claude").Verification
cargo test -p jcode-base --lib message::tests: all 60 tests passed.python3 scripts/check_dependency_boundaries.py: passed.