async-lifecycle-race

async-lifecycle-race is a skill for Claude Code from CrumbtrailDev/crumbtrail-cli. It costs 0 tokens per session (1,946 once invoked), scanned A, original, MIT.

A guide for finding timing bugs where two operations happen in an unexpected order. It covers failures that appear only sometimes, such as an old response replacing newer data.

In plain words
What is it for?
Use it to investigate intermittent failures involving slow requests, repeated actions, navigation, cancellation, or changing data.
Why use it?
It helps explain bugs that are difficult to reproduce because identical steps can produce different results. It focuses attention on the order of events and the evidence needed to verify a fix.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the crumbtrail-skills plugin — 13 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/crumbtraildev/crumbtrail-cli/async-lifecycle-race
Any agent
npx skills add CrumbtrailDev/crumbtrail-cli --skill async-lifecycle-race
Clone the repo
git clone --depth 1 https://github.com/CrumbtrailDev/crumbtrail-cli

Made for: Claude Code.

Or install crumbtrail-skills, the plugin that ships this one along with the rest of its 13 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for async-lifecycle-race

README.md
[![agentmods](https://agentmods.dev/badge/skills/crumbtraildev/crumbtrail-cli/async-lifecycle-race.svg)](https://agentmods.dev/skills/crumbtraildev/crumbtrail-cli/async-lifecycle-race)
Your own site
<a href="https://agentmods.dev/skills/crumbtraildev/crumbtrail-cli/async-lifecycle-race"><img src="https://agentmods.dev/badge/skills/crumbtraildev/crumbtrail-cli/async-lifecycle-race.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,946 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01946
Opus 5 $0.00000 $0.00973
Sonnet 5 $0.00000 $0.00389
Haiku 4.5 $0.00000 $0.00195

Measured 5d ago against content hash 7cade1593b33, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

async-lifecycle-race scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/crumbtrail-skills/skills/async-lifecycle-race/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The async lifecycle race

Two things happen concurrently and the code assumed an order. A response arrives after the view that requested it was torn down. A slower first request lands after a faster second one and overwrites it. A position is read after the model it indexed into shrank. A cancelled query nulls a slot that something else is still reading.

The defining property is that the inputs are identical and the outcome is not. That is also what makes it the archetype most often closed as unreproducible, and the one where a recording is worth the most, because the recording holds the ordering that the reporter could not describe.

Guard fixes for this family have a habit of creating the next one. A teardown check added to stop a crash frequently produces a different null dereference a release later, so treat a fix here as something to verify against a fresh recording rather than something to reason about.

Symptom

Intermittent. The reporter says it works most of the time, or it broke once and they cannot make it happen again, or it only happens when the network is slow, or only when they click twice, or only when they navigate away quickly.

The visible failure is usually one of: a null or undefined dereference in a stack that mentions a callback or a promise handler, a value that appears and then reverts, a spinner that never resolves, or a duplicate of something that should have happened once.

What Crumbtrail can see

The limitation first. There is no framework lifecycle instrumentation. Crumbtrail does not record component mount or unmount, effect teardown, promise identity, subscription disposal, or which await resumed after which. If your hypothesis is "the component unmounted mid flight", the recording cannot confirm the unmount. It can confirm the flight and the navigation, and that is usually enough.

What it does carry, and this archetype lives almost entirely on it:

  • Every request with a start record and an end record, carrying method, URL, status and a duration in milliseconds. Two overlapping requests to the same endpoint, and which one finished last, are both plainly visible.
  • Unhandled rejections and uncaught errors with the message and the full stack, which usually names the callback that ran too late.
  • Navigation events with their transition, and page visibility changes.
  • Clicks and inputs with timestamps, so a double submit is countable rather than inferred.
  • Backend request start, end and error records with durations, where the backend SDK is installed.
  • Row changes carrying the request id that produced them, where the database adapter is installed, which is what lets you say two requests wrote the same row and in which order.

Read the full file on GitHub · 185 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 185 lines · 0 tokens per session scan A 7cade1593b33

Subscribe to this mod's changes

async-lifecycle-race is a skill published in the GitHub repository CrumbtrailDev/crumbtrail-cli (0 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,946 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

codegraph

Analyze indexed codebases via graph database (neug) and vector index (zvec). Covers call graphs, dependencies, dead code, hotspots, module coupling, architecture reports, semantic search, impact analysis, bug root cause from GitHub issues, class diagrams (UML), and PR review (risk scoring, conflict detection…

QwenLM/qwen-code · 0 tokens

stuck

Diagnose frozen, stuck, or slow Qwen Code sessions on this machine. Scans for problematic processes, high CPU/memory usage, hung subprocesses, and debug logs. Use /stuck or /stuck to focus on a specific process.

QwenLM/qwen-code · 57 tokens

structured-debugging

Hypothesis-driven debugging methodology for hard bugs. Use this skill whenever you're investigating non-trivial bugs, unexpected behavior, flaky tests, or tracing issues through complex systems. Activate proactively when debugging requires more than a quick glance — especially when the first attempt at a fix didn't…

QwenLM/qwen-code · 85 tokens

memory-leak-debug

Diagnose memory leaks in the Qwen Code CLI using heap snapshots and the chrome-devtools CLI. Use when investigating high memory usage, unbounded growth, or suspected object retention issues.

QwenLM/qwen-code · 42 tokens

bugfix

Fix a bug from a GitHub issue, following the reproduce-first workflow. Use when the user asks to fix a bug, investigate a GitHub issue, or debug a user-reported problem. Takes a GitHub issue URL or number as input.

QwenLM/qwen-code · 53 tokens

rust-check

Run cargo check on the current Rust project to find compile errors.

Hmbown/CodeWhale · 15 tokens