Repair Double Completion Races
Repair double completion, duplicate callbacks, timeout/cancel races, stale retry callbacks, duplicate response writes, and cleanup running twice.
Secure checkout via Stripe
Works with the AI tools you already use
See it in action
You say
Our Node/TypeScript payment-status wrapper converts a callback SDK into a Promise. We start a timeout timer, register an AbortSignal listener, and call the SDK. If the timeout fires first we reject and release a semaphore permit, but the SDK callback can arrive later and release the permit again. In one path the callback also invokes an onComplete hook after the timeout. Repair locally with fake clocks and deterministic callback barriers. Do not call production, change payment semantics, or assume a timeout means the partner did not process the request.
Your agent does
Double-completion race found. Timeout, abort, and SDK callback can all settle one operation and release the same semaphore. The repair centralizes terminal ownership, makes cleanup exactly-once locally, fences late callbacks, and preserves unknown external outcome after timeout.
What you get
About this skill
Async operations often have several ways to finish: callback, timeout, cancellation, socket close, retry completion, or response commit. Without one terminal owner, two paths can settle the same promise/future, invoke user callbacks twice, release resources twice, or let an old retry attempt complete newer work.
Repair Double Completion Races maps every completion source, introduces a single terminal state transition and generation fencing, makes late completions observable and side-effect-free, and proves the repair with deterministic fake-clock/barrier tests.
It does not alter business retry semantics or pretend timeout/cancellation proves an external operation did not happen.
How to install
Drop the file into your AI Agent. Works with Claude, Cursor, ChatGPT, and 20+ more.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
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
Trust & safety
Security scanned
Verified clean today
- 30-day refund guarantee
- One-time purchase, yours forever
- Secure checkout via Stripe
Frequently Asked Questions
Popular in AI Agents & LLM Ops
agentic-workflow
A risk-aware, evidence-based engineering lifecycle protocol for robust agentic task execution and safety.
designing-hybrid-context-layers
Architects the right retrieval strategy for every query — teaching your agent when to use RAG, a knowledge graph, or a temporal index instead of defaulting to vector search for everything.
Open Browser Use
Automate real Chrome profiles with a professional CLI, SDK, and MCP-ready automation stack for AI agents.

prompt-engineer
Professional prompt engineering patterns for building robust, secure, and production-ready LLM applications.