界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

cancel

cancel

【效率与协作】Safely request termination of a tracked detached process group using PID identity validation and a SIGTERM-to-SIGKILL grace period. Use only when the user asks to stop a job; critical repair, migration, firmware, or destructive jobs require explicit risk-aware approval and --force.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: cancel description: Safely request termination of a tracked detached process group using PID identity validation and a SIGTERM-to-SIGKILL grace period. Use only when the user asks to stop a job; critical repair, migration, firmware, or destructive jobs require explicit risk-aware approval and --force.

Cancel Process Job

Resolve <plugin-root> as two directories above this SKILL.md and run:

node "<plugin-root>/scripts/job.mjs" cancel <job-id> [--force] --json

Never search memory for CPJ work; use validated CPJ state.

If ${CODEX_HOME:-$HOME/.codex}/process-jobs is not writable in the current sandbox, request narrow controller escalation on the first call; do not probe for a predictable EPERM.

Never cancel because a Codex task, client, or terminal is closing. Require a specific job id; use $status <job-id> first only if identity/state is unclear. A direct request authorizes normal cancellation of a non-critical job.

For a CRITICAL job, explain that interruption can worsen partial state and obtain explicit approval immediately before --force. This bypasses only the critical guard: the controller still validates PID identity, sends SIGTERM to the process group, waits up to five seconds, and uses SIGKILL only if needed. Never bypass an identity refusal with untracked kill without separate authorization after inspection.

Filesystem/device repair can leave metadata partially rewritten. Prefer waiting unless continued execution presents a greater concrete risk.

我的收藏