Protecting Key Parts of Code from the Composer Agent

Hi everyone,

Is there a way to lock certain scripts or logic in Cursor so the Composer Agent can view them but not modify them? I’ve noticed that the agent sometimes unintentionally deletes unrelated logic while performing tasks. While I can decline the updates, it’s frustrating to deal with these changes repeatedly.

Having a feature to protect key parts of the code would be incredibly helpful. If such a feature doesn’t exist, does anyone have any tips or workarounds for preventing these issues?

Thanks!

1 Like