Race Condition
A defect whose occurrence depends on the relative timing of concurrent operations.
A race condition occurs when the correctness of a result depends on the order in which concurrent operations happen to complete. Races are the archetypal intermittent bug: they reproduce on slow machines and vanish on fast ones, or the reverse. They are also the classic Heisenbug, since a print statement or a breakpoint shifts the timing enough to close the window the fault needed, and the bug disappears exactly when someone looks at it.
The web platform generates a particular family of them. A build tool's dependency scan finishing mid-run triggers a page reload that aborts whatever was in flight — so a random file fails, never the same one twice, and never on a fast local machine that wins the race every time. A resize observer's first callback lands a frame or two after mount, too late to prevent a visible jump and early enough to fight a user who has already scrolled. A framework re-rendering a subtree that a browser mutated directly diffs against a stale model.
Concurrent processes race in the same way over shared resources: two test runs in one working copy destroying each other's temporary files, two workers deriving the same port, two agents editing one directory.
The general remedies are to remove the shared resource (separate working copies, unique filenames), to make the ordering explicit (wait on an observable condition, not a duration), or to make the operation idempotent so order stops mattering. See Idempotence.
See also7
Flaky Test
A test that passes and fails on identical input, and the most corrosive thing a suite can contain.
Testing & Verification17 connections
Multi-Agent Orchestration
Coordinating several model instances on one body of work, each with its own context.
Agents & Language Models10 connections
Git Worktree
An additional working directory attached to one repository, each on its own branch.
Version Control & Delivery10 connections
Determinism
The property that identical inputs produce identical outputs, and the foundation of caching and verification.
Systems & Tooling56 connections
Bundler
The tool that resolves an application's modules into the files a browser downloads.
Web Platform12 connections
Reproducible Case
The smallest set of steps that reliably produces a fault, and the unit of real debugging.
Method25 connections
Fan-Out and Fan-In
Splitting work across parallel workers and recombining their results.
Agents & Language Models9 connections
Related2
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from20
- Actor ModelComputation & Algorithms
A concurrency model where isolated actors communicate only by asynchronous message, never by shared memory.
- Battle RoyalePlay & Games
A many-player elimination format that uses a shrinking play area to force an ending the players would otherwise avoid.
- BundlerWeb Platform
The tool that resolves an application's modules into the files a browser downloads.
- Circuit BreakerNetworks & Distribution
A circuit breaker stops calling a failing dependency, converting slow repeated failures into a fast, cheap one.
- Concurrency and ParallelismComputation & Algorithms
Concurrency is structuring independent tasks together; parallelism is actually running them at the same instant.
- Event LoopComputation & Algorithms
A single-threaded runtime's mechanism for pulling the next callback off a queue once the call stack is empty.
- Fan-Out and Fan-InAgents & Language Models
Splitting work across parallel workers and recombining their results.
- Flaky TestTesting & Verification
A test that passes and fails on identical input, and the most corrosive thing a suite can contain.
- Git WorktreeVersion Control & Delivery
An additional working directory attached to one repository, each on its own branch.
- HeisenbugTesting & Verification
A fault that changes or disappears when someone tries to observe it.
- IdempotenceSystems & Tooling
The property that performing an operation twice has the same effect as performing it once.
- Immersive SimPlay & Games
A design tradition that simulates consistent rules rather than scripting outcomes, so solutions the designer never planned still work.
- ImmutabilityComputation & Algorithms
A value that cannot change after construction, so sharing it never risks a caller seeing another caller's edit.
- Multi-Agent OrchestrationAgents & Language Models
Coordinating several model instances on one body of work, each with its own context.
- Optimistic LockingData & Content
Letting concurrent writers proceed unchecked and catching conflicts only at commit time, betting that collisions are rare.
- Pessimistic LockingData & Content
Blocking every other writer up front for the duration of a transaction, betting that collisions are common enough to prevent rather than clean up.
- Reproducible CaseMethod
The smallest set of steps that reliably produces a fault, and the unit of real debugging.
- SubagentAgents & Language Models
A model instance spawned by another to handle a scoped task with its own context.
- Token BudgetAgents & Language Models
The finite allowance of model usage a task may consume, and the design decisions it forces.
- WebhookNetworks & Distribution
A webhook is an HTTP callback a service pushes to you when an event happens, inverting who initiates the request.