Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
agent worker start used to work independently per repo — running it in each of several repo checkouts gave each one its own worker (also matches the current docs: “To serve more than one repo, start a worker in each repo’s checkout”). As of CLI 2026.08.04-aaa8809, a new global exclusive lock on ~/.local/share/cursor-agent/worker.lock means only one worker can run on the whole machine at a time; starting a second one in a different repo fails with “another worker daemon is already running for this data dir”. The documented fix, the --data-dir <path> flag, is silently ignored (verified via the session log’s worker-mode:config line, which always shows the default global path regardless of the flag). Setting the equivalent CURSOR_DATA_DIR env var instead works correctly, so this is specifically a --data-dir CLI flag wiring bug, not a broken feature overall.
Steps to Reproduce
cd ~/repo-a && agent worker start— starts fine, worker registers for repo-a.cd ~/repo-b && agent worker start— fails immediately:
Error starting exec-daemon: another worker daemon is already running for this data dir: ~/.local/share/cursor-agent/worker.lock- Try the documented workaround:
agent worker --data-dir ./.cursor-agent start(flag placed beforestart, peragent worker --help) — succeeds with “Worker is now running”, no error. - But check the session log (
~/.local/share/cursor-agent/logsor the tmp cursor-agent-logs dir) for theworker-mode:configline —dataDirstill shows the default global path, not./.cursor-agent. Same result with an absolute path instead of relative. - Instead run
CURSOR_DATA_DIR=~/repo-b/.cursor-agent agent worker start— this time the log correctly showsdataDir: "~/repo-b/.cursor-agent", and both workers can run concurrently without conflict.
Expected Behavior
agent worker start should be usable independently per repo without any extra flags/env vars, as before and as the docs still describe. Failing that, at minimum the documented --data-dir flag should actually take effect (matching what CURSOR_DATA_DIR already does correctly).
Operating System
MacOS
Version Information
CLI:
CLI Version: 2026.08.04-aaa8809
OS: darwin (arm64)
Terminal: ghostty
Shell: zsh
For AI issues: which model did you use?
N/A — not a model/AI issue, this is a CLI worker daemon infrastructure bug.
For AI issues: add Request ID with privacy disabled
N/A
Additional Information
Root cause: I diffed the cached CLI builds under ~/.local/share/cursor-agent/versions/. The exclusive-lock module (SQLite BEGIN EXCLUSIVE on <dataDir>/worker.lock, throwing WorkerDaemonAlreadyRunningError) does not exist in the two previous builds I had cached (2026.07.09-a3815c0, 2026.07.23-e383d2b) — it’s new in 2026.08.04-aaa8809. Since the data dir defaults to one fixed path regardless of repo, this new lock is effectively global, which is what breaks the previously-working per-repo workflow.
That old workflow was genuinely nice — cd <repo>; agent worker start, no flags, no per-repo config to remember, and it just worked for as many repos as I had open at once. I’d really like to get back to that level of simplicity rather than needing to set CURSOR_DATA_DIR by hand for every repo (or juggle --worker-dir on a single shared worker instead).
Ask:
- Ideally, restore per-repo worker isolation as the default.
- If a global lock is intentional going forward, please fix
--data-dirso it actually takes effect, and update the my-machines docs (“start a worker in each repo’s checkout”) accordingly.
Happy to provide full debug logs / agent worker debug --json output if useful.
Does this stop you from using Cursor
Yes - Cursor is unusable