fix(claude): a thread with background work no longer refuses messages sent from another client #15473
main fromrefs/pull/15473/head·opened View on GitHubProblem#
Fixes #15471. The mobile app omits fastMode, and the web composer sends fastMode: false. Both mean Normal, but compileClaudeModelSelection compiled them to different queryIdentity values. So a Claude process opened from one client looked reconfigured when a message arrived from the other. While background work ran, the guard from #14726 refused every such message as a "model or setting change", and the thread accepted nothing until the work ended.
Change#
apps/server/src/claudeModelOptions.ts: for models that expose fast mode, an unset fastMode now compiles as false, the value the web composer already sends. Both clients produce the same settings and queryIdentity, so the live process is reused. A real switch to Fast or back still changes the identity, so the #14726 guard still protects background work.
The fix is on the server, so it covers mobile, web, desktop, server-sent continuations, and any older client. Models without a fast-mode option are unchanged.
Scope and approval#
A focused fix for #15471, which I filed with the run records showing the mismatch. It waits on triage, like any bug PR. It's one line, it introduces no new behaviour, and it changes no contracts. The only observable difference is that Claude now gets an explicit fastMode: false where it used to get nothing. That is what every web send already does.
Verification#
- New test in
claudeModelOptions.test.ts: unset andfalsecompile to the same settings and query identity. It fails onmainand passes here. - Ran
vp test run src/claudeModelOptions.test.ts src/orchestration-v2/Adapters/ClaudeAdapterV2.test.ts src/textGeneration/ClaudeTextGeneration.test.tsinapps/server: 149 passed. That includes the #14726 test that refuses a real model change while a background subagent runs. apps/servertypecheck passes. Lint and fmt pass on the touched files.- The bug was confirmed on a real thread: runs 1–16 had no options, and runs 17–19 from web carried
fastMode: falseand were refused (table in #15471). I didn't rerun that flow on a patched server.
Implemented with Claude Opus 5.5 in T3 Code (Claude Code harness).
🤖 Generated with Claude Code
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
🧰 Additional context used
📚 Code guidelines (1)
docs/internals/effect-services.md — auto-discoveredNo actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3c9f0161-316f-4719-a1ab-40ffe0aecfcd
📥 Commits
Reviewing files that changed from the base of the PR and between 8fb068c4982fc50a2a2f57c3b6fd4731735cf0bf and cea5f98c296e2a8f9a791b3d546f2ccd321ee2e1.
📒 Files selected for processing (2)
apps/server/src/claudeModelOptions.test.tsapps/server/src/claudeModelOptions.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
📝 Walkthrough
Walkthrough#
For models that support
fastMode,compileClaudeModelSelectionnow usesfalsewhen the option is omitted. A test verifies that the omitted and explicit-false selections produce the same query identity.Changes#
Claude fast-mode normalization
Layer / File(s) Summary Normalize fast mode and verify query identity
apps/server/src/claudeModelOptions.ts,apps/server/src/claudeModelOptions.test.tsSupported models now resolve an omitted fastModeoption tofalse; unsupported models still resolve it toundefined. The test checks that omitted and explicitfalseselections produce the same settings and query identity.Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers:
juliusmarmingeMerge Risk: ⚪ Minimal · up to
cea5fFor supported models, omitted fast mode now matches explicit false, allowing otherwise matching requests to reuse the live Claude process. No actionable merge-blocking risk remains.
Architecture Summary#
Architecture risk: 🔵 Low · up to
cea5fThe change affects 1 system.
Changed systems:
apps/serverArchitecture concerns No architecture-level concerns identified.
Review details
Systems and components
- observed — apps/server (service) was modified; 2 changed files map to changed impact.
Before / after behavior
- observed — Modified behavior in apps/server/src/claudeModelOptions.test.ts: Adds a test comparing unset fast mode with explicit
false: the compiled settings are expected to containfastMode: false, and both selections are expected to share a query identity. - observed — Modified behavior in apps/server/src/claudeModelOptions.ts: For models supporting
fastMode, an unset selection now resolves tofalseinstead of remaining undefined; unsupported models still produceundefined.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation Title check ✅ Passed The title describes the primary user-visible change: messages from another client are no longer refused while background work runs. It is specific and concise. Description check ✅ Passed The description includes the required Problem, Change, Scope and approval, and Verification sections. It explains the issue, the fix, its scope, and the tests and checks performed, including the real-… Linked Issues check ✅ Passed Issue #15471requires omittedfastModeand explicitfalseto represent the same Normal selection for models that support fast mode.compileClaudeModelSelectionnow defaults a supported, unset op…Out of Scope Changes check ✅ Passed The pull request changes only Claude model selection compilation and its focused test. Both changes directly implement and verify issue #15471. No unrelated changes appear in the whole-pull-request di…Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. ✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment `@coderabbitai help` to get the list of available commands.On the Macroscope verdict (human review for a default change): that's expected, and here is the change in default for reviewers.
- Before: an unset
fastModesent Claude nofastModesetting. - After: Claude gets
fastMode: false. - Who sees a difference: only senders that omit the option, which are mobile and server-sent continuations. The web composer already adds
fastMode: falseto every send (withImplicitFastModeDefault), so this aligns the other paths with the default web users already get. - Why the server: an identity-only normalization would leave the two paths sending different settings for the same selection, so a reused process could keep whichever mode it was opened with. Normalizing at compile time gives both one meaning.
- Fast mode itself: choosing Fast still sends
fastMode: trueand still changes the query identity, so the #14726 guard still applies.
- Before: an unset
maria-rcks closed this
Sign in to join this conversation.
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This is a narrowly scoped Claude bug fix that normalizes omitted fast mode to an explicit Normal value, affecting live-process reuse decisions and the settings passed to Claude. Because the server’s effective default for an omitted option changes, the default-handling policy calls for human review.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).