claude-code - 💡(How to fix) Fix [BUG] Claude Preview auto-launch ignores user intent — opens on every HTML edit even after being dismissed [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52763Fetched 2026-04-25 06:21:36
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1unlabeled ×1

Error Message

Error Messages/Logs

Root Cause

Open Claude Code v2.1.107 in a project containing any .html file Ask Claude to make an edit to an HTML file (e.g. "change the heading text in page.html") Observe: the Claude Preview panel opens automatically and a PostToolUse:Edit system-reminder appears in the transcript saying the file is "visible in the Launch preview panel" Close or dismiss the preview panel Ask Claude to make another edit to the same (or any) HTML file Expected: preview stays closed because the user dismissed it Actual: preview re-opens automatically and the system-reminder fires again, injected into the chat stream mid-typing

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The Claude Preview panel auto-opens every time an HTML file is written or edited. This used to respect when it was closed/dismissed, but now it re-opens on every single edit regardless of whether I've told Claude not to, dismissed the panel, or closed it manually.

Additionally, each auto-open fires a PostToolUse:Edit system-reminder injected into the live chat ("… is now visible in the Launch preview panel") that appears while I'm typing the next message, interrupting input.

This is not a user-configurable hook — verified by searching:

~/.claude/settings.json, project .claude/settings.json, .claude/settings.local.json — no relevant hooks All plugin hooks.json files — no references claude mcp list — no servers It's a built-in runtime behavior with no settings.json schema option to disable it.

Requests:

Respect the dismissed/closed state — if the user closes the preview or asks Claude not to open it, don't re-launch on subsequent edits Add a setting (e.g. disablePreviewPanel: true) to opt out entirely At minimum, suppress the system-reminder text so it doesn't interrupt input mid-typing

What Should Happen?

What Should Happen:

The preview panel should respect the user's dismissed/closed state — once I close it, it should stay closed until I explicitly reopen it There should be a setting (e.g. disablePreviewPanel: true in settings.json) to opt out of auto-launch entirely at the project or user level The PostToolUse:Edit system-reminder text ("… is now visible in the Launch preview panel") should not be injected into the live chat stream — it interrupts typing and clutters the transcript with no actionable information for the user If Claude is explicitly told not to open the preview in a given session, that instruction should be honored for the rest of the session

Error Messages/Logs

Steps to Reproduce

Open Claude Code v2.1.107 in a project containing any .html file Ask Claude to make an edit to an HTML file (e.g. "change the heading text in page.html") Observe: the Claude Preview panel opens automatically and a PostToolUse:Edit system-reminder appears in the transcript saying the file is "visible in the Launch preview panel" Close or dismiss the preview panel Ask Claude to make another edit to the same (or any) HTML file Expected: preview stays closed because the user dismissed it Actual: preview re-opens automatically and the system-reminder fires again, injected into the chat stream mid-typing

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.107

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Additional context:

Happens on every single HTML edit in the session No hook configured by the user triggers this (verified across user/project/local settings + all plugin hooks.json files + claude mcp list) Behavior previously respected the dismissed state — changed recently to always auto-open

extent analysis

TL;DR

The most likely fix is to add a configuration option to disable the auto-opening of the Claude Preview panel or to respect the user's dismissed/closed state.

Guidance

  • Verify that the issue is indeed a regression by checking the version history of Claude Code to see when the behavior changed.
  • Check the Claude Code documentation and settings to confirm that there is no existing option to disable the auto-opening of the preview panel.
  • Consider filing a feature request to add a disablePreviewPanel option to the settings.json file to allow users to opt out of the auto-launch behavior.
  • As a temporary workaround, users could try using a different code editor or IDE that does not have this behavior.

Example

No code snippet is provided as this issue appears to be related to the configuration and behavior of the Claude Code application rather than a specific code issue.

Notes

The issue seems to be specific to the Claude Code application and its interaction with HTML files. The fact that it is a regression suggests that the behavior was previously working as expected, but a recent change has introduced this issue.

Recommendation

Apply workaround: Until a fix is available, users can try using a different code editor or IDE to avoid the auto-opening of the preview panel.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING