agentic-abstention

agentic-abstention is a skill for Claude Code, Codex from d-o-hub/github-template-ai-agents. It costs 59 tokens per session (1,099 once invoked), scanned A, original, MIT.

Rules for deciding when an agent should stop trying to act on a task that is blocked or making no progress. They define stopping conditions such as repeated empty results, unavailable resources, and several unsuccessful attempts.

In plain words
What is it for?
Handling missing files or services, repeated failed actions, empty tool responses, and deciding when to abstain instead of continuing.
Why use it?
They prevent wasted tool calls and make the agent clearly acknowledge when the environment cannot support further progress.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

Good fit Handling missing files or services, repeated failed actions, empty tool responses, and deciding when to abstain instead of continuing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/d-o-hub/github-template-ai-agents/agentic-abstention
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.

Any agent
npx skills add d-o-hub/github-template-ai-agents --skill agentic-abstention
Clone the repo
git clone --depth 1 https://github.com/d-o-hub/github-template-ai-agents

Made for: Claude Code, Codex.

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 agentic-abstention

README.md
[![agentmods](https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/agentic-abstention.svg)](https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/agentic-abstention)
Your own site
<a href="https://agentmods.dev/skills/d-o-hub/github-template-ai-agents/agentic-abstention"><img src="https://agentmods.dev/badge/skills/d-o-hub/github-template-ai-agents/agentic-abstention.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,099 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.00059 $0.01099
Opus 5 $0.00030 $0.00549
Sonnet 5 $0.00012 $0.00220
Haiku 4.5 $0.00006 $0.00110

Measured 7d ago against content hash acfed482bf69, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

agentic-abstention 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 7d 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/skills/agentic-abstention/SKILL.md · 134 lines

How it starts

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

Agentic Abstention

Decide when to stop acting instead of continuing tool calls on an infeasible task.

When to Use This Skill

  • Agent has made repeated tool calls with no progress
  • Task appears blocked by environment constraints
  • Resource errors indicate the goal is unreachable
  • Agent must decide between retrying and emitting ABSTAIN

Core Stopping Rules (CONVOLVE-derived)

Any single rule triggers mandatory abstention. All thresholds reference AGENTS.md named constants.

Rule 1: Empty-Result Repetition

Agent returns 2+ consecutive tool calls that yield identical empty or null results. A single empty result does NOT trigger abstention.

Check: result[N] == result[N-1] == empty (N ≥ 2)

Rule 2: Resource Unavailable

Target resource returns HTTP 404, connection refused, DNS resolution failure, or equivalent "does not exist" signal from the environment.

Check: Error code ∈ {404, 502, 503, ECONNREFUSED, ENOENT}

Rule 3: No-Progress Step Budget

Agent has taken ≥ DEFAULT_MAX_RETRIES (3) steps without measurable progress toward the goal. Progress is measured by state change in the task output.

Check: steps_since_last_progress ≥ DEFAULT_MAX_RETRIES

Rule 4: Infeasibility Signal

External system, user, or tool explicitly states the task cannot be completed (e.g., "not supported", "does not exist", "permission denied", "cannot be done").

Check: Output contains explicit infeasibility keyword

Rule 5: Timeout Budget Exceeded

Elapsed wall-clock time since task start exceeds DEFAULT_TIMEOUT_SECONDS (1800s). Agent must track start time at task initiation.

Check: now - task_start_time > DEFAULT_TIMEOUT_SECONDS

ABSTAIN Protocol

When any rule fires, emit the following and halt:

  1. Log: Record which rule triggered and relevant context

  2. Emit: Return structured ABSTAIN response:

    {
      "action": "ABSTAIN",
      "rule": "<rule-name>",
      "reason": "<brief explanation>",
      "steps_taken": <int>,
      "elapsed_seconds": <int>
    }
    

Read the full file on GitHub · 134 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 134 lines · 59 tokens per session scan A acfed482bf69

Subscribe to this mod's changes

agentic-abstention is a skill published in the GitHub repository d-o-hub/github-template-ai-agents (2 stars, last pushed today), licensed MIT. It adds 59 tokens to every session and 1,099 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.