converge

converge is a command for coding agents from lugassawan/swe-workbench. It costs 62 tokens per session (7,243 once invoked), scanned A, original, MIT.

An unattended command that repeatedly reviews the current code branch, applies fixes, and reviews it again. It stops when no findings at Medium severity or higher remain, or when safety limits are reached.

In plain words
What is it for?
Use it to clean up a branch through up to six review cycles, stop when tests fail or progress oscillates, and push the result once.
Why use it?
It reduces the need to manually coordinate repeated review-and-fix cycles. Findings remain local instead of being posted to GitHub during the process.

Command

Part of the swe-workbench plugin — 60 skills, 25 commands, 32 agents, 4 hooks shipped together

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/lugassawan/swe-workbench/converge
Clone the repo
git clone --depth 1 https://github.com/lugassawan/swe-workbench

Or install swe-workbench, the plugin that ships this one along with the rest of its 60 skills, 25 commands, 32 agents, 4 hooks.

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 converge

README.md
[![agentmods](https://agentmods.dev/badge/commands/lugassawan/swe-workbench/converge.svg)](https://agentmods.dev/commands/lugassawan/swe-workbench/converge)
Your own site
<a href="https://agentmods.dev/commands/lugassawan/swe-workbench/converge"><img src="https://agentmods.dev/badge/commands/lugassawan/swe-workbench/converge.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,243 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 $0.00062 $0.07243
Opus 5 $0.00031 $0.03622
Sonnet 5 $0.00012 $0.01449
Haiku 4.5 $0.00006 $0.00724

Measured 4d ago against content hash 97ba7623fb8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

converge 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 4d 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.

commands/converge.md · 483 lines

How it starts

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

Run a local, unattended convergence loop on the current branch: review → verify findings → fix → re-review, until the reviewer has nothing left to say at or above Medium severity, then push once. No intermediate round is ever posted to GitHub — findings live in a local scratch file under $RUN_DIR and are deleted the moment they're consumed.

Argument parsing

$ARGUMENTS carries at most one flag: --cap <N>, N in 2..6. Parse it once, up front:

CAP=4
case "$ARGUMENTS" in
  *--cap*)
    CAP=$(printf '%s\n' "$ARGUMENTS" | grep -oE -- '--cap[= ]([0-9]+)' | grep -oE '[0-9]+' | head -1)
    case "$CAP" in
      2|3|4|5|6) ;;
      *) echo "converge: --cap must be an integer in 2..6 (got: ${CAP:-<empty>})" >&2; exit 1 ;;
    esac
    ;;
esac
echo "Cap: $CAP reviews (default 4 when unset)"

CAP counts reviews, not rounds — see "Cap and the loop invariant" below.

Phase 0 — Preflight

Runtime guard, one representative script (proves the whole bin/ PATH entry is present):

command -v swe-workbench-new-run-dir >/dev/null 2>&1 || {
  echo "swe-workbench runtime commands not on PATH — reinstall or update the swe-workbench plugin." >&2
  exit 1
}

Refuse on the default branch or a detached HEAD — the loop commits, so it needs a branch to commit onto:

BRANCH=$(git rev-parse --abbrev-ref HEAD)
DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
[ -n "$DEFAULT_BRANCH" ] || DEFAULT_BRANCH=main
if [ "$BRANCH" = "$DEFAULT_BRANCH" ] || [ "$BRANCH" = "HEAD" ]; then
  echo "converge: refusing to run on '$BRANCH' — check out a feature branch first." >&2
  exit 1
fi
BASE="$DEFAULT_BRANCH"
git fetch origin "$BASE" --quiet || true
if [ -z "$(git diff "origin/$BASE"...HEAD)" ]; then
  echo "converge: no diff between origin/$BASE and HEAD — nothing to converge." >&2
  exit 1
fi

Ownership gate — refuse, do not warn

The loop commits and pushes autonomously, so running it against a PR you don't own is a destructive-by-default hazard, not a style issue. This is a stronger gate than swe-workbench:workflow-address-feedback's owner check, which only shapes prompts.

Read the full file on GitHub · 483 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. 4d ago First seen · 483 lines · 62 tokens per session scan A 97ba7623fb8e

Subscribe to this mod's changes

converge is a command published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed 2d ago), licensed MIT. It adds 62 tokens to every session and 7,243 once invoked, about $0.0003 per session on Opus 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-31.