Hi Cursor team,
I’m currently trying to better understand how .cursorignore interacts with Auto-Run in Sandbox, especially when Cursor is running inside a Dev Container.
My setup is Cursor running in an Ubuntu-based Dev Container on a macOS host system. Auto-Run in Sandbox is enabled, and the workspace contains a .cursorignore file.
My expectation so far was that .cursorignore mainly prevents Cursor’s internal tools from reading, indexing, or adding ignored files to context. Based on my understanding of the available documentation, I did not expect .cursorignore to also affect terminal commands executed inside the sandbox — for example cat , git diff , Maven, or other tooling inside the Dev Container — as long as the underlying filesystem permissions would normally allow access.
However, I’m observing different behavior.
When a file is listed in .cursorignore, terminal access by the agent appears to fail. For example, commands such as cat <file> or git diff <file> fail with a permission error. The agent then reports that the file appears to be owned by root and has mode 000, so nobody can read it. When I remove the same file from .cursorignore, the agent can access it again via terminal commands and also via Cursor’s internal tools, as expected.
So it looks like .cursorignore may currently influence the sandboxed filesystem view, not only Cursor’s indexing/context/file-read tools.
I could not find clear documentation for this behavior. The .cursorignore documentation describes which files Cursor should ignore, while the terminal/sandbox documentation describes filesystem and network restrictions, but I couldn’t find an explicit statement about whether .cursorignore is intentionally enforced for sandboxed terminal commands as well.
One additional observation that adds to my confusion: I vaguely remember that Maven commands used to run automatically in sandbox mode in the past. However, I can now observe that Maven commands are blocked and require manual approval before they are executed. I’m not sure whether my memory is wrong, whether this depends on some configuration, or whether Cursor’s behavior has changed recently. If this is intentional, it would be helpful to understand how the decision is made: which commands are auto-run in sandbox mode, which commands still require manual approval, and whether tools such as Maven are treated differently because they may perform network access, filesystem writes, process execution, or other side effects.
Could you clarify the intended behavior here?
In particular, I would like to understand:
- Is it expected that files listed in
.cursorignorebecome inaccessible to terminal commands executed by the agent in Auto-Run in Sandbox mode? - Is this behavior considered a stable security boundary that users can rely on?
- Does this apply consistently to all tooling launched by the agent inside the Dev Container, for example
cat,grep,git diff, build tools, test tools, language servers, scripts, etc.? - Are there known exceptions or limitations where a tool executed by the agent may still be able to access
.cursorignorefiles? - Is the observed
rootownership /000permission behavior part of the intended implementation, or just an implementation detail? - Is this behavior different when Cursor runs inside a Dev Container compared to running directly on the host?
- Under which conditions does a command still require manual approval even when Auto-Run in Sandbox is enabled?
- Are any tools , like Maven, Gradle, npm, etc., handled specially by the sandbox or permission system?
The reason I’m asking is that we are evaluating Cursor in a more security-conscious development setup. We would like to understand whether .cursorignore can be part of a security concept together with Auto-Run in Sandbox, or whether it should only be treated as a context/indexing control and not as a reliable filesystem access boundary.
Any clarification or pointer to documentation would be very helpful.
Thanks a lot!