From oh-my-harness
Stops running agents by killing tmux sessions and cleaning up git worktrees, with safety warnings for unapplied changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/oh-my-harness:agent-stopThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Stop agents, kill tmux session, and clean up worktrees.
Stop agents, kill tmux session, and clean up worktrees.
Usage: /agent-stop [agent-id|all] Example: /agent-stop all Example: /agent-stop 2
Read agent state from .claude/.omh/agents.json. If no file exists, report "No active agents." and exit.
Parse arguments: Determine which agent(s) to stop from $ARGUMENTS (default: all).
Read useWorktree from agents.json to know whether worktree cleanup is needed.
Check for unapplied changes (only when useWorktree is true):
For each agent being stopped:
git log "main..omh/agent-{i}" --oneline
If there are unmerged commits, warn the user using AskUserQuestion:
Agent {i} has {N} unmerged commit(s):
{commit list}
What would you like to do?
apply — run /agent-apply {i} first, then stop
discard — throw away these changes and stop
cancel — abort, do nothing
Never silently discard work. Always wait for explicit user choice.
Kill tmux panes for target agents:
# Stopping all agents:
tmux kill-session -t "{tmuxSession}"
# Stopping a specific agent:
tmux send-keys -t "{tmuxSession}:0.{i-1}" C-c
tmux send-keys -t "{tmuxSession}:0.{i-1}" "exit" Enter
Remove worktrees (only when useWorktree is true):
git worktree remove .claude/.omh/worktrees/agent-{i} --force
git branch -D "omh/agent-{i}"
Skip this step entirely when useWorktree is false.
Update agent state:
.claude/.omh/agents.json"stopped", keep remaining entriesReport cleanup summary to user.
useWorktree is trueProvides a checklist for code reviews covering functionality, security, performance, maintainability, tests, and quality. Use for pull requests, audits, team standards, and developer training.
npx claudepluginhub hoya324/oh-my-harness --plugin oh-my-harness