codex-cli-runtime

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Codex Runtime

Codex Runtime

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