systemic-patterns

A catalogue of recurring Untether problems, their identifying log messages, and the recommended response to each pattern.

In plain words
What is it for?
Use it before escalating an error, especially when investigating repeated subprocess failures, retries, or resource leaks.
Why use it?
It helps distinguish real bugs from expected behaviour, previously fixed regressions, and problems the system already handles.

Command for Claude Code

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/littlebearapps/untether/systemic-patterns
Clone the repo
git clone --depth 1 https://github.com/littlebearapps/untether

Made for: Claude Code.

Per session 0 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,527 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00000 $0.02527
Opus 5 $0.00000 $0.01264
Sonnet 5 $0.00000 $0.00505
Haiku 4.5 $0.00000 $0.00253

Measured yesterday against content hash 1c8f966398f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

systemic-patterns scanned grade A with 1 finding 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 yesterday.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **Sig**: subsequent Claude runs fail to spawn; `subprocess.create.failed` with FD-exhaustion-like errors; `lsof` shows growing FD count
.claude/commands/debug/systemic-patterns.md · 158 lines

How it starts

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

Step 4 — Cross-reference systemic patterns

This is the canonical catalogue of known Untether systemic patterns. Walk this list before scoring any signal or escalating any "error" to a bug.

For each pattern:

  • Sig = grep signature in journalctl / chat
  • Class = primary Step-1 class
  • Canonical issue = the open or closed GH issue (if any) tracking the pattern
  • Posture = bug (fix needed), by-design (do NOT escalate), regression-watch (was fixed, watch for relapse), rate-limited (real but expected at low frequency), mitigation-exists (Untether already mitigates this engine quirk)

The pattern catalogue

1. Auto-continue death spiral on signal exits

  • Sig: rapid auto_continue followed by proc_returncode=143 or 137, repeating
  • Class: auto-continue
  • Canonical issue: mitigation via _is_signal_death() in runner_bridge.py; configurable [auto_continue].max_retries
  • Posture: regression-watch — signal-death suppression should kick in. If you see >1 retry on signal death, that's a bug.

2. PTY master_fd leak across runs

  • Sig: subsequent Claude runs fail to spawn; subprocess.create.failed with FD-exhaustion-like errors; lsof shows growing FD count
  • Class: control-channel
  • Canonical issue: per control-channel.md §PTY lifecycle — finally must close master_fd
  • Posture: regression-watch — every Claude runner exit path must close master_fd.

3. callback_data > 64 bytes silently dropped

  • Sig: button click does nothing; no callback_query in journalctl; outbound message had a button with long callback_data
  • Class: telegram-transport
  • Posture: bug if surfaced — Telegram enforces 64 bytes silently. Always check callback_data length at construction.

4. Hot-reload race during active run

  • Sig: config.reload event during an active session; subsequent events use stale config
  • Class: config-hot-reload
  • Canonical: telegram-transport.md §TelegramBridgeConfig hot-reload; update_from() must copy all fields atomically
  • Posture: regression-watch — new fields added to TelegramBridgeConfig must be added to update_from().

Read the full file on GitHub · 158 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. yesterday First seen · 158 lines · 0 tokens per session scan A 1c8f966398f4

Subscribe to this mod's changes

systemic-patterns is a command published in the GitHub repository littlebearapps/untether (66 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,527 tokens. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.