# Task Resume

> Automatic interrupted-task resume workflow with queueing and recovery. Use when a user asks to resume interrupted work after temporary context switches, protect priority tasks from drift, or enforce "finish current task then auto-resume previous interrupted task" behavior.

- Skill: `johnalbertini14-glitch/task-resume` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add johnalbertini14-glitch/task-resume`
- Raw SKILL.md: https://api.skillmd.com/api/skills/johnalbertini14-glitch/task-resume/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: johnalbertini14-glitch (https://skillmd.com/u/johnalbertini14-glitch)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/johnalbertini14-glitch/task-resume

---


# Task Resume

Use this skill to ensure interrupted tasks are recovered automatically.

## Defaults (MANDATORY)

- Make interruption enqueue the default behavior.
- On any non-explicit context switch, auto-enqueue the active unfinished task.
- Use one shared queue file for all sessions/clones so the view is unified.

## Rules

- Treat user-explicit commands (`cancel`, `pause`, `change priority`, `do it tomorrow`) as overrides.
- Treat all other topic switches as potential interruptions.
- Before switching topics, persist interruption context to queue.
- After completing the active task, immediately resume the oldest queued interrupted task.
- If queue is empty, do nothing.

## Shared Queue Storage (cross-session)

- Canonical queue file: `memory/task-resume-queue.json`
- This file is workspace-global and shared across main + clone + group sessions.
- Always pass source with session/channel identity.
- Use helper script: `scripts/task_resume_queue.py`

## Interruption Detection

Consider a task interrupted when all are true:
1. There is an active task with unfinished acceptance criteria.
2. A new user request is unrelated to finishing that active task.
3. User did not explicitly cancel/pause/defer the active task.

## On Interruption (auto-enqueue)

Run immediately:

```bash
python3 skills/task-resume/scripts/task_resume_queue.py add \
  --title "<active task title>" \
  --context "<what was done + exact next step>" \
  --acceptance "<acceptance criteria>" \
  --source "<channel>" \
  --session "<session_key_or_chat_id>"
```

Then acknowledge briefly: queued + will auto-resume.

## On Active Task Completion (resume)

Run:

```bash
python3 skills/task-resume/scripts/task_resume_queue.py pop
```

- If one item is returned, resume it immediately and announce: `Resuming previously interrupted task: <title>`.
- If empty, continue normal flow.

## Unified View

Run:

```bash
python3 skills/task-resume/scripts/task_resume_queue.py status
```

This returns total queue count + grouped counts by source/session.

## Guardrails

- Never drop queued tasks silently.
- Always include next-step quality context when enqueueing.
- Deduplicate: if same task title and near-identical context exists in queue, update timestamp instead of appending.
- Keep queue max size 30; discard oldest overflow items after logging to `memory/YYYY-MM-DD.md`.

## Daily Hygiene

At least once daily:

```bash
python3 skills/task-resume/scripts/task_resume_queue.py list
```

If stale items (>7 days), ask user whether to cancel or schedule.

