VS Code/chat-prompt
Open Copilot Chat with a prompt
Opens Copilot Chat with a prompt written into the composer.
Format
vscode://GitHub.Copilot-Chat/chat?agent={agent}%26prompt={prompt}Try it
vscode://GitHub.Copilot-Chat/chat?agent=agent%26prompt=Explain%20this%20repoOpenWhat you supply
{agent}Which chat mode to open in.
agentis the usual value. VS Code's own docs buttons pass it on every link.{prompt}Text to write into the chat composer.
URL-encode it.
The parameters are separated by %26, not &. That is not a typo and not optional — it is
what VS Code's own documentation buttons emit. The URI handler receives the query as a single
opaque value and decodes it once, so a raw & would end the query early and the prompt would
vanish.
This link is registered by the Copilot Chat extension rather than by VS Code itself, which is why it carries the extension's id in the host position. No extension, no handler.
On Insiders it becomes vscode-insiders://GitHub.Copilot-Chat/chat?…. Wrapping either in
https://vscode.dev/redirect?url=… gives you a link that survives GitHub and Slack.