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

**URL:** <https://forum.cursor.com/t/unable-to-invoke-cursor-slash-commands-from-agent-mode-missing-executables/141879>\
**Category:** Bug Reports\
**Created:** [November 10, 2025, 7:58am UTC](https://forum.cursor.com/t/unable-to-invoke-cursor-slash-commands-from-agent-mode-missing-executables/141879 "2025-11-10T07:58:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![linh.vu.quach](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@linh.vu.quach](https://forum.cursor.com/u/linh.vu.quach)\
**Post date:** [November 10, 2025, 7:58am UTC](https://forum.cursor.com/t/unable-to-invoke-cursor-slash-commands-from-agent-mode-missing-executables/141879/1 "2025-11-10T07:58:50Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/1/4/14de48df38b291d3b0d876096fdabe74d35fb145.png)

**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.

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [November 10, 2025, 11:26am UTC](https://forum.cursor.com/t/unable-to-invoke-cursor-slash-commands-from-agent-mode-missing-executables/141879/2 "2025-11-10T11:26:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![linh.vu.quach](https://avatars.discourse-cdn.com/v4/letter/l/e495f1/32.png) [@linh.vu.quach](https://forum.cursor.com/u/linh.vu.quach)\
**Post date:** [November 13, 2025, 7:56am UTC](https://forum.cursor.com/t/unable-to-invoke-cursor-slash-commands-from-agent-mode-missing-executables/141879/3 "2025-11-13T07:56:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [December 5, 2025, 7:57am UTC](https://forum.cursor.com/t/unable-to-invoke-cursor-slash-commands-from-agent-mode-missing-executables/141879/4 "2025-12-05T07:57:36Z")

</div>

Closed on December 5, 2025, 7:57am UTC

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