@Cursor in slack refuses to use correct environment in some cases

Where does the bug appear (feature/product)?

Cloud Agent (GitHub, Slack, Web, Linear)

Describe the Bug

We have a multi-repo environment configured. We would like it to be used in all cases instead of individual repos, since it has access to all our tools, docker containers, and repos.

However, even when calling @Cursor with an explicit, @Cursor env="Platform" <...>, it will still sometimes fail to pick the right env and instead launches a single-repo run, where nothing is working or configured.

We have tried setting explicit routing rules, but that doesn’t seem to help.

Steps to Reproduce

Try calling @Cursor env="<your multi-repo env" any ask directed at a repo here... and see no pick the environment to run in.

Expected Behavior

There should be a way to force @Cursor routing to use a specific environment.

Operating System

Windows 10/11
MacOS
Linux

Version Information

N/A (Slack integration, Cloud Agents)

For AI issues: which model did you use?

Multiple models

For AI issues: add Request ID with privacy disabled

N/A

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Interesting , especially since the run still starts after ignoring the requested environment.

Would you be able to share a sanitised version of the multi-repo setup and one small task that fails when it falls back to the single-repo environment?

I’ve been looking at a way to make the workspace selection explicit before the agent starts, then return the environment, commands and logs used for the run.

Hey @dmitri_a

A correct env= should win over routing rules and auto-selection on every surface, so a silent single-repo run almost always means the token wasn’t parsed. Worth checking:

  • Exact name, case-sensitive - copy it from your Cloud Agents settings (a partial or near name won’t match).
  • Straight quotes for names with spaces: env="Your Environment Name". Slack can auto-convert these to curly quotes (" "), which won’t match.
  • Lowercase key, inline: @Cursor env="Your Environment Name" <your ask>.

Quick tell: a wrong name gives an in-thread error (“No environment named … was found”); a single-repo run with no error means the env= wasn’t picked up - usually one of the above.

Routing rules bias the automatic selection but don’t hard-force an environment today, which is why they don’t reliably pin things to your multi-repo env. A way to force every Slack launch into a specific environment is something we’ve had requests for and are tracking - no timeline, but I’ll follow up here if that changes.

Building on @michaelmanly’s ask: could you share the exact @Cursor … text from one run that fell back, plus the agent link? That’ll show immediately whether the token parsed. Docs: Slack integration.

Okay, thanks for the help, I can confirm the environment was not selected, even after using the exact name in double-quotes. Here is the prompt:

@Cursor env="<exact env name here>"  investigate why a cold boot (no cache) load of our frontend app might be slow. Test with loading the home page after already being logged in.

And while I can’t share the full agent run due to privacy reasons with our environment setup, here is what it sees about its environment:

user:
what environment is being used?


agent:
None — this run has no linked Cursor environment.

From environment-info:
    environment: null
    Primary repo: github.com/<private-repo-here> only

Regardless, it would be great if we could force an environment being used for the agents started from Slack. It would be very annoying for us to tell our entire team they must append env= to every single prompt for it to work correctly. I tried to make this happen with routing rules, however those seem to have lower priority according to your docs.

For a new run in that thread, use @Cursor agent env="Exact Name" …, or send a fresh top-level @Cursor mention. env= does not retarget an agent that already started.

Was that prompt a new mention, or a reply in an existing thread? If it was new and still launched single-repo with no “No environment named” error, send the Request ID from the agent’s ⋯ menu.

There’s no setting yet to force every Slack launch onto your environment. We’re tracking that, and I’ll post here if there’s an update.

Slack integration

+1 that we would like to force every slack launch (in a particular slack channel) to use a specified environment. Thx for working on it @mohitjain