Skip to content

Instantly share code, notes, and snippets.

@ekiliar
ekiliar / disable-claude-ide-opened-file.sh
Created May 14, 2026 16:38
Disable Claude Code VSCode extension auto-attaching the open file as <ide_opened_file> context. Idempotent, with backup. See anthropics/claude-code#59083.
#!/usr/bin/env bash
# Local workaround for https://github.com/anthropics/claude-code/issues/59083
# Patches the Claude Code VSCode extension to stop auto-attaching the
# currently-open editor file as <ide_opened_file> context.
# <ide_selection> (manual selection) is preserved, as are @-mentions.
#
# Tested against extension version 2.1.141. Reapply after each update.
# Reload the VSCode window (Cmd/Ctrl+R) after running.
# Revert: copy webview/index.js.bak back over webview/index.js.