Hey folks, I've hit a real head-scratcher with Cursor on a fairly complex Kubernetes monorepo and I'm hoping someone else has battled this dragon. 😅 The issue is that Cursor's indexer is completely failing to traverse our codebase, and after a lot of digging, I think it's due to our symlink structure. The repo uses a sort of hybrid monorepo pattern with symlinks for shared configs, and Cursor just seems to give up.
Our setup looks something like this: we have a `shared-config/` directory containing common Helm values, Istio VirtualService templates, and Terraform modules. Then, inside each service directory (like `services/auth-service/`), we symlink to these shared assets. It keeps things DRY but apparently confuses Cursor's file watcher.
Here's a simplified tree:
```
├── shared-config
│ ├── helm
│ │ └── values-prod.yaml
│ └── istio
│ └── virtualservice-base.yaml
└── services
├── auth-service
│ ├── charts
│ │ └── auth
│ │ └── values.yaml -> ../../../../shared-config/helm/values-prod.yaml
│ └── k8s
│ └── virtualservice.yaml -> ../../../../shared-config/istio/virtualservice-base.yaml
└── another-service
└── ... (similar symlinks)
```
The error in Cursor's logs (found via `Cmd+Shift+P` -> "Cursor: Open Logs") is pretty vague, but repeats:
```
[error] Indexer: Failed to resolve path: services/auth-service/charts/auth/values.yaml
[warning] Indexer: Skipping directory due to symlink cycle detection.
```
What's weird is there's *no actual cycle*. It feels like Cursor's traversal logic might be getting lost when a symlink points to a parent directory or outside the immediate subtree.
**Things I've tried:**
* Adding a `.cursorignore` to skip the `shared-config/` directory directly.
* Using the absolute path symlinks instead of relative ones (no change).
* The nuclear option: copying the files instead of symlinking, which *does* work, but defeats our entire GitOps flow.
Has anyone else run into indexing issues with symbolic links in a monorepo, especially with Kubernetes/Helm setups where this pattern is common? Is there a known workaround, or a config flag I'm missing? I'm wondering if this is a limitation with the underlying file-watching library Cursor uses.
For now, our team is stuck without reliable codebase indexing, which really hurts for refactoring across services or understanding service mesh dependencies. Any insights would be hugely appreciated!
YAML is not a programming language, but I treat it like one.
Oh man, symlinks in monorepos are such a double-edged sword. I ran into a similar indexing headache with Cursor on a project with a ton of pnpm symlinks. The indexer would just silently skip entire directories.
One thing you could try is creating a `.cursorignore` file at your repo root and explicitly telling it to skip the actual `shared-config/` directory. The theory is that if it's ignoring the source and only seeing the symlinks in the service directories, it might not get caught in a loop. I had to play with patterns like `shared-config/**` to get it to stop choking.
Have you checked Cursor's logs? They're a bit buried, but on macOS they're in `~/Library/Logs/Cursor/`. You might see some "cyclic" or "too many levels" errors that confirm the watcher is getting lost. That log was a lifesaver for me.
Pipeline is king.