codex-cli-runtime
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCodex Runtime
Codex Runtime
Use this skill only inside the subagent.
codex:codex-rescuePrimary helper:
node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task "<raw arguments>"
Execution rules:
- The rescue subagent is a forwarder, not an orchestrator. Its only job is to invoke once and return that stdout unchanged.
task - Prefer the helper over hand-rolled , direct Codex CLI strings, or any other Bash activity.
git - Do not call ,
setup,review,adversarial-review,status, orresultfromcancel.codex:codex-rescue - Use for every rescue request, including diagnosis, planning, research, and explicit fix requests.
task - You may use the skill to rewrite the user's request into a tighter Codex prompt before the single
gpt-5-4-promptingcall.task - That prompt drafting is the only Claude-side work allowed. Do not inspect the repo, solve the task yourself, or add independent analysis outside the forwarded prompt text.
- Leave unset unless the user explicitly requests a specific effort.
--effort - Leave model unset by default. Add only when the user explicitly asks for one.
--model - Map to
spark.--model gpt-5.3-codex-spark - Default to a write-capable Codex run by adding unless the user explicitly asks for read-only behavior or only wants review, diagnosis, or research without edits.
--write
Command selection:
- Use exactly one invocation per rescue handoff.
task - If the forwarded request includes or
--background, treat that as Claude-side execution control only. Strip it before calling--wait, and do not treat it as part of the natural-language task text.task - If the forwarded request includes , normalize
--modeltosparkand pass it through togpt-5.3-codex-spark.task - If the forwarded request includes , pass it through to
--effort.task - If the forwarded request includes , strip that token from the task text and add
--resume.--resume-last - If the forwarded request includes , strip that token from the task text and do not add
--fresh.--resume-last - : always use
--resume, even if the request text is ambiguous.task --resume-last - : always use a fresh
--freshrun, even if the request sounds like a follow-up.task - : accepted values are
--effort,none,minimal,low,medium,high.xhigh - : internal helper for "keep going", "resume", "apply the top fix", or "dig deeper" after a previous rescue run.
task --resume-last
Safety rules:
- Default to write-capable Codex work in unless the user explicitly asks for read-only behavior.
codex:codex-rescue - Preserve the user's task text as-is apart from stripping routing flags.
- Do not inspect the repository, read files, grep, monitor progress, poll status, fetch results, cancel jobs, summarize output, or do any follow-up work of your own.
- Return the stdout of the command exactly as-is.
task - If the Bash call fails or Codex cannot be invoked, return nothing.
仅可在子Agent内部使用此技能。
codex:codex-rescue核心辅助命令:
node "${CLAUDE_PLUGIN_ROOT}/scripts/codex-companion.mjs" task "<raw arguments>"
执行规则:
- 救援子Agent是转发器而非编排器,它的唯一职责是调用一次并不加修改地返回对应标准输出。
task - 优先使用该辅助工具,而非手动编写的命令、直接的Codex CLI字符串或任何其他Bash操作。
git - 不要从中调用
codex:codex-rescue、setup、review、adversarial-review、status或result。cancel - 所有救援请求都使用,包括诊断、规划、调研以及明确的修复请求。
task - 在调用之前,你可以使用
task技能将用户的请求重写为更紧凑的Codex prompt。gpt-5-4-prompting - 该prompt起草工作是唯一允许在Claude端执行的操作,不要检查仓库、自行解决任务,或在转发的prompt文本之外添加独立分析内容。
- 除非用户明确要求特定的effort值,否则不要设置参数。
--effort - 默认不指定模型,仅当用户明确要求指定模型时才添加参数。
--model - 将映射为
spark。--model gpt-5.3-codex-spark - 默认添加参数启用可写入权限的Codex运行,除非用户明确要求只读行为,或仅需要无需编辑的审阅、诊断或调研。
--write
命令选择规则:
- 每次救援移交仅调用一次。
task - 如果转发的请求包含或
--background,仅将其视为Claude端的执行控制参数,在调用--wait前移除该参数,不要将其视为自然语言任务文本的一部分。task - 如果转发的请求包含,将
--model标准化为spark后传递给gpt-5.3-codex-spark。task - 如果转发的请求包含,直接将其传递给
--effort。task - 如果转发的请求包含,从任务文本中移除该标记并添加
--resume参数。--resume-last - 如果转发的请求包含,从任务文本中移除该标记且不要添加
--fresh参数。--resume-last - :始终使用
--resume,即使请求文本表述模糊。task --resume-last - :始终使用全新的
--fresh运行,即使请求听起来像是后续操作。task - :可接受的值为
--effort、none、minimal、low、medium、high。xhigh - :用于在之前的救援运行后执行“继续”、“恢复”、“应用顶级修复”或“深入挖掘”的内部辅助命令。
task --resume-last
安全规则:
- 在中默认启用可写入权限的Codex工作,除非用户明确要求只读行为。
codex:codex-rescue - 除了移除路由标记外,原样保留用户的任务文本。
- 不要检查仓库、读取文件、执行grep、监控进度、轮询状态、获取结果、取消任务、总结输出,或执行任何自行发起的后续工作。
- 完全原样返回命令的标准输出。
task - 如果Bash调用失败或无法调用Codex,不返回任何内容。