Repair Cancellation Propagation

    by Mariusz Wrzeszczynski

    1

    Repair lost cancellation signals, orphaned async work, retry-after-cancel bugs, stale completions, and unclear request-vs-durable task lifetimes.

    Secure checkout via Stripe

    0 installsSecurity scanned

    Works with the AI tools you already use

    CClaude CodeCCursorCCodex CLIGGitHub CopilotGGemini CLI+17 more

    See it in action

    You say

    Our Next.js/TypeScript API uses AbortController at the route layer, but the signal is not passed through the service to our fetch-based vendor client or Prisma wrapper. When a browser cancels a long export request, the vendor call and database aggregation continue for 20–40 seconds. Promise.all starts four child operations; if one fails, two others keep running. A retry helper can start another vendor request even after the route was cancelled. Repair cancellation propagation locally with deterministic tests. Do not call the live vendor, query production data, kill production jobs, or assume an already accepted vendor request was undone by local cancellation.

    Your agent does

    Cancellation propagation gaps found. The request AbortSignal is lost at service boundaries, vendor calls ignore it, sibling work can outlive failure, and retry may start after cancellation. The repair forwards cancellation through request-owned work, adds structured cleanup and retry suppression, protects durable handoff boundaries, and adds deterministic cancellation tests. Remote provider and production DB cancellation remain unverified.

    What you get

    Fix resource leaks by stopping abandoned database queries after client disconnect.Ensure sibling tasks in a group are cleaned up when one operation fails.Decouple durable background jobs from request-bound cancellation signals.Validate cleanup logic with deterministic tests instead of timing-based guesses.

    About this skill

    Cancellation bugs are lifecycle bugs. A browser disconnects, but the vendor call keeps running. One sibling task fails while others continue. A retry starts after the caller is gone. Or the opposite happens: a durable background job is incorrectly tied to request cancellation.

    Repair Cancellation Propagation gives an AI coding agent a repository workflow for mapping cancellation sources and lifetime domains, forwarding AbortSignals/tokens, repairing structured concurrency and cleanup, protecting durable handoff boundaries, separating timeout from cancellation, and building deterministic cancellation tests.

    It does not cancel production work, kill processes, call live dependencies, or assume local cancellation reverses a remote side effect.

    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

    Listedtoday

    Frequently Asked Questions

    Popular in Testing & QA