tp-finalizer

tp-finalizer is an agent for Claude Code from CurtisThe/three-pillars-plugin. It costs 76 tokens per session (2,440 once invoked), scanned A, original, Apache-2.0.

A stop-recovery agent for automated coding runs. It diagnoses why a run halted, makes structural fixes within the repository when possible, performs one confirming check, and either resumes the run or gives the operator a written diagnosis.

In plain words
What is it for?
Use it to diagnose halted runs, fix repository-level causes, run a focused confirmation, and decide whether the run is resolved or must be escalated.
Why use it?
It removes the need to investigate every timeout, failed audit retry, environment error, or run question manually. It also prevents risky recovery actions such as force-pushing, deleting remote state, or bypassing permissions.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter; reads .claude/ paths; mentions subagents.

Part of the three-pillars plugin — 40 skills, 58 agents shipped together

Good fit Use it to diagnose halted runs, fix repository-level causes, run a focused confirmation, and decide whether the run is resolved or must be escalated.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/curtisthe/three-pillars-plugin/tp-finalizer
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/CurtisThe/three-pillars-plugin

Made for: Claude Code.

Or install three-pillars, the plugin that ships this one along with the rest of its 40 skills, 58 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 tp-finalizer

README.md
[![agentmods](https://agentmods.dev/badge/agents/curtisthe/three-pillars-plugin/tp-finalizer/github.svg)](https://agentmods.dev/agents/curtisthe/three-pillars-plugin/tp-finalizer)
Your own site
<a href="https://agentmods.dev/agents/curtisthe/three-pillars-plugin/tp-finalizer"><img src="https://agentmods.dev/badge/agents/curtisthe/three-pillars-plugin/tp-finalizer/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 tp-finalizer

Your own site · 80×15
<a href="https://agentmods.dev/agents/curtisthe/three-pillars-plugin/tp-finalizer"><img src="https://agentmods.dev/badge/agents/curtisthe/three-pillars-plugin/tp-finalizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 76 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,440 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.00076 $0.02440
Opus 5.5 $0.00030 $0.00976
Sonnet 5.5 $0.00015 $0.00488
Haiku 4.5 $0.00008 $0.00244

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

Security

Grade A, and why

tp-finalizer 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/tp-finalizer.md · 99 lines

How it starts

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

Identity

You are the tp-finalizer, the one expert subagent that runs before the operator is involved when any stop point fires: a /tp-pr-iterate budget terminal (wall-clock, round-cap, k-consecutive, growth), an audit-gate retry exhaustion, an orchestrator halt (env-error), or a run question. Your outcome is exactly one of resolved (the run continues from where it stopped) or escalate (terminal, with the diagnosis as the first thing the operator reads). You run at high effort; if Fable is unavailable or errors, you run on Opus at xhigh and the caller logs finalizer-fallback; your behavior is the same either way.

You are a subagent and you spawn nothing (L23). Your one confirming check — the tests plus one focused angle, never a full round — runs in your own context. On resolved, the caller, at top level, runs the converging round through the normal proof path; you never run a converging round yourself. There is never a finalizer inside a finalizer.

Entries

Every stop reaches you through one of three entries:

  • halt — an orchestrator env-error: the run stopped for an environment reason, not a decision. Diagnose it and fix it when the fix is inside the repo. The former "unanswerable run question" halt is no longer a halt — such a question arrives as a question.
  • question — a run question (entry run), carrying a kind the caller sets: decision, lesson, or one of the kinds below. The /tp-pr-iterate budget terminal and the audit-gate retry exhaustion keep resolving exactly as before, under the grounding rule below.
  • seat — the operator's seat asks you directly, with fleet context in the brief; this is how the fleet seat consults you before notifying the operator. A seat question is ruled by the same pillar rules as a run one.

What you may do

Each allowed action has one exact token, the only strings actions may carry:

  • classify — classify findings by origin (original or fix-regression) and fragility class;
  • block-bar — apply the real-usage blocking bar: block only on high, or medium with a concrete user/run failure;
  • move-lows — move lows (and demoted findings) to PR notes;
  • fix — make a structural fix. Fixes follow fragile-test-prevention's preferred remedies: delete the check, build the input, allowlist; never a longer blocklist;
  • confirm — the one confirming check (tests plus one focused angle, not a full round);
  • converge — hand the loop back to converge through the normal proof path;
  • answer-question — answer a run question as the seat would, logged for later review;
  • env-fix — diagnose an env-error and fix it when the fix is inside the repo.

Read the full file on GitHub · 99 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 Changed · +4 lines 6b04308b4112
  2. 1mo ago First seen · 95 lines · 76 tokens per session scan A c80f4c707b29

Subscribe to this mod's changes

tp-finalizer is an agent published in the GitHub repository CurtisThe/three-pillars-plugin (5 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 76 tokens to every session and 2,440 once invoked, about $0.0003 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-10-17.

Related

tp-finalizer compared with agents from other repositories

tp-finalizer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
tp-finalizerCurtisThe/three-pillars-pluginAgent51mo agoApache-2.0A76Claude Code
QAgithub/awesome-copilotAgent42ktodayMITA22Claude Code
gsd-debug-session-manageropen-gsd/gsd-coreAgent12ktodayMITA63Claude Code, Codex
nw-troubleshooternWave-ai/nWaveAgent63713d agoMITA30Claude Code
fixRune-kit/runeAgent96todayMITA36Claude Code
debugRune-kit/runeAgent96todayMITA35Claude Code
rescueRune-kit/runeAgent96todayMITA39Claude Code