Unable to invoke cursor slash commands from Agent Mode (missing executables)

I’m running Cursor in agent mode (interactive coding agent). The orchestration workflow expects slash commands like `/test-domain`, `/test-application`, `/test-api`, and `/test-persistence`, but when the agent attempts to run them they are not available as executables (shell reports `no such file or directory`). This blocks automated test generation and coverage analysis workflows.

Reproduction steps

1. Start Cursor in agent mode in a repo that uses these slash commands in its test orchestration spec.

2. Allow the agent to execute the workflow.

3. Observe the agent try to run `./test-domain` (custom slash command).

4. Shell returns exit code 127 (`no such file or directory`), so the workflow fails immediately.

Expected behavior

Cursor slash commands referenced in the project should be exposed in agent mode (e.g., as scripts or accessible commands) so the agent can invoke them like in the normal UI.

Actual behavior

The commands are unavailable, causing the agent’s orchestration to fail.

Impact

Automated test coverage workflows relying on slash commands can’t run in agent mode.

Hey, thanks for the report. This is a known issue: Agent is tracking the working directory incorrectly when executing commands.

Try this workaround:

  • Open Cursor Settings Ctrl+Shift+J / Cmd+Shift+J
  • Go to the Agents tab → Inline Editing & Terminal section
  • Enable “Legacy Terminal Tool”
  • Press Ctrl+Shift+P → “Terminal: Kill All Terminals”
  • Fully restart Cursor
  • Test your scripts again

This switches you to the legacy terminal implementation, which correctly tracks the working directory when Agent runs commands.

Let me know if this resolves the issue.

I’ve tried, but it didn’t work.

Could the Cursor agent can automatically invoke sub-agents if I’ve already defined them?

My thought: move them to the sub-agents. Having the Orchestrator agent that invokes appropriate sub-agents when needed

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.