fix(claude-desktop): persist deploymentMode=3p and enable Cowork web search#128
Merged
stuffbucket merged 1 commit intoJun 16, 2026
Merged
Conversation
…search The Claude Desktop toggle wrote gateway routing + telemetry/extension flags but left two gaps that only didn't bite on machines that had been configured interactively: - No persisted deploymentMode. Setting inferenceProvider + disableDeploymentModeChooser puts the app in third-party mode and hides the chooser, but the app's first-run gate is `readPersistedDeploymentMode() === undefined`. With no deploymentMode ever written, a freshly-toggled machine is treated as pre-sign-in first-run and shows the Claude.ai sign-in screen despite the gateway being fully wired. Write deploymentMode: "3p" (the value the app itself persists when a user picks third-party). - coworkWebSearchEnabled was never set. It lives nested under the `preferences` object, so the flat allowlist couldn't represent it. Add surgical nested merge/strip that owns only that sub-key and preserves every other preference the app stores there. Docs (admin/claude-desktop-mdm.md) updated to match the profile and explain the deploymentMode first-run gate.
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
The Claude Desktop toggle configured gateway routing + telemetry/extension flags but left two gaps that only didn't bite on machines configured interactively. The visible symptom: other machines are sent to the Claude.ai sign-in screen even though the gateway is fully wired.
Root cause (verified against the app's own logic)
Two separate gates in Claude Desktop:
disableDeploymentModeChooser: true+inferenceProviderset → puts the app in 3P and hides the chooser. The toggle already did this.isFirstRunBeforeSignIn() = readPersistedDeploymentMode() === undefined→ a separate first-run gate. With no persisteddeploymentModeever written, the app treats launch as pre-sign-in first-run and shows the Claude.ai sign-in screen regardless of (1). The toggle never wrote it.Both reader and writer resolve to the same file the toggle owns (
claude_desktop_config.json, top-level keydeploymentMode, value"3p"— exactly what the app persists when a user picks third-party).Changes
deploymentMode: "3p"added to the proxy-keys allowlist + defaults — skips the Claude.ai sign-in on a fresh machine.coworkWebSearchEnabled— lives nested underpreferences, which the flat allowlist couldn't reach. Added surgical nested merge/strip that owns only that sub-key and preserves every other preference the app stores there. Revert drops thepreferencesobject only if it was the last thing left.admin/claude-desktop-mdm.md) updated to match the profile and explain the first-run gate.Migration note
Pre-fix users who already toggled on have a config missing these keys.
applyProxyConfignow detects the mismatch (alreadyConfiguredreturns false), so a re-apply (toggle off→on) heals them instead of silently skipping as "already configured."Verification
tscclean