`agent worker start --pool` rejects valid Team API Admin keys and ignores --api-key flag

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

I am attempting to run a self-hosted agent pool on my Ubuntu VPS using the agent CLI. Despite generating a fresh Team API Key with Admin scope, the CLI consistently rejects the key as invalid or ignores it entirely, falling back to my cached email login.

I have verified network connectivity and completely wiped the local agent cache, but the issue persists.

Steps to Reproduce

Generate a new Team API Key (Admin scope) from cursor.com/dashboard/team-settings.

Clear the local agent cache to force re-authentication: rm -rf ~/.local/share/cursor-agent

Attempt to start the worker pool passing the key directly:
agent worker start --pool --debug --api-key “crsr_[REDACTED]”

Expected Behavior

The CLI should authenticate via the provided Team API key, log Auth method: api-key, and successfully spin up the pool worker.

Operating System

Linux

Version Information

2026.04.14-ee4b43a

Does this stop you from using Cursor

Yes - Cursor is unusable

Hi @Kian_Lutke

Thanks for the detailed report. This isn’t a bug, but the error messaging is definitely misleading, so I understand the confusion.

The --pool option requires a Service Account API key, not a regular Team API Key. These are different key types with different permission scopes:

  • Team API Keys (what you generated) have administrative permissions but can’t authenticate pool workers

  • Service Account API keys have the specific scope needed for agent pool workers

Service Accounts are currently available on Enterprise plans. You can find more details here: Service Accounts

Another user reported the same confusion here: Cursor Self Hosted Agents and Team Plan / Worker Pool — the team is working on expanding availability.

In the meantime, you can still run a self-hosted worker without --pool using your personal login credentials (agent login first, then agent worker start). This registers it as an individual worker rather than a team-shared pool, but it does work on the Team plan.

It should work with team API key and service accounts. but I also have same issue(reported to support) with team api key

Agreed. Its very confusing. The CLI says OR Team API key but support says Enterprise plan only. You should either clarify that in the CLI too or make it more prominent on the page. OR at best spread this feature to team accounts. because there it makes already a lot of sense