claude-code
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseClaude Code
Claude Code
Options and boundaries
选项与边界
Default: from the target
directory; permission mode and model omitted; parent wait 15m.
"Read-only" / "plan" adds ; print alone can write.
"Use <model>" adds . "Interactive" / "TUI" omits .
"Resume <id>" adds ; "continue" adds ; both block.
"Worktree [name]" adds ; record the emitted path.
"JSON" / "stream-json" selects that print output. Missing needed values or
conflicting options are .
claude --print --output-format text "<prompt>"--permission-mode plan--model--print--resume--continue--worktree [name]BLOCKEDPermissions remain when print skips the trust dialog. A named waiver is
required for skip-permissions, bypassPermissions, dontAsk, auto, or
allow-dangerously-skip-permissions. Before using one, or when a print
permission prompt appears, follow ; recovery
does not invent a bypass. starts a session: use .
is not documentation.
references/permissions.mdclaude helpclaude --helpremote-control默认:在目标目录执行 ;省略权限模式和模型;父进程等待15分钟。
「只读」/「计划」模式会添加 参数;仅使用 print 参数时允许写入操作。
「使用 <model>」会添加 参数。「交互式」/「TUI」模式会省略 参数。
「恢复 <id>」会添加 参数;「继续」会添加 参数;二者均为阻塞式操作。
「工作树 [名称]」会添加 参数;需记录输出的路径。
「JSON」/「流式JSON」会选择对应的打印输出格式。缺少必要参数或选项冲突时会被标记为 。
claude --print --output-format text "<prompt>"--permission-mode plan--model--print--resume--continue--worktree [name]BLOCKED当 print 参数跳过信任对话框时,权限规则仍然生效。使用 skip-permissions、bypassPermissions、dontAsk、auto 或 allow-dangerously-skip-permissions 参数需要对应的豁免声明。在使用上述参数前,或出现 print 权限提示时,请遵循 的规定;恢复流程不会自行生成权限绕过方式。 会启动一个会话:请使用 。 不属于文档范畴。
references/permissions.mdclaude helpclaude --helpremote-control1. Resolve
1. 解析
Fix absolute workspace, prompt, mode, session, worktree, output, and wait.
Check binary and without exposing secrets.
Missing binary → follow ; missing auth →
unless login was requested. Wrong cwd blocks.
Record .
Done when target, binary, auth, and authorized options are fixed.
claude auth status --textreferences/install.mdBLOCKEDcmd | workspace | mode | session | worktree | waiver | wait | evidence | terminal确定绝对工作区、提示词、模式、会话、工作树、输出和等待时间。
在不泄露密钥的前提下检查二进制文件是否存在,并执行 命令验证状态。
缺少二进制文件 → 遵循 ;缺少认证信息 → 返回 ,除非用户请求登录。cwd 错误会导致阻塞。
记录 信息。
当目标、二进制文件、认证信息和授权选项全部确认后,该步骤完成。
claude auth status --textreferences/install.mdBLOCKEDcmd | workspace | mode | session | worktree | waiver | wait | evidence | terminal2. Run
2. 运行
Build argv from those options and quote the prompt literally. Default text
is quiet until process exit; silence is not a hang. Wait for exit or the
recorded deadline, and kill only this run's PID when that deadline expires.
Nonzero exit: capture stderr, inspect the tree, and report .
BLOCKEDFor JSON/stream output, follow . For resume,
continue, or background sessions, follow .
For worktrees or parallel runs, follow .
For an asked-for TUI or management command, follow .
A rejected flag requires scoped , not a guessed replacement.
Done when the process exits, an intended live handle is recorded, or a
permission/authorization gate is reported.
references/streaming.mdreferences/sessions.mdreferences/worktrees.mdreferences/management.md--help根据上述选项构建 argv,并按字面意思引用提示词。默认文本模式下,进程退出前不会产生输出;静默不代表程序挂起。等待进程退出或达到记录的截止时间,截止时间到期时,仅终止本次运行对应的 PID。
进程非零退出时:捕获 stderr 输出,检查目录树结构,并报告 。
BLOCKED对于 JSON/流式输出,请遵循 。对于恢复、继续或后台会话,请遵循 。
对于工作树或并行运行,请遵循 。
对于请求的 TUI 或管理命令,请遵循 。
如果某个标志参数被拒绝,应使用对应范围的 查看用法,而非猜测替代参数。
当进程退出、记录了预期的活动句柄,或报告遇到权限/授权关卡时,该步骤完成。
references/streaming.mdreferences/sessions.mdreferences/worktrees.mdreferences/management.md--help3. Verify and report
3. 验证与报告
Inspect status and diff; CLI text is not proof. Run the narrowest covering
tests for edited executable code. Plan mode must leave the tree unchanged.
Verify each worktree and any integrated tree. Clean up only this run's
sessions/worktrees unless explicitly kept; preserve auth, MCP, and plugins.
Report command, mode, session/worktree, waiver, wait, and outcome evidence.
Done when every requested outcome is observed or a blocker is evidenced.
Terminals: , , , .
SUCCESSNO_CHANGESBLOCKEDAWAITING_USER检查状态和差异;CLI 的文本输出不能作为有效证明。针对编辑过的可执行代码运行最小覆盖范围的测试。计划模式必须保证目录树无任何变更。
验证每个工作树和所有集成的目录树。除非明确要求保留,否则仅清理本次运行产生的会话/工作树;保留认证信息、MCP 配置和插件。
报告命令、模式、会话/工作树、豁免声明、等待时间和结果证据。
当所有预期结果都已观察到,或证实存在阻塞因素时,该步骤完成。
终止状态:、、、。
SUCCESSNO_CHANGESBLOCKEDAWAITING_USER