Agent-shell sandbox DNS resolution broken

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Agent-shell sandbox DNS resolution broken: /run/systemd/resolve/ not exposed, dangling /etc/resolv.conf symlink

Cursor client: 3.1.17 (Universal), commit fce1e9ab7844f9ea35793da01e634aa7e50bce90, macOS (Darwin arm64 25.4.0)
Remote server: same commit fce1e9ab…, Ubuntu 22.04 on AWS (linux 6.8.0-1044-aws)
Tools affected: any tool using the libc resolver — gh, curl, aws, docker pull, etc., all fail with Could not resolve host, even with full_network permission granted to the Shell tool.
Repro (inside an agent Shell call with full_network):

$ curl https://api.github.com
curl: (6) Could not resolve host: api.github.com

$ ls -la /etc/resolv.conf
lrwxrwxrwx 1 nobody nogroup 39 Oct 15 2025 /etc/resolv.conf → ../run/systemd/resolve/stub-resolv.conf

$ cat /etc/resolv.conf
cat: /etc/resolv.conf: No such file or directory

Regression: this worked in past sessions. Something just changed within the last few minutes, I upgraded cursor to the latest version, restarted it, tried various things, but I’m getting the same behavior over and over.

Steps to Reproduce

Ask an agent to curl any web page. Note if it uses its WebFetch tool, things work, but if it needs to directly use the curl CLI, it will fail.

Operating System

Linux

Version Information

Version: 3.1.17 (Universal)
VSCode Version: 1.105.1
Commit: fce1e9ab7844f9ea35793da01e634aa7e50bce90
Date: 2026-04-19T19:33:58.189Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hi @hashr47!

I can reproduce this, and I’m honestly a bit surprised we don’t have more reports. If your theory is correct, this should affect any Linux system using systemd-resolved (which is most Ubuntu/Debian setups)!

Would you know what version of Cursor you upgraded from?

@Colin Thank you for confirming. Here is a screenshot of the version I was at first. To be clear I was hitting the issue on this version too. I upgraded in an attempt to address the error, but the upgrade to 3.1.17 didn’t change the behavior. So I’m not sure what changed when the problem started occurring.

I just upgraded Cursor but no change. I’m still blocked on doing a large category of work—anything requiring the agent to access the internet through non-builtin tools like WebFetch.

Version: 3.2.10 (Universal)
VSCode Version: 1.105.1
Commit: 87903b25fe9074e35b9ba372ed5bf14de5835960
Date: 2026-04-24T00:45:10.396Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

I’m on 3.2.11 now, and I’m no longer seeing this issue.

Thanks for the update @hashr47. I’m not aware of a specific fix that landed between those versions for this issue.

Could you confirm which Auto-run Mode you have set in Cursor Settings > Agent > Auto-run? If it’s set to “Auto-run in sandbox”, the DNS issue should still be present. If it’s set to a non-sandboxed mode, that would explain why things are working.

@Colin You are correct. The problem still exists. Yes, to confirm I have “Auto-run in sandbox” as my setting.

I misreported. I was working on a different project yesterday that is local on my Mac. As you stated earlier, this problem is on Linux machines, so it only occurs for me when I’m in a remote SSH session.

@Colin I noticed that I only hit this issue when I’m in Ask mode. In Agent mode, there is no problem. I don’t know if that was the case before. At least I do have a workaround now. It’s not ideal because when I’m asking my AI to make network calls is often exactly when I want to be in the safer Ask mode.

I seem to have the same issue.

Ubuntu 24.04.4 LTS

cursor 3.3.22.

Agent mode too.

I only hit this issue when I’m in Ask mode. In Agent mode, there is no problem.

Actually I am hitting this issue in Agent mode also. Not sure if I’m doing something different on different days or if the behavior is genuinely inconsistent.

@d10r Thanks for confirming. This is the same known bug.

@hashr47 Thanks for the update. Good to know it affects Agent mode too. The inconsistency you’re seeing may depend on whether a particular command goes through the sandboxed terminal path or not.

Workaround for both of you: In Cursor Settings > Agents, switch from “Auto-run in sandbox” to a non-sandboxed auto-run mode. This bypasses the sandbox entirely, so DNS works normally. The trade-off is losing the sandbox’s security protections for terminal commands, which I understand might not be ideal.

This is a known issue that our team is tracking. A related NixOS variant is also tracked under the same root cause: Cursor’s sandbox unable to run any command: missing zsh mount in sandbox. We’ll update this thread when a fix ships.

Thanks for the feedback.

Setting auto-run outside the sandbox isn’t acceptable in my environment.
The workaround I’m currently using is to use a bespoke http proxy so the dev process can talk to localhost and not require DNS. But it’s a bit cumbersome because requiring explicit proxying for every endpoint a sandbox process wants to talk to. If anybody can figure out a smoother workaround, please let us know.

PS: is there a way to use the cursor subscription (included inference) with other harnesses (e.g. opencode) until this is fixed?