Cursor Agent
Operating Cursor Agent on workers — sign-in or CURSOR_API_KEY, why --force and --trust matter, several repositories, and what it cannot do.
Install
curl https://cursor.com/install -fsS | bashcurl https://cursor.com/install -fsS | bashirm 'https://cursor.com/install?win32=true' | iexThe worker looks for cursor-agent on the worker user's PATH.
Sign-in
Run cursor-agent login once as the worker's user, or put CURSOR_API_KEY in the task's environment profile.
Without either a run ends with "Authentication required", which the worker reports as authentication required.
How it runs
cursor-agent -p --output-format stream-json --force --trust [--model <model>] [--add-dir <dir>] <prompt>
--forceruns commands without asking and--trustskips the workspace trust prompt. Without them a headless run waits for an answer.- The installer also provides the same program as
agent. The worker looks forcursor-agentonly, becauseagentis too general a name to search for. - Projects with several repositories reach it: the other repositories are passed with
--add-dir.
Add-on models
Cursor Agent cannot use add-on models or providers configured on the worker. When it reaches its limit, the task moves to another compatible agent, or waits, as the fallback policy says.
Sessions
Resume is not claimed for Cursor Agent: no resume command could be verified without an account. After a crash, recovery starts a fresh session from the checkpoint.
What was verified
Checked against Cursor Agent 2026.10.01 on 2026-10-06: its --help, and a real run without credentials through
the worker's session runtime. A task with the vendor's account has not been run.