I can’t run background agents

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

I can’t run background agents. every few weeks i try and it just never works always fails.

Steps to Reproduce

I literally send any message to a background agent and it always fails.

Expected Behavior

For the background agent to run

Operating System

MacOS

Version Information

Version: 2.4.31 (Universal)
VSCode Version: 1.105.1
Commit: 3578107fdf149b00059ddad37048220e41681000
Date: 2026-02-08T07:42:24.999Z (4 days ago)
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.2.0

For AI issues: which model did you use?

Gpt 5.3 codex

For AI issues: add Request ID with privacy disabled

cant find a request id but heres the url:
https://cursor.com/agents/bc-1abac97e-3cc1-4f5c-b2bd-834a4c3c4716

Additional Information

the error it runs into:

Internal Error: EACCES: permission denied, symlink ‘../lib/node_modules/corepack/dist/pnpm.js’ → ‘/usr/local/bin/pnpm’ at async Object.symlink (node:internal/fs/promises:994:10) at async EnableCommand.generatePosixLink (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23161:5) at async Promise.all (index 0) at async EnableCommand.execute (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23144:5) at async EnableCommand.validateAndExecute (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:20250:22) at async _Cli.run (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21187:18) at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23647:19) ERROR: process “/bin/sh -c corepack enable && corepack prepare yarn@stable --activate” did not complete successfully: exit code: 1 Internal Error: EACCES: permission denied, symlink ‘../lib/node_modules/corepack/dist/pnpm.js’ → ‘/usr/local/bin/pnpm’ at async Object.symlink (node:internal/fs/promises:994:10) at async EnableCommand.generatePosixLink (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23161:5) at async Promise.all (index 0) at async EnableCommand.execute (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23144:5) at async EnableCommand.validateAndExecute (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:20250:22) at async _Cli.run (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21187:18) at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23647:19) ERROR: process “/bin/sh -c corepack enable && corepack prepare yarn@stable --activate” did not complete successfully: exit code: 1 Internal Error: EACCES: permission denied, symlink ‘../lib/node_modules/corepack/dist/pnpm.js’ → ‘/usr/local/bin/pnpm’ at async Object.symlink (node:internal/fs/promises:994:10) at async EnableCommand.generatePosixLink (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23161:5) at async Promise.all (index 0) at async EnableCommand.execute (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23144:5) at async EnableCommand.validateAndExecute (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:20250:22) at async _Cli.run (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:21187:18) at async Object.runMain (/usr/local/lib/node_modules/corepack/dist/lib/corepack.cjs:23647:19) ERROR: process “/bin/sh -c corepack enable && corepack prepare yarn@stable --activate” did not complete successfully: exit code: 1

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. The error happens inside the cloud agent’s sandbox container. It shows up when it tries to run corepack enable because the process doesn’t have permission to create symlinks in /usr/local/bin/.

A couple questions to narrow this down:

  1. Does your project have a Dockerfile, devcontainer.json, or any setup script that runs corepack enable && corepack prepare yarn@stable --activate? Or is this coming from the cloud agent’s default environment?
  2. Does this happen in all repos, or only one specific repo?

I’m sending this to the team along with your agent URL. No ETA yet, but your report helps us prioritize it.

One more thing: it looks like you posted this twice here and in another thread, so I’m going to close the duplicate.

yes we have 2 Dockerfiles with :

# Enable Corepack so we can pin Yarn via the root package.json

RUN corepack *enable
*
I’ve only tried running background agents with this one repo so i cant say

Thanks for the details. The issue is that the Background Agent sandbox doesn’t allow write access to /usr/local/bin/ during the Dockerfile build. corepack enable tries to create a symlink there and hits permission denied.

Try updating your Dockerfile command so Corepack uses a different directory:

# Instead of: RUN corepack enable
RUN corepack enable --install-directory /usr/local/share/corepack-bins && \
    echo 'export PATH="/usr/local/share/corepack-bins:$PATH"' >> ~/.bashrc

ENV PATH="/usr/local/share/corepack-bins:${PATH}"

Or even simpler, install yarn and pnpm directly without Corepack:

RUN npm install -g yarn@stable pnpm

Let me know if that works. If you still run into Dockerfile issues in Background Agent, share the full Dockerfile and I’ll take a look.

okay i had a .cursor/Dockerfile that had corepack i added a long time ago. i just deleted it - but now im getting this