VS Code extension: republishing an existing artifact opens the browser despite CLAUDE_CODE_ARTIFACT_AUTO_OPEN=0 (docs say republish never auto-opens)
Summary
Republishing an existing artifact (Artifact tool with the url parameter, same file path → same URL) automatically opens the browser, even though:
CLAUDE_CODE_ARTIFACT_AUTO_OPEN=0is set (viasettings.jsonenv) and confirmed loaded in the session's process environment, and- the official docs (env-vars.md) state that republishing an existing artifact does not open the browser regardless of this setting.
Environment
- Claude Code version: 2.1.208
- Platform: Windows 11 Home (10.0.26200)
- Running inside the VS Code native extension
- Shell: PowerShell
Steps to reproduce
- Set
"env": { "CLAUDE_CODE_ARTIFACT_AUTO_OPEN": "0" }in~/.claude/settings.json. - Start a new Claude Code session in the VS Code extension (verified the variable is present:
$env:CLAUDE_CODE_ARTIFACT_AUTO_OPEN→0). - Have Claude republish an existing artifact: Artifact tool call with the same
file_pathand theurlparameter pointing to a previously published artifact (routine same-URL republish of an updated HTML page).
Expected behavior
No browser window opens. Per env-vars.md: republishing an existing artifact does not open the browser regardless of this setting, and even for new artifacts 0 suppresses auto-open.
Actual behavior
The browser opens with the artifact page on every republish.
Evidence that the open is harness-side
I grepped the full session transcript (.jsonl) of the session that performed the republish: it contains no Start-Process, Invoke-Item, explorer.exe, or any other browser-launching command. The only browser-opening actor left is Claude Code itself (or the VS Code extension layer).
This happens consistently on a daily republish flow (same artifact URL updated once a day), and reproduced again after the env var had been in place across session restarts, so it is not a stale-environment issue.
Suspicion
The auto-open path used for republishes (and/or the VS Code extension's artifact handling) may not be checking CLAUDE_CODE_ARTIFACT_AUTO_OPEN, diverging from the documented behavior.