fix(claude): preserve model selector provenance - #81
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Germey
force-pushed
the
fix/model-selector-contract
branch
from
August 6, 2026 00:34
590da16 to
b97aa5a
Compare
Germey
approved these changes
Aug 6, 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.
Problem
When a Claude Code transcript is resumed through Coding Bridge, the transcript's resolved model ID (for example
claude-opus-5) was reused as the launch selector. Selector-only options such asopus[1m]are not present in the transcript, so cross-device resume silently changed the context profile and triggered compaction near the ordinary context threshold.Root fix
model_selectorprovenance separately.model_selector,resolved_model, andmodel_contract=2as distinct protocol fields.modelsidecars as ambiguous instead of guessing a model family or fabricating[1m].No token thresholds, title/session special cases, or forced 1M selector are used.
Verification
python3 -m pytest tests/test_session_meta.py tests/test_session.py tests/test_connection.py tests/test_history.py tests/test_claude_entrypoint.py tests/test_resume_guard.py— 86 passedruff check ...on all touched Python/test files — passed🤖 对抗评审 (reviewer: codex, 1 round)
🤖 Generated with Claude Code