agent-harness-fault-injection
Was er macht
Dieses Tool hilft dir zu testen, wie ein KI-Programm mit Fehlern umgeht. Es simuliert gezielt Fehler in bestimmten Teilen des Programms, um zu prüfen, ob es sich korrekt erholt und keine wichtigen Informationen verliert.
Wann du ihn nutzt
- ✓Wenn du dem Programm eine neue Möglichkeit zur Fehlerbehandlung hinzufügst.
- ✓Wenn Teile des Programms (etwa Tools oder Speicher) ausfallen könnten.
- ✓Bevor du eine Funktion zur Fehlerbehandlung öffentlich veröffentlichst.
Link zum Skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/agent-harness-fault-injection/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Teste die Fehlerbehandlung, indem du einen Timeout-Fehler im Suchtool simulierst.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Du legst einen konkreten Fehlerplan fest, und das Tool simuliert diese Fehler in einer kontrollierten Umgebung. Danach prüft es, ob sich das Programm wie erwartet verhalten hat.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Agent Harness Fault Injection
Overview
Use a deterministic, non-production fault schedule to test whether an agent workflow preserves state, budgets, safety boundaries, and evidence when a dependency fails. The output is a small fault matrix, an event timeline, and a verdict that distinguishes recovered, contained, unrecoverable, and inconclusive runs.
When to Use This Skill
- Use when a multi-step agent, state machine, loop, or multi-agent workflow has a new recovery path.
- Use when sandbox execution, an MCP/tool call, a worker, a checkpoint store, or memory can time out or disappear.
- Use before claiming retry, resume, deadline, isolation, or partial-failure behavior is production-ready.
- Use when a regression needs reproducible failure evidence instead of a random chaos run.
Do not use this skill against a production target, real user data, live credentials, or an unbounded external service. Convert those cases to a local simulator or an authorized staging harness first.
Safety and Boundary Preconditions
- Freeze the workflow revision, model/prompt configuration, tool schemas, seed, input fixture, timeout, retry budget, deadline, and expected terminal states.
- Run in a disposable sandbox with synthetic inputs and stubbed tools. Keep network disabled unless the test explicitly needs a local test server.
- Make every injected failure an in-memory or fixture-controlled event. Never delete real data, revoke real credentials, kill an unrelated process, or mutate a live service to create a failure.
- Record the test scope and a run identifier before starting. A missing scope,
fixture, or recovery contract makes the verdict
inconclusive.
Recovery Contract
Write the invariant before injecting a fault. A useful contract names the state that must survive and the side effects that must not repeat:
After recovery, resume from the latest durable checkpoint, preserve the task
identity and safety policy, spend no more than the remaining retry/deadline
budget, and commit each externally visible effect at most once.
Model the workflow with explicit states. For example:
created -> running -> checkpointed -> waiting_for_tool
| |
v v
failed <--------- recovering -> resumed -> completed
For each transition, define the owner, durable fields, allowed retry count, and terminal behavior. In-memory values are not checkpoints unless the harness proves they survive the simulated restart.
Fault Matrix
Select the smallest set of faults that covers the new recovery logic. Do not randomize the schedule until a deterministic schedule has passed.
| Fault | Injection boundary | Required observation | Expected containment |
|---|---|---|---|
| sandbox denial | before a tool starts | no unsafe side effect; reason is retained | retry only when policy allows |
| MCP/tool timeout | after request id is assigned | timeout is attributed to that request | bounded retry with same idempotency key |
| worker restart | after checkpoint write | worker reloads the same task version | resume from latest checkpoint |
| missing/stale checkpoint | before resume | stale data is rejected or marked | stop safely; never invent progress |
| parallel branch failure | one branch after fan-out | sibling status is preserved | join policy decides retry, degrade, or stop |
| memory loss | clear ephemeral context | durable facts are reconstructed | ask or stop when required facts are absent |
| retry/deadline exhaustion | on the final attempt | no extra call is scheduled | terminal failed or timed_out |
Deterministic Injection Schedule
Use event numbers rather than wall-clock randomness. A schedule should be portable across harnesses:
{
"seed": "harness-fixture-07",
"faults": [
{"event": "tool.call", "ordinal": 2, "kind": "timeout", "tool": "search"},
{"event": "worker.start", "ordinal": 2, "kind": "restart"},
{"event": "branch.join", "ordinal": 1, "kind": "partial_failure", "branch": "summarize"}
]
}
The harness should emit the schedule, not merely the seed. Keep fault identity separate from the observed error so a wrapper cannot accidentally turn a timeout into a generic failure. Run the same schedule twice and compare the normalized timeline before trying a different schedule.
Recovery Rules by Boundary
Sandbox and MCP/tool failures
…
Häufige Fragen
Was ist ein „simulierter Fehler“?
Das ist ein absichtlich erzeugter Fehler, mit dem das Tool die Widerstandsfähigkeit des Programms testet, zum Beispiel wenn ein Tool ausfällt oder Speicherinhalte verloren gehen.
Kann ich das bei Programmen im echten Einsatz nutzen?
Nein. Das Tool ist nur für Tests in sicheren, kontrollierten Umgebungen gedacht, niemals mit echten Daten oder im Produktivbetrieb.
Was bedeutet „deterministische Wiederherstellung“?
Das bedeutet, dass Fehler und Wiederherstellung immer auf die gleiche Weise ablaufen. So lassen sich Tests wiederholen und die Ergebnisse verlässlich vergleichen.
Details
Originalbeschreibung des Autors
Use when an agent workflow needs deterministic recovery evidence for sandbox, MCP/tool, worker, checkpoint, memory, or orchestration failures.
Beliebtheit
- GitHub-Sterne
- 48k
- Platz im Ranking
- #3659
- Lizenz
- MIT
- Aktualisiert
- 15.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
00-andruia-consultant
48kHilft deinem Agenten, KI-Projekte zu starten oder zu verbessern. Er analysiert Code, schlägt Tools vor und erstellt Aktionspläne auf Spanisch.
007
48kLässt deinen Agenten Sicherheitsaudits und Bedrohungsmodellierung durchführen. Nützlich, um Projekte vor Angriffen und Schwachstellen zu schützen.
10-andruia-skill-smith
48kHilft deinem Agenten, KI-Tools zu erstellen oder zu verbessern. Er legt fest, wie Tools funktionieren, schreibt die Dokumentation und prüft die Struktur.
20-andruia-niche-intelligence
48kLässt deinen Agenten eine Branchenzusammenfassung erstellen. Nützlich, um Kontext, Regeln, Nutzungsmuster und Risiken anhand verlässlicher Quellen zu verstehen.
Ähnliche Skills
add-model-provider
394kLässt deinen Agenten einen neuen KI-Modellanbieter mit sicheren Befehlen an OpenClaw anbinden, API-Schlüssel nicht im Klartext speichern und einen Live-Test starten.
acp-router
394kHilft deinem Agenten, eine Aufgabe über OpenClaw an einen Coding-Assistenten wie Claude Code oder Cursor zu senden, damit die Arbeit in diesem Tool läuft.
browser-automation
394kBringt deinem Agenten bei, Webseiten Schritt für Schritt zu steuern, einschließlich Anmeldungen, Tabs und Wiederherstellung, wenn eine Seite nicht mehr reagiert.