Skip to content

docs(global-settings): finish the toast correction, harden the CLI-path snippet - #718

Merged
WilcoLouwerse merged 2 commits into
mainfrom
docs/global-settings-model-switch-eperm
Sep 10, 2026
Merged

docs(global-settings): finish the toast correction, harden the CLI-path snippet#718
WilcoLouwerse merged 2 commits into
mainfrom
docs/global-settings-model-switch-eperm

Conversation

@WilcoLouwerse

Copy link
Copy Markdown
Contributor

What

Two findings from the Quick re-review of #701. That PR merged while the re-review was still running, so its fixes could not ride along and land here instead.

1. The doc contradicted itself on its own central claim

#701's first round flagged that the Failed to set model: EPERM toast comes from the model picker, not from a typed /model. The fix commit corrected the comparison table but missed the "Switching to another model for one session" paragraph two screens down, which still read:

The Failed to set model: EPERM toast that follows is the extension's failed attempt to persist the choice — ignore it

So the merged doc explains the mechanism one way in the table and the opposite way in the prose. Corrected here: the "for this session only" wording is Claude Code reporting the refused persist, and the picker is what raises the toast with no switch at all.

2. The CLI-path fallback broke with two extension versions installed

The verification recipe used an unquoted glob inside a command substitution:

CLAUDE="$(command -v claude || echo ~/.vscode-server/extensions/anthropic.claude-code-*/resources/native-binary/claude)"

VSCode keeps several extension versions during an upgrade — this machine currently has 2.1.260 and 2.1.263 side by side. As soon as two of them ship the binary, the glob expands to two paths, $CLAUDE holds both, and every later use fails. Verified against two matching directories:

old glob form  -> words: 2
new ls|tail -1 -> words: 1  [.../anthropic.claude-code-2.1.263-.../native-binary/claude]

Now uses ls -1d … | tail -1, which yields exactly one path (the newest) regardless of how many versions are present.

No VERSION bump

Docs-only — docs/claude/global-claude-settings.md is the single changed file and nothing under global-settings/ is touched, so no installed artifact changes. This is exactly the case #701 amended the bump policy to cover.

Related

🤖 Generated with Claude Code

…th snippet

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 <noreply@anthropic.com>
Comment thread docs/claude/global-claude-settings.md Outdated
…newest binary

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 <noreply@anthropic.com>

@WilcoLouwerse WilcoLouwerse left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE (Standard) — self-review posted as COMMENT (GitHub blocks self-approval)

Re-review of 87bee33e. Fixes the one 🟡 concern from the prior pass exactly: ls -1d | tail -1 (lexicographic) → ls -1dt | head -1 (modification time). Independently re-verified with a fresh 1.9.0-then-1.10.0 fixture: ls -1dt | head -1 now correctly returns the 1.10.0 path.

Rest of the PR (the toast-message prose correcting /model slash-command vs. picker-UI behavior) was already correct in the first pass — no other findings.

Thread resolved. Clean approve.

@WilcoLouwerse
WilcoLouwerse merged commit 8cfe4b2 into main Sep 10, 2026
39 checks passed
@WilcoLouwerse
WilcoLouwerse deleted the docs/global-settings-model-switch-eperm branch September 10, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant