From 21399ec2e9ac93000d6fc255132d557332781c65 Mon Sep 17 00:00:00 2001 From: WilcoLouwerse Date: Tue, 8 Sep 2026 15:43:40 +0200 Subject: [PATCH 1/2] docs(global-settings): finish the toast correction, harden the CLI-path snippet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two findings from the Quick re-review of this PR: - The one-session-switch paragraph still said the EPERM toast follows a typed /model, contradicting the table two screens up (which the previous commit did correct). Say instead that "for this session only" IS Claude Code reporting the refused persist, and that the picker is what raises the toast. - The PATH fallback used an unquoted glob in a command substitution. VSCode keeps several extension versions during an upgrade, so with two installed the glob expands to two paths and the snippet breaks. Verified: two matching dirs give 2 words with the old form, 1 with 'ls -1d … | tail -1'. Co-Authored-By: Claude Fable 5.1 --- docs/claude/global-claude-settings.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/claude/global-claude-settings.md b/docs/claude/global-claude-settings.md index 46ce6c34..3cd34677 100644 --- a/docs/claude/global-claude-settings.md +++ b/docs/claude/global-claude-settings.md @@ -464,8 +464,10 @@ Restart the session and verify which model is actually served: ```bash # The VSCode extension ships its own CLI and does not put `claude` on your PATH. -# If `command -v claude` comes up empty, point at the bundled binary instead: -CLAUDE="$(command -v claude || echo ~/.vscode-server/extensions/anthropic.claude-code-*/resources/native-binary/claude)" +# If `command -v claude` comes up empty, point at the bundled binary instead. +# VSCode keeps several extension versions during an upgrade, so take the newest +# match rather than letting the glob expand to more than one path. +CLAUDE="$(command -v claude || ls -1d ~/.vscode-server/extensions/anthropic.claude-code-*/resources/native-binary/claude 2>/dev/null | tail -1)" "$CLAUDE" -p "Reply with exactly the word ok" --output-format json | jq '.modelUsage | keys' ``` @@ -479,7 +481,7 @@ The result should list the model you pinned (e.g. `["claude-opus-5"]`). Swapping /model fable ``` -The CLI confirms with "Set model to Fable 5.1 for this session only" and the switch is live. The `Failed to set model: EPERM` toast that follows is the extension's failed attempt to *persist* the choice — ignore it; nothing was lost, and the next session starts on your pinned default again. That is the intended behaviour under this setup: the default stays the cheaper model, using a heavier one is a deliberate, visible act each time. +The CLI confirms with "Set model to Fable 5.1 for this session only" and the switch is live. The "for this session only" wording is Claude Code telling you the persist was refused — nothing was lost, and the next session starts on your pinned default again. Reach for the picker instead and you get the `Failed to set model: EPERM` toast with no switch at all. That split is the intended behaviour under this setup: the default stays the cheaper model, and using a heavier one is a deliberate, visible act each time. **Fix — one-off switch.** If you only need to change the persisted model once, run the unlock step from [README → Updating](../../global-settings/README.md#updating) in your own terminal, switch the model in Claude Code, then run the relock step. Don't skip the relock. From 87bee33e6aa0ae09d8d76bb01de808f8353c70d5 Mon Sep 17 00:00:00 2001 From: WilcoLouwerse Date: Thu, 10 Sep 2026 13:05:31 +0200 Subject: [PATCH 2/2] docs(global-settings): sort by mtime, not lexicographically, for the newest binary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ls -1d | tail -1 sorts byte-wise, so it silently picks an older extension directory once a version bump crosses a digit-width boundary (1.9.0 vs 1.10.0) — exactly the upgrade window the snippet was meant to handle. ls -1dt | head -1 sorts by modification time instead. Co-Authored-By: Claude Sonnet 5 --- docs/claude/global-claude-settings.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/claude/global-claude-settings.md b/docs/claude/global-claude-settings.md index 3cd34677..70e5cd9d 100644 --- a/docs/claude/global-claude-settings.md +++ b/docs/claude/global-claude-settings.md @@ -466,8 +466,9 @@ Restart the session and verify which model is actually served: # The VSCode extension ships its own CLI and does not put `claude` on your PATH. # If `command -v claude` comes up empty, point at the bundled binary instead. # VSCode keeps several extension versions during an upgrade, so take the newest -# match rather than letting the glob expand to more than one path. -CLAUDE="$(command -v claude || ls -1d ~/.vscode-server/extensions/anthropic.claude-code-*/resources/native-binary/claude 2>/dev/null | tail -1)" +# match by modification time rather than letting the glob expand to more than +# one path — a plain lexicographic sort would pick e.g. 1.9.0 over 1.10.0. +CLAUDE="$(command -v claude || ls -1dt ~/.vscode-server/extensions/anthropic.claude-code-*/resources/native-binary/claude 2>/dev/null | head -1)" "$CLAUDE" -p "Reply with exactly the word ok" --output-format json | jq '.modelUsage | keys' ```