Resume pending work from a previous session
Resume pending tasks, workflows, or git operations from your previous session. Use this to continue work where you left off after restarting Claude Code.
/plugin marketplace add settlemint/agent-marketplace/plugin install crew@settlemintLoad patterns skill first:
Skill({ skill: "crew:crew-patterns" });
This provides: <pattern name="user-questions-constraint"/>.
<restart_context>
!${CLAUDE_PLUGIN_ROOT}/scripts/workflow/restart-context.sh
</restart_context>
<stack_context>
!${CLAUDE_PLUGIN_ROOT}/scripts/git/machete-context.sh
</stack_context>
CRITICAL: Follow <pattern name="user-questions-constraint"/> - NEVER output plain text questions.
Based on context above, determine the appropriate action:
<phase name="detect-state"> ```javascript // Check what needs to be resumed based on script output const hasPendingTasks = /* task files found */; const hasActiveWorkflow = /* state.json has activeWorkflow */; const hasStateFile = /* state.json exists */; ``` </phase> <phase name="resume-work">If pending task files found:
Skill({ skill: "crew:build" });
If active workflow in state.json:
// Invoke the workflow skill from state
const workflow = state.activeWorkflow; // e.g., "crew:design", "crew:check"
Skill({ skill: workflow });
If state.json exists with todos:
// Restore TodoWrite state and continue
TodoWrite({ todos: state.todos });
// Resume from last in_progress item
If nothing pending but context shows actionable items (PRs, branches, etc.):
AskUserQuestion({
questions: [
{
question: "What would you like to do?",
header: "Action",
options: [
{
label: "Create PR",
description: "Open pull request for current branch",
},
{
label: "Clean branches",
description: "Remove merged branches from the git-machete stack",
},
{ label: "Sync stack", description: "Traverse and sync branch stack" },
],
multiSelect: false,
},
],
});
// Based on selection:
// Create PR → Skill({ skill: "crew:git:pr" });
// Clean branches → Skill({ skill: "crew:git:clean" });
// Sync stack → Skill({ skill: "crew:git:traverse" });
If truly nothing to resume:
Report: "No pending work found."
</phase> </process>