Skip to content
Research
Command

/cancel-research

Cancel an active deep research session

BOOST
From plugin
research-council
1072 skills2 commands1 hook
Install
> /plugin marketplace add hamelsmu/research-council
> /plugin install research-council@research-council

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/cancel-research

Context preview

What this command does when you run it.

Cancel an active deep research session

Command definition

cancel-research.md
description: "Cancel an active deep research session"
allowed-tools:
  - Bash(test -f .claude/deep-research.local.md *)
  - Bash(rm -f .claude/deep-research.local.md .claude/deep-research.lock)
  - Bash(kill *)
  - Bash(pkill *)
  - Bash(cat research/*/agent-pids.txt *)
  - Read

Check if a research session is active:

test -f .claude/deep-research.local.md && echo "ACTIVE" || echo "NONE"

If active, read `.claude/deep-research.local.md` to get the current phase and research ID.

Then kill any running agent processes and remove the state file:

# Read the research_id from state file
RESEARCH_ID=$(sed -n 's/^research_id: *//p' .claude/deep-research.local.md | head -1)

# Kill running agent processes and their children if PID file exists
PID_FILE="research/${RESEARCH_ID}/agent-pids.txt"
if [ -f "$PID_FILE" ]; then
  for pid in $(cat "$PID_FILE"); do
    pkill -TERM -P "$pid" 2>/dev/null || true
    kill -TERM "$pid" 2>/dev/null || true
  done
  sleep 1
  for pid in $(cat "$PID_FILE"); do
    pkill -KILL -P "$pid" 2>/dev/null || true
    kill -KILL "$pid" 2>/dev/null || true
  done
  rm -f "$PID_FILE"
fi

# Remove state file and lock file
rm -f .claude/deep-research.local.md .claude/deep-research.lock

Report: "Research council cancelled (was at phase: X, research ID: Y). Running agent processes have been terminated."

If no research session was active, report: "No active research session found."

Read more
Ships withresearch-council

A Claude Code plugin that orchestrates deep research across two coding agents — Claude Code and Codex CLI (OpenAI) — running in parallel with cross-pollination refinement and final synthesis.

Get the whole plugin
Stats
107
Stars
15
Forks
Quiet
Maintenance
Shell
Language
8mo ago
Last commit
8mo ago
Created
1d ago
Added

Repo: hamelsmu/research-council

Other commands on research-council.