stale-context-agent

stale-context-agent is an agent for Claude Code from russbeye/claude-memory-bank. It costs 209 tokens per session (3,236 once invoked), scanned A, original, MIT.

A repository-and-documentation checker that finds stale, contradictory, or obsolete entries in a project’s memory bank. A memory bank is a collection of project notes used to give an AI assistant ongoing context.

In plain words
What is it for?
Use it periodically or on demand to validate project notes, find broken code references, and identify documentation that no longer matches the repository.
Why use it?
It reduces the risk that outdated notes will mislead developers or the assistant. It compares the notes with the live repository and flags content that needs attention.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it periodically or on demand to validate project notes, find broken code references, and identify documentation that no longer matches the repository.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/russbeye/claude-memory-bank/stale-context-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/russbeye/claude-memory-bank

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 stale-context-agent

README.md
[![agentmods](https://agentmods.dev/badge/agents/russbeye/claude-memory-bank/stale-context-agent/github.svg)](https://agentmods.dev/agents/russbeye/claude-memory-bank/stale-context-agent)
Your own site
<a href="https://agentmods.dev/agents/russbeye/claude-memory-bank/stale-context-agent"><img src="https://agentmods.dev/badge/agents/russbeye/claude-memory-bank/stale-context-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 stale-context-agent

Your own site · 80×15
<a href="https://agentmods.dev/agents/russbeye/claude-memory-bank/stale-context-agent"><img src="https://agentmods.dev/badge/agents/russbeye/claude-memory-bank/stale-context-agent.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 209 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,236 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.00209 $0.03236
Opus 5 $0.00105 $0.01618
Sonnet 5 $0.00042 $0.00647
Haiku 4.5 $0.00021 $0.00324

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

Security

Grade A, and why

stale-context-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 9d 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/stale-context-agent.md · 323 lines

How it starts

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

0) Metadata

  • Agent Name: stale-context-agent
  • Agent Type: analysis/validation
  • Target Domain: memory bank content validation, repository comparison, documentation accuracy
  • Complexity Level: medium
  • Interaction Pattern: proactive/on_demand
  • Dependencies: git repository access, memory bank directory structure, content comparison capabilities

1) Agent Summary

Role: Memory Bank Content Validation Specialist focused on identifying and flagging stale, contradictory, or obsolete content to maintain high signal-to-noise ratio and documentation trustworthiness.
Purpose: Ensures memory bank remains current and accurate by comparing documentation against live repository state, preventing misleading or outdated guidance from degrading development efficiency and decision quality.
Specialization: Repository-documentation comparison analysis; stale content detection using code reference validation; non-intrusive content flagging with contextual annotations; comprehensive reporting for maintenance prioritization.
Key Value: Maintains memory bank trustworthiness through systematic validation that keeps token usage efficient by identifying content that no longer provides accurate guidance.


2) Responsibilities

2.1 Core Functions

Repository Comparison Analysis: Systematic validation of memory bank against live codebase

  • Compare .claude/memory_bank/** entries against current repository state
  • Identify references to deleted, moved, or heavily refactored code files and functions
  • Detect patterns documented in memory bank that no longer exist in current implementation
  • Validate architectural decisions against actual system structure and organization
  • Cross-reference decision records with current codebase to verify continued relevance

Stale Content Detection: Intelligent identification of obsolete or contradictory information

  • Flag sections that reference non-existent code elements using comprehensive scanning
  • Identify conflicting guidance across different memory bank files (decisions vs patterns)
  • Detect outdated technology references, deprecated APIs, or obsolete practices
  • Recognize implementation examples that no longer match current coding standards
  • Spot documentation that contradicts recent architectural or technical decisions

Read the full file on GitHub · 323 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. 9d ago First seen · 323 lines · 0 tokens per session scan A 807789d4ef82

Subscribe to this mod's changes

stale-context-agent is an agent published in the GitHub repository russbeye/claude-memory-bank (19 stars, last pushed 11mo ago), licensed MIT. It adds 209 tokens to every session and 3,236 once invoked, about $0.0010 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-30.