Agent-cli doesn't read .cursor directory from current working directory in monorepo subfolder

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

When opening agent-cli in a subfolder of a monorepo, the following issues occur:

  1. Doesn’t read .cursor directory from current working directory: agent-cli doesn’t read the .cursor directory from the current working directory
  2. Incorrect path when generating rules and skills: When generating rules and skills, they are not generated in the .cursor directory of the current working directory, but instead are generated in the monorepo parent directory

Steps to Reproduce

  1. In a monorepo structure, navigate to a subfolder (e.g., td-all/td-cc/)
  2. Run agent-cli in that subfolder
  3. Try to generate a rule or skill
  4. Observe where the files are generated

Expected Behavior

agent-cli should behave consistently with cursor-ide:

  • Read the .cursor directory from the current working directory
  • When generating rules and skills, they should be generated in the .cursor directory of the current working directory

Operating System

MacOS

Version Information

CLI Version 2026.01.23-916f423

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report.

This looks like a path resolution bug in the CLI when working in a monorepo. The team has logged similar issues, but not this exact case.

To help us dig in, can you share:

  1. Is there a .cursor directory in the monorepo root folder, or only in td-cc/?
  2. What exact command are you using to generate rules/skills (for example, /create-rule or something else)?
  3. The terminal output when running the CLI from the subfolder. There might be a warning about the config path.

For now, the workaround is to run the CLI from the monorepo root, if possible. Not ideal, I know.

Once you share the info, I’ll pass it to the team for tracking.

Hi,

Thanks for the quick response!

To answer your questions:

1. Is there a .cursor directory in the monorepo root folder, or only in td-cc/?

Both exist:

  • There is a .cursor directory in the monorepo root folder (td-all/.cursor)

  • There is also a .cursor directory in the subfolder (td-all/td-cc/.cursor)

The issue is that when running agent-cli from td-cc/, it seems to be reading from the root .cursor directory instead of the local one.

2. What exact command are you using to generate rules/skills?

I’m using the /create-rule command (via the create-rule skill) to generate rules. When I run this command from the td-cc/ subfolder, the generated rule files are created in td-all/.cursor/rules/ instead of td-cc/.cursor/rules/.

3. The terminal output when running the CLI from the subfolder:

I just ran the command again from td-cc/ and there are no warnings or errors - everything appears to run normally. However, the issue is that the files are silently being generated in the wrong location (td-all/.cursor/rules/ instead of td-cc/.cursor/rules/) without any indication that this is happening.

This makes the bug particularly subtle - the CLI doesn’t give any indication that it’s using the wrong path, so users might not notice until they check where the files were actually created.

Additional context:

  • The monorepo structure: td-all/ (root) contains multiple subprojects including td-cc/, td-oversight/, etc.

  • Each subproject has its own .cursor directory with project-specific rules and skills

  • When working in td-cc/, I expect agent-cli to use td-cc/.cursor/ for reading and writing, but it’s currently using td-all/.cursor/ instead

  • This behavior is inconsistent with cursor-ide, which correctly uses the .cursor directory from the current workspace

I understand the workaround of running from the monorepo root, but that’s not ideal since each subproject has its own configuration needs.

Let me know if you need any additional information!

Best regards, HanKangShuai

[



|
韩康帅
[email protected]
|

  • | - |

](https://wx.mail.qq.com/home/index?t=readmail_businesscard_midpage&nocheck=true&name=韩康帅&icon=http%3A%2F%2Fthirdqq.qlogo.cn%2Fek_qqapp%2FAQFzrDicXiceXHx20cKMLJ8icUKB2cesYXtqx8ubDD5FA3HSv6KSu304S9aTVsM7dfYJPqGt3Cia%2F0&mail=hankangshuai%40vip.qq.com&code=daYoxARYku3xjIeFHEQlhDsumdykTYJITxJsR6c08h2JO_cOHUjKbr9kEtpSGs5SxQSdAo6TRxQLf3f4sRQ_XHSAsQHAWebJaJXT3WPKOW4)

Thanks for the details, now the full picture is clear.

This is definitely a bug. The CLI should use the .cursor file from the current directory, just like the IDE does. What’s especially tricky is that there are no warnings, files are silently created in the wrong place.

I’ll pass this on to the team.

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