Canvas buttons should be able to run terminal commands

Feature request for product/service

Cursor IDE

Describe the request

Allow canvas UI to dispatch a terminal / shell action so a button (or other control) can run an arbitrary command in the workspace — not only IDE navigation or agent-chat actions.

Today useCanvasAction only supports:
openAgent
newComposerChat
openFile

There is no runTerminal / runCommand (or equivalent). Canvases also cannot spawn processes or call local APIs themselves.

Operating System (if it applies)

MacOS

Hey @ivomarel, thanks for the suggestion!

There isn’t a way for a canvas to run a shell command directly today, although that sounds cool! Canvases run in a sandbox and can’t spawn processes or reach local APIs, so a button that executes arbitrary commands would need its own permission story before we could add it.

The closest option right now is the newComposerChat action with a userPrompt, for example “Run pnpm test and summarize the failures”. That opens a new agent chat with the command pre-filled, and the agent runs it under your normal terminal permissions once you send it.

dispatch({ type: "newComposerChat", userPrompt: "Run pnpm test and summarize the failures" })

We’ll keep an eye on how much interest this gets!

Thanks for the quick reply @Colin . Yea I’m aware of the option of giving the agents the command, but it slows it down, and seems like a waste of a prompt.

Not sure if this helps, but I think a good alternative is exposing tasks froms tasks.json in the IDE to the agent window. In fact I used to switch to the IDE specifically for this (also using the Tasks plugin to display the Tasks as button in the bottom bar). If the tasks.json could somehow be exposed (as single-click buttons) to the Agents window, it could be a big win.