workflow-resume

workflow-resume is a command for Claude Code from keychain-io/trustable-ai. It costs 0 tokens per session (3,165 once invoked), scanned A, original, MIT.

A workflow that continues an unfinished workflow from its last saved checkpoint. A checkpoint is a stored progress record that allows work to continue after interruption or failure.

In plain words
What is it for?
It scans .claude/workflow-state for workflows marked in progress or failed, then helps resume them.
Why use it?
It avoids restarting an incomplete workflow from the beginning.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions Claude Code.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/keychain-io/trustable-ai/workflow-resume
Clone the repo
git clone --depth 1 https://github.com/keychain-io/trustable-ai

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for workflow-resume

README.md
[![agentmods](https://agentmods.dev/badge/commands/keychain-io/trustable-ai/workflow-resume.svg)](https://agentmods.dev/commands/keychain-io/trustable-ai/workflow-resume)
Your own site
<a href="https://agentmods.dev/commands/keychain-io/trustable-ai/workflow-resume"><img src="https://agentmods.dev/badge/commands/keychain-io/trustable-ai/workflow-resume.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,165 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.03165
Opus 5 $0.00000 $0.01582
Sonnet 5 $0.00000 $0.00633
Haiku 4.5 $0.00000 $0.00316

Measured 5d ago against content hash 3a1bc5b98f4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

workflow-resume scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/workflow-resume.md · 402 lines

How it starts

The opening of the file, as written. The whole thing — 402 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workflow Resume

Resume an incomplete workflow from its last checkpoint.

Scan for Incomplete Workflows

import json
from pathlib import Path
from datetime import datetime

def scan_incomplete_workflows():
    """Scan for incomplete workflow states."""
    state_dir = Path(".claude/workflow-state")

    if not state_dir.exists():
        print("No workflow state directory found.")
        print("Run a workflow first to create state files.")
        return []

    incomplete = []

    for state_file in state_dir.glob("*.json"):
        try:
            state = json.loads(state_file.read_text())

            # Only include incomplete workflows
            if state.get("status") in ["in_progress", "failed"]:
                # Parse timestamps
                started_at = datetime.fromisoformat(state["started_at"])
                updated_at = datetime.fromisoformat(state.get("updated_at", state["started_at"]))

                # Calculate age
                age = datetime.now() - updated_at
                if age.days > 0:
                    age_str = f"{age.days} day(s) ago"
                elif age.seconds > 3600:
                    age_str = f"{age.seconds // 3600} hour(s) ago"
                else:
                    age_str = f"{age.seconds // 60} minute(s) ago"

                # Get current/last step
                current_step = state.get("current_step", {}).get("name", "unknown")
                completed_steps = len(state.get("completed_steps", []))

                incomplete.append({
                    "file": state_file.name,
                    "workflow_name": state.get("workflow_name"),
                    "workflow_id": state.get("workflow_id"),
                    "status": state.get("status"),
                    "current_step": current_step,
                    "completed_steps": completed_steps,
                    "age": age_str,
                    "started_at": started_at.strftime("%Y-%m-%d %H:%M"),
                    "work_items_created": len(state.get("created_work_items", [])),
                    "errors": len(state.get("errors", [])),
                    "metadata": state.get("metadata", {}),
                    "state": state  # Keep full state for later use
                })
        except Exception as e:
            print(f"Warning: Could not parse {state_file.name}: {e}")

    # Sort by most recently updated
    incomplete.sort(key=lambda x: x["state"].get("updated_at", ""), reverse=True)

    return incomplete

# Scan for incomplete workflows
incomplete_workflows = scan_incomplete_workflows()

Read the full file on GitHub · 402 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 402 lines · 0 tokens per session scan A 3a1bc5b98f4c

Subscribe to this mod's changes

workflow-resume is a command published in the GitHub repository keychain-io/trustable-ai (2 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,165 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.