Skip to content

Add reliable-agent-loops skill#285

Open
vikast908 wants to merge 1 commit into
addyosmani:mainfrom
vikast908:add-reliable-agent-loops-skill
Open

Add reliable-agent-loops skill#285
vikast908 wants to merge 1 commit into
addyosmani:mainfrom
vikast908:add-reliable-agent-loops-skill

Conversation

@vikast908

Copy link
Copy Markdown

What

A new reliable-agent-loops skill on building LLM agent loops that hold up in production.

Why

The collection already covers debugging, observability, and security, but not the agent loop itself. The three failures behind most agent-loop incidents aren't addressed anywhere in the repo: iteration that never terminates, tool errors that get swallowed, and side effects that run more than once (the classic double-charge after a retry).

What's in it

  • Bounding the loop with step and token/cost caps
  • Returning tool errors to the model as structured results instead of swallowing them
  • Idempotent retries (retry only retryable errors; idempotency keys on side effects)
  • Gating irreversible actions behind confirmation/allowlists
  • Resumable, checkpointed state so a crash doesn't replay completed side effects
  • Per-run tracing

Each step has BAD/GOOD code, and the skill closes with a Verification checklist.

Conventions followed

  • Standard anatomy: Overview, When to Use, Process, Common Rationalizations, Red Flags, Verification.
  • Frontmatter is name + description only; the description leads with what it does, then Use when triggers.
  • Single SKILL.md, no supporting files.
  • References security-and-hardening (tool authz, injection through tool output) and observability-and-instrumentation (logging/metrics) rather than duplicating them.

Related: I've opened a second PR adding evaluating-llm-output, the eval counterpart for catching silent regressions. Happy to adjust naming, scope, or split anything.

🤖 Generated with Claude Code

Covers the three failure modes that cause most agent-loop incidents in production: unbounded iteration, swallowed tool errors, and non-idempotent side effects. Adds loop bounding, structured error feedback, idempotent retries, gating of irreversible actions, resumable state, and per-run tracing, each with a Verification checklist.

Follows the standard skill anatomy and references security-and-hardening and observability-and-instrumentation instead of duplicating them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant