cursor-agent
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCursor Agent
Cursor Agent
Options and boundaries
选项与边界
Default: ,
mode/model omitted, text output, parent wait 15m. Print alone can write.
"Plan" / "read-only plan" adds ; "ask" / "Q&A" adds .
Both block. "Use <model>" adds . "Interactive" / "TUI" omits print.
"Resume <id>" adds ; "continue" adds ; both block.
"Worktree [name]" adds ; record the printed path.
"JSON" / "stream-json" selects that print format. Ambiguity is .
cursor-agent --print --workspace <abs-dir> "<prompt>"--plan--mode ask--model--resume--continue--worktree [name]BLOCKEDWorkspace trust needs the user's named authorization for this run; a coding
request is not trust. On , or before ,
apply . Trust recovery adds only an
authorized , not force/yolo. Force, sandbox disabled, approve-mcps,
and worker desktop/credential controls need their own named waivers.
Auto-review is explicit opt-in, not a trust or permission bypass.
Workspace Trust Required--trustreferences/trust-integrations.md--trust默认用法:,
省略模式/模型,文本输出,父进程等待15分钟。仅print模式可写入。
“计划”/“只读计划”模式添加参数;“询问”/“问答”模式添加参数。
两者均为阻塞式。“使用<模型>”添加参数。“交互式”/“TUI”模式省略print参数。
“恢复<id>”添加参数;“继续”添加参数;两者均为阻塞式。
“工作树[名称]”添加参数;记录打印输出的路径。
“JSON”/“流式JSON”选择对应的打印格式。存在歧义时返回。
cursor-agent --print --workspace <abs-dir> "<prompt>"--plan--mode ask--model--resume--continue--worktree [name]BLOCKED工作区信任需要用户针对本次运行的显式授权;编码请求不代表信任。
出现提示时,或在使用参数之前,
需遵循的规定。信任恢复仅添加已授权的参数,
不得使用强制/YOLO模式。强制模式、沙箱禁用、approve-mcps
以及worker桌面/凭证控制均需要各自的显式豁免。
自动审查需用户显式开启,不得绕过信任或权限。
Workspace Trust Required--trustreferences/trust-integrations.md--trust1. Resolve
1. 解析
Fix workspace, prompt, mode, session/worktree, output, and wait.
Check binary and without exposing secrets.
Missing binary → follow ; missing auth →
unless login was requested. Resolve trust before running.
Record .
Done when target, binary, auth, trust, and authorized options are fixed.
cursor-agent status --format jsonreferences/install.mdBLOCKEDcmd | workspace | mode | session | worktree | trust | waiver | wait | evidence | terminal确定工作区、提示词、模式、会话/工作树、输出方式和等待时长。
检查二进制文件并执行命令,不得泄露密钥。
缺少二进制文件→遵循的指引;缺少授权→返回
除非用户请求了登录操作。运行前先完成信任解析。
记录以下字段:。
当目标、二进制文件、授权、信任状态和已授权选项均确定后,本阶段完成。
cursor-agent status --format jsonreferences/install.mdBLOCKEDcmd | workspace | mode | session | worktree | trust | waiver | wait | evidence | terminal2. Run
2. 运行
Build argv and quote the prompt literally. Text/json may be quiet until
exit; silence is not a hang. Wait until exit or the recorded deadline;
kill only this run's PID at that deadline. Nonzero exit: capture stderr,
inspect the tree, report , not a retry with added force.
BLOCKEDFor JSON/stream output, follow .
For resume, continue, or persist, follow .
For worktrees/parallel runs, follow .
For a TUI or other command syntax, follow .
For login, MCP, plugins, workers, or Bedrock, apply the matching branch in
. On rejected syntax, use scoped .
Done when the process exits, an intended live session is recorded, or an
authorization gate/failure is reported.
references/streaming.mdreferences/sessions.mdreferences/worktrees.mdreferences/management.mdreferences/trust-integrations.md--help构建argv参数数组,并按字面意思引用提示词。text/json模式在进程退出前可能无输出;
无输出不等于进程挂起。等待进程退出或达到记录的截止时间;
截止时间到后仅终止本次运行的PID。非零退出码:捕获stderr输出,
检查目录树结构,报告,不得添加强制参数重试。
BLOCKED对于JSON/流式输出,遵循的指引。
对于恢复、继续或持久化会话,遵循的指引。
对于工作树/并行运行,遵循的指引。
对于TUI或其他命令语法,遵循的指引。
对于登录、MCP、插件、workers或Bedrock,应用中对应的分支规则。
遇到不被接受的语法时,使用对应作用域的命令。
当进程退出、预期的活动会话已记录,或已报告授权门槛触发/授权失败时,本阶段完成。
references/streaming.mdreferences/sessions.mdreferences/worktrees.mdreferences/management.mdreferences/trust-integrations.md--help3. Verify and report
3. 验证与报告
Inspect status and diff; CLI text is unverified. Run the narrowest covering
tests for edited executable code. Plan/ask must leave the tree unchanged.
Check each worktree and any integrated tree. Clean up only sessions and clean
worktrees this run created unless kept; preserve shell integration, MCP,
plugins, and workers. Report command, mode, session/worktree, waivers, wait,
and outcome evidence. Done when each outcome is observed or blocked with evidence.
Terminals: , , , .
SUCCESSNO_CHANGESBLOCKEDAWAITING_USER检查运行状态和diff结果;CLI的文本输出不做验证。
针对编辑过的可执行代码运行最小范围的覆盖测试。计划/询问模式必须保持目录树不变。
检查每个工作树以及所有集成的目录树。仅清理本次运行创建的会话和干净的工作树(除非要求保留);
保留shell集成、MCP、插件和workers。报告命令、模式、会话/工作树、豁免情况、等待时长和结果证据。
当每个结果都已确认,或已附带证据标记为阻塞时,本阶段完成。
终止状态:、、、。
SUCCESSNO_CHANGESBLOCKEDAWAITING_USER