rollback-agent

rollback-agent is an agent for Claude Code from asysta-act/agent-flow. It costs 21 tokens per session (1,651 once invoked), scanned A, original, MIT.

A rollback agent that cleans up failed code changes by restoring the repository to its base branch and notifying the issue tracker.

In plain words
What is it for?
Use it after a fixer, test, browser, reviewer, or smoke-check step blocks the pipeline; it also determines when rollback is unsafe or unnecessary.
Why use it?
It helps return a failed pipeline to a known state while preserving a record of why the work was stopped.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the agent-flow plugin — 17 skills, 17 agents shipped together

Good fit Use it after a fixer, test, browser, reviewer, or smoke-check step blocks the pipeline; it also determines when rollback is unsafe or unnecessary.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/asysta-act/agent-flow/rollback-agent
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.

Clone the repo
git clone --depth 1 https://github.com/asysta-act/agent-flow

Made for: Claude Code.

Or install agent-flow, the plugin that ships this one along with the rest of its 17 skills, 17 agents.

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 rollback-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/asysta-act/agent-flow/rollback-agent/github.svg)](https://agentmods.dev/agents/asysta-act/agent-flow/rollback-agent)
Your own site
<a href="https://agentmods.dev/agents/asysta-act/agent-flow/rollback-agent"><img src="https://agentmods.dev/badge/agents/asysta-act/agent-flow/rollback-agent/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rollback-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/asysta-act/agent-flow/rollback-agent"><img src="https://agentmods.dev/badge/agents/asysta-act/agent-flow/rollback-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,651 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00021 $0.01651
Opus 5.5 $0.00008 $0.00660
Sonnet 5.5 $0.00004 $0.00330
Haiku 4.5 $0.00002 $0.00165

Measured 1mo ago against content hash 40059937bb58, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rollback-agent 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 1mo 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.

agents/rollback-agent.md · 132 lines

How it starts

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

You are a Rollback Specialist handling cleanup after pipeline failures.

Goal

Safely revert a failed fix attempt: restore git state to base branch and notify the issue tracker with a structured block comment.

Expertise

Git reset workflows, worktree vs CWD detection, issue tracker commenting via MCP, safe handling of uncommitted work.

Process

Follow these steps exactly, in order. Do NOT skip any step.

  1. Check if Rollback is Needed

    Read the context passed to you. Identify which agent triggered the block:

  • If the blocking agent is analyst (any phase), spec-analyst, or architect → STOP. Do nothing. These agents are read-only, there are no git changes to revert. Output: "No rollback needed — blocking agent ({name}) made no code changes."
  • If the blocking agent is fixer, test-engineer (any flag), browser-agent (any phase), or reviewer, or the blocking step is smoke-check → proceed with rollback.
  • If the blocking agent is publisher → STOP. Do nothing. A PR may already exist; manual cleanup is safer. Output: "No rollback needed — publisher block requires manual cleanup (check for existing PR/branch)."
  • If the blocking agent is scaffolder → STOP. Do nothing. Scaffold cleanup is handled by the /scaffold command. Output: "No rollback needed — scaffolder block handled by scaffold command."
  1. Determine Execution Context

    Run these commands to detect whether you are in a worktree or the main working copy:

git rev-parse --show-toplevel
git worktree list
  • If the current directory is listed as a worktree (not the main working tree) → Worktree mode
  • Otherwise → CWD mode (main working copy)
  1. Read Configuration

    Read base branch from Automation Config (Source Control → Base branch). This is the branch to reset to. Read Issue Tracker configuration (Type, State transitions) for posting the block comment.

  2. Perform Rollback

    • In Worktree mode:
  3. Run: git reset --hard {base_branch}

  4. Run: git clean -fd — removes untracked files created by the fixer (new test files, new modules)

  5. This is safe — worktrees are isolated workspaces, no user work is at risk.

Read the full file on GitHub · 132 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. 1mo ago First seen · 132 lines · 21 tokens per session scan A 40059937bb58

Subscribe to this mod's changes

rollback-agent is an agent published in the GitHub repository asysta-act/agent-flow (12 stars, last pushed 3mo ago), licensed MIT. It adds 21 tokens to every session and 1,651 once invoked, about $0.0001 per session on Opus 5.5. 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-30.

Related

Other agents, from other repositories

launchdarkly-flag-cleanup

A specialized GitHub Copilot agent that uses the LaunchDarkly MCP server to safely automate feature flag cleanup workflows. This agent determines removal readiness, identifies the correct forward value, and creates PRs that preserve production behavior while removing obsolete flags and updating stale defaults.

github/awesome-copilot · 60 tokens

parallel-integrate

Integrate parallel workflow branches. Use after all workers complete to merge branches, resolve conflicts, finalize integration. Triggers: integrate, merge workers, combine branches, finish parallel.

jimmc414/claude-code-plugin-marketplace · 0 tokens

parallel-setup

Set up parallel workflow with git worktrees. Use when starting a parallel task, splitting work across workers, or creating worktrees. Triggers: parallel setup, create worktrees, split work, prepare workers.

jimmc414/claude-code-plugin-marketplace · 0 tokens

parallel-monitor

Monitor parallel workflow progress. Use to check worker status, detect stalls, find blocked workers. Triggers: check progress, worker status, monitor workers, who is done, any blocks.

jimmc414/claude-code-plugin-marketplace · 0 tokens

github-issue-sync-worker

Atomic GitHub issue synchronization executor. Updates issue body checkboxes and completion status based on PROGRESS.json changes.

evan043/claude-cli-advanced-starter-pack · 28 tokens

gsd-executor

Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management. Spawned by execute-phase orchestrator or execute-plan command.

travisjneuman/.claude · 36 tokens