Resume handoff

From coalesce-labs/catalyst · View interactive version

Resume handoff is an AI agent skill from the GitHub repository coalesce-labs/catalyst. Resume work from a handoff document. **ALWAYS use when** the user says 'resume handoff', 'pick up where we left off', 'continue from handoff', or provides a handoff document path. Verifies current codebase state against handoff, validates changes, and creates an action plan.

How to use this skill

Skill file

Resume work from a handoff document

You are resuming work from a handoff document, interactively by default or unattended when automation reset the session. Handoffs carry context, learnings, and next steps from a prior session that need to be understood and continued. Never assume the handoff's state still matches the codebase; verify first.

Load on demand

| when | read |

| -- | -- |

| finding the handoff to resume from (no path given, path given, ticket given, or the cited path is missing on disk) | CODE0 |

| reading the handoff, verifying it against current state, and building the plan | CODE0 |

| deciding what to do given the codebase's divergence from the handoff | CODE0 |

| resuming unattended (no human is watching): what replaces each confirmation gate | CODE0 → "Unattended mode" |

Prerequisites

# Thoughts must exist for this skill's documents. CTL-2306: the full host setup check (daemon,
# registry, house rules) belongs to the setup-catalyst skill, not to a skill that must run anywhere.
[[ -e thoughts/shared ]] || echo "⚠️ thoughts/shared is missing in $(pwd) — run \`humanlayer thoughts init\` or the setup-catalyst skill; if the prompt names an output path, write there" >&2

# CTL-2306 explicit-input discovery: begin
# Find the handoff to resume on disk for the ticket this run was given: $CATALYST_TICKET under a
# phase, else a ticket named in the skill's argument text (Claude Code substitutes the token in
# the heredoc below; another harness leaves it literal, which names no ticket). Nothing is
# remembered between runs. `[!0-9]` keeps PROJ-1 from matching PROJ-10's documents.
TICKET_ID="${TICKET_ID:-${CATALYST_TICKET:-}}"
if [[ -z "$TICKET_ID" ]]; then
  SKILL_ARGS=$(cat <<'CATALYST_SKILL_ARGS'
$ARGUMENTS
CATALYST_SKILL_ARGS
)
  TICKET_ID=$(printf '%s' "$SKILL_ARGS" | grep -oE '[A-Z]+-[0-9]+' | head -1)
  [[ -n "$TICKET_ID" ]] || TICKET_ID=$(printf '%s' "$SKILL_ARGS" | tr '[:lower:]' '[:upper:]' | grep -oE '[A-Z]+-[0-9]+' | head -1)
fi
RECENT_HANDOFF=""
if [[ -n "$TICKET_ID" ]]; then
  RECENT_HANDOFF=$(find -H thoughts/shared/handoffs -type f -name '*.md' -ipath "*${TICKET_ID}[!0-9]*" -exec ls -t {} + 2>/dev/null | head -1)
elif [[ -z "${CATALYST_PHASE:-}" ]]; then
  RECENT_HANDOFF=$(find -H thoughts/shared/handoffs -type f -name '*.md' -exec ls -t {} + 2>/dev/null | head -1)
fi
# CTL-2306 explicit-input discovery: end
# CTL-2104: guard the discovered path anyway — thoughts/shared is a per-project symlink and a path can vanish mid-run; an unguarded read of a phantom path yields an empty document that reads like an empty handoff.
if [[ -n "$RECENT_HANDOFF" && ! -f "$RECENT_HANDOFF" ]]; then
  echo "⚠️ Cited handoff is not on disk: $RECENT_HANDOFF"
  echo "   The channel is authoritative — recover from the last turn's text, see references/discovery.md."
  RECENT_HANDOFF=""
elif [[ -n "$RECENT_HANDOFF" ]]; then
  echo "📋 Found handoff: $RECENT_HANDOFF"
else
  echo "⚠️ No handoff found on disk for ${TICKET_ID:-this run}"
fi

Configuration note

This skill uses ticket references like PROJ-123. Replace PROJ with your Linear team's ticket prefix — read it from .catalyst/config.json if available, otherwise use a generic TICKET-XXX form (ENG-123, FEAT-456).

Invariants

CLI tools

To fetch ticket context from Linear (e.g. a ticket referenced in the handoff), use the Linearis CLI — run linearis issues usage or see /catalyst-dev:linearis for exact syntax. Do not guess commands.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.