Cursor is incorrectly interpreting system prompts and messing with my nx workflow


I am having constant struggles getting it to just run nx commands from the root of the workspace and I think this screenshot explains it all.

1 Like

These rules seem to help. Sent always, otherwise it drops the ball on new file creation and sometimes tries to open files relative to cursors project root and makes a ■■■■ mess of things.

Nx Monorepo Context

CRITICAL: You are working in a nx managed monorepo
CRITICAL: The nx workspaceRoot is /users/flashingcursor/project/nxroot
CRITICAL: The nx.json file is located in nx workspaceRoot
WARNING: do not make assumptions about paths when using available tools & ground yourself using the config in nx.json
RULES:

  • When using the run_terminal_cmd tool with nx commands, first send a cd command to the absolute path where nx.json is located
  • Never chain cd with other commands (e.g., avoid cd dir && nx ...).

The user controls all terminal commands; nx terminal commands will be ignored if you don’t abide by these rules.