Skip to content

Commit cea5f98

Browse files
vitalyiegorovclaude
andcommitted
fix(claude): a thread with background work no longer refuses messages sent from another client
Mobile omits fastMode while web sends fastMode: false. The compiled query identity told them apart, so a Claude process opened from one client looked reconfigured by the other, and the background-work guard refused every message until the work ended. Unset now compiles as Normal, the meaning web already sends. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 8fb068c commit cea5f98

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

‎apps/server/src/claudeModelOptions.test.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ describe("compileClaudeModelSelection", () => {
4040
).toEqual({ fastMode: false });
4141
});
4242

43+
it("treats unset fast mode as Normal so clients that omit it reuse the same query", () => {
44+
const unset = compileClaudeModelSelection(selection("claude-opus-4-6", []));
45+
const normal = compileClaudeModelSelection(
46+
selection("claude-opus-4-6", [{ id: "fastMode", value: false }]),
47+
);
48+
expect(unset.settings).toEqual({ fastMode: false });
49+
expect(unset.queryIdentity).toBe(normal.queryIdentity);
50+
});
51+
4352
it("uses the model default SDK effort alongside prompt-injected effort", () => {
4453
expect(
4554
compileClaudeModelSelection(

‎apps/server/src/claudeModelOptions.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ export function compileClaudeModelSelection(
3636
const rawEffort = getModelSelectionStringOptionValue(selection, "effort");
3737
const resolvedEffort = resolveClaudeCatalogEffort(catalog, selection.model, rawEffort);
3838
const effort = normalizeClaudeCatalogEffort(catalog, resolvedEffort, selection.model);
39+
// Unset means Normal, as the web composer sends it. Keeping the two apart
40+
// would make a live process look reconfigured when only the client changed.
3941
const fastMode = supportsBoolean("fastMode")
40-
? getModelSelectionBooleanOptionValue(selection, "fastMode")
42+
? (getModelSelectionBooleanOptionValue(selection, "fastMode") ?? false)
4143
: undefined;
4244
const thinking = supportsBoolean("thinking")
4345
? getModelSelectionBooleanOptionValue(selection, "thinking")

0 commit comments

Comments
 (0)