Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
Environment
- Host: Windows 11
- Container: Ubuntu 22.04 base image
- Cursor CLI:
2025.11.25-d5b3271 - Docker service definition (key bits): mounts repo at
/code-src, setsCURSOR_API_KEY,CODE_SEARCH_ROOTS=/code-src, and copies a permissivecli-config.jsoninto~/.cursor. - Additional tooling installed in the image: Node.js 20,
typescriptandtypescript-language-server(needed because the worker spawnsnpx typescript-language-server).
What I’m doing
- Build and start the
cursorservice viadocker compose. - Exec into the container (
docker exec -it cursor_cli bash). - Manually authenticate with
cursor-agent --api-key <KEY>and confirmcursor-agent statusshows “Authenticated”. - Kick off indexing by running any agent command or by letting the background worker start.
Observed behavior (inside Docker)
Worker log (/root/.cursor/projects/code-src/worker.log) always ends like this:
[info] runServer socketPath=/root/.cursor/projects/code-src/worker.sock
[info] Indexing now
[info] Getting tree structure for workspacePath=/code-src
[error] Indexing failed ERROR: ConnectError: [unauthenticated] Error
at errorFromJson (.../index.js:6267:19)
at errorFromJsonBytes (.../index.js:6305:12)
at next (.../index.js:6932:31)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[error] Indexing run failed ERROR: undefined
[info] Indexing finished
The CLI command itself still works (it uses the API key directly), but the worker never manages to index /code-src, so repo search/context is unavailable.
What I verified
- Credentials:
cursor-agent statussucceeds right after--api-key. I also checked/root/.cursor/credentialsis populated when I log in manually. - Network: Followed Network Configuration tests from inside the container. TLS shows Amazon certs (no SSL inspection), HTTP/1.1 SSE and HTTP/2 bidirectional streaming both work without buffering.
- Tooling: Installed Node.js and
typescript-language-serverso the worker can launchnpx typescript-language-serverwithout “tsserver not found” errors. - Config: Using a permissive
cli-config.jsonwithShell/Read/Write(*)just like the one in the original forum post (and the newer version copied in/usr/local/share/cursor-cli/cli-config.json). - Comparison run: Repeated the exact same steps under WSL (no Docker). There indexing completes successfully; the difference appears only in the containerized environment.
Expectation
Once I log in with a valid API key and networking checks pass, the worker should be able to complete fastRepoInitHandshakeV2 and index /code-src. Instead it always dies with ConnectError: [unauthenticated].
What I need
Guidance on what else needs to be configured for Docker deployments, or confirmation that this is a known bug that still isn’t fixed. Original report (September 2025) describing the same behavior: Issue with indexing in Docker container (cursor-agent) — the new CLI version doesn’t seem to have resolved it.
Happy to provide additional sanitized logs if required.
Steps to Reproduce
Steps to reproduce
-
Install Cursor CLI in WSL (baseline).
- Fresh Ubuntu (WSL) shell.
- Run
curl https://cursor.com/install -fsS | bash. cursor-agent --api-key <KEY>and verifycursor-agent status→ “Authenticated”.- In any repo run
cursor-agent -p "List files"; worker log stays clean and indexing completes.
-
Set up Dockerized Cursor CLI (failing case).
- Image: Ubuntu 22.04 with added
nodejs,typescript,typescript-language-server, and the same Cursor CLI install command. - Service mounts repo at
/code-src, setsCURSOR_API_KEY,CODE_SEARCH_ROOTS=/code-src, and copies a permissivecli-config.jsoninto~/.cursor. - Start container (
docker compose up -d cursor), exec inside, runcursor-agent --api-key <KEY>→cursor-agent statusshows “Authenticated”. - Trigger indexing by running
cursor-agent -p "List files"or by waiting for the background worker.
- Image: Ubuntu 22.04 with added
-
Compare Worker Logs.
- WSL run:
/root/.cursor/projects/<repo>/worker.logshows normal indexing. - Docker run: same log immediately contains
[info] Indexing now [info] Getting tree structure for workspacePath=/code-src [error] Indexing failed ERROR: ConnectError: [unauthenticated]
- WSL run:
Expected Behavior
Expected result
Once the CLI is authenticated (confirmed by cursor-agent status) and network checks succeed, the Dockerized worker should behave like the WSL one: finish fastRepoInitHandshakeV2, index /code-src, and avoid ConnectError: [unauthenticated]. Instead, only the Docker container keeps failing, making repo indexing unusable there.
Operating System
Linux
Current Cursor Version (Menu → About Cursor → Copy)
Version: 2025.11.25-d5b3271
Does this stop you from using Cursor
No - Cursor works, but with this issue