# A command for passing a prompt to the chat

**URL:** <https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049>\
**Category:** Feature Requests\
**Created:** [October 19, 2025, 4:26pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049 "2025-10-19T16:26:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![blazejkustra](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/blazejkustra/32/82933_2.png) [@blazejkustra](https://forum.cursor.com/u/blazejkustra)\
**Post date:** [October 19, 2025, 4:26pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/1 "2025-10-19T16:26:15Z")

</div>

### Feature request for product/service

Chat

### Describe the request

I’m developing an extension ([React Compiler Marker ✨ - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=blazejkustra.react-compiler-marker)) and I would like to send text to the chat. For VSCode I do:

```ts
vscode.commands.executeCommand('workbench.action.chat.open', prompt);

```

This command is not supported in Cursor and there are no alternatives, could you add support for it? Or at least allow `cursor.startComposerPrompt` command to take a `prompt` argument.

---

<div class="post-metadata">

**Author:** ![blazejkustra](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/blazejkustra/32/82933_2.png) [@blazejkustra](https://forum.cursor.com/u/blazejkustra)\
**Post date:** [November 3, 2025, 12:01pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/2 "2025-11-03T12:01:23Z")

</div>

Anyone from the Cursor team can look into it?

---

<div class="post-metadata">

**Author:** ![natemcgrady](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/natemcgrady/32/87004_2.png) [@natemcgrady](https://forum.cursor.com/u/natemcgrady)\
**Post date:** [November 12, 2025, 7:23pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/3 "2025-11-12T19:23:55Z")

</div>

Yeah this would be great. Basically the “Add to chat” command but with the option to pass a custom prompt/wrapper.

---

<div class="post-metadata">

**Author:** ![natemcgrady](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/natemcgrady/32/87004_2.png) [@natemcgrady](https://forum.cursor.com/u/natemcgrady)\
**Post date:** [November 13, 2025, 5:15pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/4 "2025-11-13T17:15:57Z")

</div>

Btw - I found a workaround by opening the chat using `composer.newAgentChat` and using clipboard manipulation to paste the text

## Example:

```typescript
import * as vscode from "vscode";
import { PROMPT_TEMPLATE } from "./prompt-template";

async function sendTextToChat(prompt: string): Promise<void> {
  // write prompt to clipboard
  await vscode.env.clipboard.writeText(prompt);

  // open cursor chat
  await vscode.commands.executeCommand("composer.newAgentChat");

  // timeout to wait for UI
  await new Promise((resolve) => setTimeout(resolve, 100));]

  // paste clipboard to chat
  await vscode.commands.executeCommand("editor.action.clipboardPasteAction");
}

// Usage example:
export function activate(context: vscode.ExtensionContext) {
  const cmd = vscode.commands.registerCommand(
    "your-extension.sendToChat",
    async () => {
      const editor = vscode.window.activeTextEditor;
      const selectedText = editor.document.getText(editor.selection);
      const prompt = PROMPT_TEMPLATE.replace("{{INPUT_TEXT}}", text);
      await sendTextToChat(prompt);
    }
  );
  context.subscriptions.push(cmd);
}

```

this is just a workaround - a native command that accepts a prompt argument would be cleaner imo. I built a [Cursor Rule Extension](https://marketplace.visualstudio.com/items?itemName=natemcgrady.cursor-create-rule-from-selection) yesterday that uses this implementation and it seems to be working so far.

here is the [code](https://github.com/natemcgrady/cursor-rule-extension) if you wanna see more details

---

<div class="post-metadata">

**Author:** ![blazejkustra](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/blazejkustra/32/82933_2.png) [@blazejkustra](https://forum.cursor.com/u/blazejkustra)\
**Post date:** [November 29, 2025, 2:34pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/5 "2025-11-29T14:34:50Z")

</div>

Nice workaround! This is so stupid Cursor doesn’t allow it with one simple command 🤦‍♂️

---

<div class="post-metadata">

**Author:** ![andrewh](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/andrewh/32/65515_2.png) [@andrewh](https://forum.cursor.com/u/andrewh)\
**Post date:** [December 28, 2025, 6:44pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/6 "2025-12-28T18:44:05Z")

</div>

Looking into this

---

<div class="post-metadata">

**Author:** ![andrewh](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/andrewh/32/65515_2.png) [@andrewh](https://forum.cursor.com/u/andrewh)\
**Post date:** [December 28, 2025, 7:32pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/7 "2025-12-28T19:32:41Z")

</div>

Just did it will have it out in the next 10 days, just needed a reminder!

---

<div class="post-metadata">

**Author:** ![blazejkustra](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/blazejkustra/32/82933_2.png) [@blazejkustra](https://forum.cursor.com/u/blazejkustra)\
**Post date:** [December 28, 2025, 7:43pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/8 "2025-12-28T19:43:21Z")

</div>

Awesome, thank you!

---

<div class="post-metadata">

**Author:** ![Steven\_Noland](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Steven\_Noland](https://forum.cursor.com/u/Steven_Noland)\
**Post date:** [January 8, 2026, 8:05pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/9 "2026-01-08T20:05:36Z")

</div>

Really excited for this, were you able to get it in yet?

---

<div class="post-metadata">

**Author:** ![andrewh](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/andrewh/32/65515_2.png) [@andrewh](https://forum.cursor.com/u/andrewh)\
**Post date:** [January 8, 2026, 8:17pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/10 "2026-01-08T20:17:29Z")

</div>

Yes, it’s in Cursor 2.3!

---

<div class="post-metadata">

**Author:** ![Steven\_Noland](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@Steven\_Noland](https://forum.cursor.com/u/Steven_Noland)\
**Post date:** [January 8, 2026, 8:53pm UTC](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/12 "2026-01-08T20:53:20Z")

</div>

[13m](https://forum.cursor.com/t/a-command-for-passing-a-prompt-to-the-chat/138049/11 "Post date")

Sorry if this was obvious but I didn’t see which specific command works, is it `vscode.commands.executeCommand('workbench.action.chat.open', prompt);`

or `cursor.startComposerPrompt`
