VS Code extension: Escape interrupts running task in native UI, with no setting or keybinding to disable it
Environment: claude-code VS Code extension v2.1.252 (also reproduced on v2.1.251), Linux, claudeCode.useTerminal: false (default native webview UI)
Problem:
Pressing Escape while a task/agent is running immediately interrupts it, with no confirmation. For long-running work this is costly: step away for a few hours, come back, and find the run was silently killed by a stray Escape (unfocus, unrelated keystroke, focus shift, muscle memory) with no way to have prevented it.
Investigated:~/.claude/keybindings.json supports unbinding Escape from interrupt (chat:cancel action) — but this only affects the CLI's own terminal rendering. It has no effect on the native webview UI. Inspecting the extension's contributed keybindings (~/.vscode/extensions/anthropic.claude-code-2.1.252-linux-x64/package.json) shows no plain escape binding at the VS Code level either — only ctrl+escape/cmd+escape for focus/blur/open commands. Escape-to-interrupt appears to be handled internally by the webview's own JS, invisible to both VS Code's keybindings.json and Claude Code's own keybindings.json.
Workaround: setting claudeCode.useTerminal: true switches to CLI-in-terminal mode, where the keybindings.json unbind does work — but this loses native-UI features (e.g. the visual diff viewer).
Request: either honor ~/.claude/keybindings.json's Escape unbind in the native UI too, add a dedicated VS Code setting for it, or add a confirmation step before interrupting a task that's been running more than a short threshold.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗