/dispatch:close [--target <name>]from dispatch
Closes the current Claude Code session pane, optionally handing off to watch a PR's CI status. Also closes child panes this session dispatched.
Ships in dispatch. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Get a finished session out of the user's way without losing work. The pane closes. The worktree and branch stay on disk, where the nightly prune removes them once the PR merges. An open PR keeps a watcher: this same session, resumed in the background once its pane closes, that keeps CI green and conflicts resolved until the PR merges or closes.
${CLAUDE_SESSION_ID}--target <name>: close the pane of a session this one dispatched, by its dispatch name. Default: this session's own pane.!sh ${CLAUDE_PLUGIN_ROOT}/scripts/bin-path-check.sh claude-dispatch-close
tmp/ output in place, and make no extra commits.gh pr checks <url> or glab ci status.claude-dispatch-close close --session ${CLAUDE_SESSION_ID} --summary "<summary>"claude-dispatch-close close --handoff --session ${CLAUDE_SESSION_ID} --pr <url> --summary "<summary>"claude-dispatch-close park --session ${CLAUDE_SESSION_ID} --pr <url> --summary "<summary>", then continue under Parked.close is the last tool call of the session. On success it never returns, because closing the pane ends this session. When it returns, the pane is still open: report the error it printed and stop. When park refuses, run the command its error names.
park minimizes the pane, and this session keeps running.
pull-request:babysit <url> in this session.close --handoff command above.claude-dispatch-close restore --session ${CLAUDE_SESSION_ID}, then ask with AskUserQuestion.Run claude-dispatch-close close --target <name>. It refuses a pane this session did not dispatch. This session keeps running.
close.ts reports it and leaves the pane for the user.HC_TERMINAL_ID) are not supported yet. close.ts says so, and the user closes the pane.park works in Rex only, and in a Rex tab with another visible pane.Every close and park appends a row to the dispatch ledger. claude-dispatch-close report --count counts them per event. claude-dispatch-close report --left-behind lists closed sessions that left uncommitted or unpushed work. A failed handoff resume logs to close-resume-<session>.log in the dispatch data directory and appends an ended row whose summary starts with resume failed:.
references/background.md (opens in a new tab)scripts/close.test.ts (opens in a new tab)scripts/close.ts (opens in a new tab)scripts/errors.ts (opens in a new tab)scripts/git.ts (opens in a new tab)scripts/herdr.ts (opens in a new tab)scripts/muxer.ts (opens in a new tab)scripts/muxers.ts (opens in a new tab)scripts/resume.ts (opens in a new tab)scripts/rex.ts (opens in a new tab)scripts/rows.ts (opens in a new tab)scripts/text.ts (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
session-management, pane-close, pr-watcher, background-resume
npx claudepluginhub bendrucker/claude --plugin dispatch2 skills in this plugin
Other plugins' skills for the same job