codex-cancel
SolidCancel an active background Codex job. Use when asked "codex cancel", "stop codex", "abort the codex job", or wants to stop a running Codex task.
AI & Automation 51 stars
4 forks Updated today MIT
Install
Quality Score: 85/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
# Codex Job Cancel
Pass-through wrapper around the Official Codex companion's `cancel` subcommand. Exists so users who disabled the Official plugin's slash commands can still cancel jobs via codex-advisor.
## Phase 1: Confirm target (if ambiguous)
If the user did not provide a `job-id`, the companion cancels the most recent active job — which may not be what they intended. Use `AskUserQuestion` when:
- Multiple active jobs exist (check via `node "$CODEX_COMPANION" status` first, optional).
- The user's phrasing suggests a specific job ("cancel the rescue", "stop the research") but no ID.
Skip the prompt when the intent is obvious (single active job, or they pass an explicit ID).
## Phase 2: Invoke companion cancel
```bash
set -o pipefail
CODEX_COMPANION=$("${CLAUDE_PLUGIN_ROOT}/scripts/resolve-companion.sh") \
|| { echo "Official Codex plugin not found — run /codex-setup" >&2; exit 1; }
node "$CODEX_COMPANION" cancel $ARGUMENTS
```
Relay the companion's output verbatim. It typically reports `cancelled` or `no-op (not running)`.
## Gotchas
- **Cancellation is not instant.** The companion signals the Codex worker; in-flight tool calls may complete before the worker exits. Don't promise "stopped immediately".
- **Cancelling a rescue job does NOT revert the diff.** If Codex already wrote files under `--write`, those changes stay on disk. Remind the user to `git diff` / `git restore` if needed.
- **No job-id == most recent active.** Only one job at a time is the commo...
Details
- Author
- LeeJuOh
- Repository
- LeeJuOh/claude-code-zero
- Created
- 7 months ago
- Last Updated
- today
- Language
- JavaScript
- License
- MIT
Integrates with
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Listed
cancel
Cancels an active Codex job. Use when a running job must be stopped.
3 Updated 6 days ago
okisdev AI & Automation Solid
codex-status
List active and recent Codex jobs plus stored review files. Use when asked "codex status", "what codex jobs are running", or wants to see Codex job state.
51 Updated today
LeeJuOh AI & Automation Listed
codex-cli-runtime
Internal helper contract for calling the codex-companion runtime from Claude Code
0 Updated 4 days ago
Fundryi