[BUG] Visual Studio Code chat experience, inserting snippet inserts into file rather than chatbox

Resolved 💬 2 comments Opened Feb 26, 2026 by MattStannettOperandio Closed Mar 26, 2026

Preflight Checklist

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

What's Wrong?

When I try to insert a snippet into the Claude Code chat box in Visual Studio Code by using the Snippets: Insert Snippet option from command palette (CMD + Shift + P) it gets inserted into the cursor position in the active document, instead of the chat box.

This occurs regardless of what mode is selected (plan, auto accept, ask before edit.)

What Should Happen?

It should be inserted into the chat box, not the active document, this is how the GitHub CoPilot chat window functions.

Error Messages/Logs

N/A

Steps to Reproduce

The steps a below are all within the context of a new Visual Studio Code window

  1. Ensure that the Claude Code extension is installed in Visual Studio
  • Extension details:
  • Identifier: anthropic.claude-code
  • Version: 2.1.58
  1. Configure a Global Snippet (VS Code docs)
  • CMD + Shift + P
  • Select Snippets: Configure Snippets
  • Select New Global Snippets file...
  • Enter global-snippets-vscode.code-snippets as the file name
  • Replace the existing file contents with the JSON below
  • Save the file

3.. Verify that the snippet works by opening an empty file

  • CMD + Shift + P
  • Select Snippets: Insert Snippet
  • Select either of the custom snippets that were added
  • Confirm that the snippet text is pasted into the new file as expected
  1. Attempt to use the snippet within the Claude Code chat window
  • Open up a new chat window for Claude Code
  • CMD + Shift + P
  • Select Snippets: Insert Snippet
  • Select either of the custom snippets that were added
  • See that the snippet text is pasted into the active file, at the last known cursor position
  • ⚠️ This is the issue ⚠️

---

global-snippets-vscode.code-snippets

{
    "Snippet_One": {
		"scope": "",
		"prefix": "First Snippet",
		"description": "Example snippet",
		"body": [
			"Hello World"
		]
	},
	"Snippet_Two": {
		"scope": "",
		"prefix": "Second Snippet",
		"description": "Another example snippet",
		"body": [
			"Goodnight, sweet Prince"
		]
	}
}

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.58 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Repro video

https://github.com/user-attachments/assets/26ec2a64-2c4b-4d99-b91a-6265323aa7a3

global-snippets-vscode.code-snippets

{
    "Snippet_One": {
		"scope": "",
		"prefix": "First Snippet",
		"description": "Example snippet",
		"body": [
			"Hello World"
		]
	},
	"Snippet_Two": {
		"scope": "",
		"prefix": "Second Snippet",
		"description": "Another example snippet",
		"body": [
			"Goodnight, sweet Prince"
		]
	}
}

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗