Is there a way to add rule or agent md only for cloud agent?
Hey, yep. As of today there are three ways that work:
-
.cursor/CLOUD.md
This is only read by the Cloud or Background Agent, and the local IDE chat ignores it. If bothAGENTS.mdand.cursor/CLOUD.mdexist, cloud uses both, firstAGENTS.md, thenCLOUD.md. If only.cursor/CLOUD.mdexists, cloud uses only that. -
metadata.environments: cloudin the front matter of.cursor/rules/*.mdc:
---
description: My cloud-only rule
alwaysApply: true
metadata:
environments: cloud
---
Rule body here.
Valid values are cloud and local. The rule applies only in the selected environment.
metadata.disabledEnvironments: cloud
This is the opposite. It disables the rule in cloud, which effectively makes it local-only.
Note: AGENTS.md by itself is not cloud-only. It is read in both environments. If you need cloud-only behavior at the instructions file level, use .cursor/CLOUD.md. If you need it at the rule level, use metadata.environments or metadata.disabledEnvironments in .mdc.
These options are not documented in the public docs yet. Let me know if anything behaves differently than expected in your setup.