VS Code extension: republishing an existing artifact opens the browser despite CLAUDE_CODE_ARTIFACT_AUTO_OPEN=0 (docs say republish never auto-opens)

Status Open
Reported on v2.1.208
Maintainer reply None cached
Activity 0 comments · opened Jul 22, 2026

Summary

Republishing an existing artifact (Artifact tool with the url parameter, same file path → same URL) automatically opens the browser, even though:

  1. CLAUDE_CODE_ARTIFACT_AUTO_OPEN=0 is set (via settings.json env) and confirmed loaded in the session's process environment, and
  2. 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

  1. Set "env": { "CLAUDE_CODE_ARTIFACT_AUTO_OPEN": "0" } in ~/.claude/settings.json.
  2. Start a new Claude Code session in the VS Code extension (verified the variable is present: $env:CLAUDE_CODE_ARTIFACT_AUTO_OPEN0).
  3. Have Claude republish an existing artifact: Artifact tool call with the same file_path and the url parameter 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.

View original on GitHub ↗