Async Context & Request Lifecycle Safety
Protect request lifecycles across async context propagation, replayable bodies, cancellation, transactions, OAuth refresh, half-closed connections, and completion races. This bundle repairs the boundaries where identity, ownership, and completion state can silently detach from the original request. Use it when requests cross tasks, retries, middleware, sockets, or token refresh and must remain traceable, bounded, and safe.
Works with every agent that reads SKILL.md — Claude Code, Cursor, Codex CLI, Gemini CLI, GitHub Copilot, Windsurf, OpenClaw, and more.
One payment, lifetime access. 8 skills unlock instantly in your library.
What's included
8 skillsRepair lost or stale async context, cross-request/tenant contamination, ThreadLocal leaks, detached task inheritance, and over-broad context propagation.
Repair consumed request-body reuse, empty retry uploads, stream pre-consumption, unsafe replay, and unlimited buffering across HTTP retries and redirects.
Repair double completion, duplicate callbacks, timeout/cancel races, stale retry callbacks, duplicate response writes, and cleanup running twice.
Repair TCP half-close bugs that truncate responses, destroy both directions on EOF, omit FIN propagation, or leave writers hanging.
Repair lost cancellation signals, orphaned async work, retry-after-cancel bugs, stale completions, and unclear request-vs-durable task lifetimes.
Repair transaction boundaries, rollback behavior, nested transaction drift, and unsafe external side effects without widening database locks.
Repair concurrent OAuth refresh races that invalidate credentials, overwrite newer tokens, or force users to reconnect.
Automatically add production-ready logging, metrics, health checks, and error monitoring to existing apps.
See it in action
Repair Async Context Leakage
Example session with this skill installed
Our Node/TypeScript SaaS uses AsyncLocalStorage for requestId, tenantId, userId, and traceId. A webhook handler schedules work with setImmediate, one helper caches the current context object in module scope, and a background email task is started with void sendEmail(). Under concurrency we occasionally see a log line with the correct requestId but the wrong tenantId. One detached task also keeps userId after the HTTP response is finished. Repair the repository with synthetic tenants and deterministic concurrency tests. Do not access production logs/data, change auth policy, or copy tokens into context.
- Read your context and instructions
- Compiled the repair async context
Async context leakage found. A module-level cached context can outlive its request, detached work inherits request identity, and logging can combine mismatched ownership paths. The repair removes global context reuse, makes durable metadata explicit, restores/clears context at owned boundaries, and adds deterministic cross-tenant concurrency tests. Production isolation remains unverified.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs these skills for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every skill in this bundle passes our trust checks.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back