- Home
- Skills
- Agents & Orchestration
- Repair Double Completion Races
Works with the AI Agents you already use
Repair Double Completion Races
Repair double completion, duplicate callbacks, timeout/cancel races, stale retry callbacks, duplicate response writes, and cleanup running twice.
$1
Repair Double Completion Races
Example session with this skill installed
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.
- Read your context and instructions
- Compiled the repair double completion
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.
Connects securely to your tools. The creator never sees your data.
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.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.
Cannot determine remote side-effect outcome after timeout/cancellation, choose business retry policy, prove all possible production schedules, or make third-party callbacks cancellable if the library does not support it.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 months ago
Permissions
Run on a clean branch with fake clocks, deterministic barriers, fake callbacks, and local fixtures. Keep production endpoints, credentials, and real side effects out of scope.