Introducing TanStack Oracles TanStack released an early preview of TanStack Oracles, a framework that lets developers define how software should behave and tests real implementations against those requirements, with coding agents used to find bugs. TanStack creator Kyle Mathews said he tested Oracles on more than 100 repositories, including many of the most-downloaded npm packages, and it found bugs in every one. The framework grew out of work to bring TanStack DB to 1.0 RC1, and Mathews argues verification is becoming the bottleneck as coding agents make implementation cheaper. Introducing TanStack Oracles I'm excited to share an early preview of TanStack Oracles , a framework that helps developers define how software should behave and tests real implementations against those requirements. It helps coding agents find bugs, compare implementations with independent models, and improve the checks as you learn more about your code. Oracles grew out of how hard it was to get TanStack DB to 1.0 RC1 https://tanstack.com/blog/tanstack-db-1.0-rc1-going-all-in-on-oracles . I needed better ways to find bugs and preserve the behavior I wanted as the implementation changed. The challenge extends beyond DB. We want TanStack's libraries to be as correct, capable, and sophisticated as possible. Better verification lets us pursue designs and optimizations that previously cost too much to implement and validate. I've now tested Oracles on more than 100 repositories—including many of the most-downloaded https://github.com/isaacs/node-lru-cache/issues/427 packages on npm https://github.com/immerjs/immer/issues/1367 —and it found bugs in every one. It's especially fun to run it against old projects I wrote by hand https://github.com/KyleAMathews/react-headroom/pull/215 and see the absurd number of bugs it digs up https://github.com/KyleAMathews/react-spinkit/pull/103 . Try it in your repository try-it-in-your-repository Before reading further, open a coding agent in a project you know well and paste in the prompt below https://github.com/TanStack/oracles/blob/main/packages/oracles/README.md . See what bugs Oracles can find—and what it feels like to approach your code differently: start with a behavior the software should preserve, then see whether your agent can find a case where the implementation breaks it. Show me what oracle testing with @tanstack/oracles can find in this repository. Download https://raw.githubusercontent.com/TanStack/oracles/main/packages/oracles/skills/oracles-explore/SKILL.md Read it in full and follow it to explore this repository with Oracles. Your agent will read your code, documentation, and tests, exercise the code, and help you choose one behavior to check. You'll work out what should happen, then compare that expectation with what the code does. If the intended behavior is unclear, the agent asks you to clarify. Sometimes this exploration finds a problem before the oracle exists. The oracle then reproduces it and checks the broader behavior you want to preserve. You can turn a finding into a fix and a regression test in your existing suite, or keep the oracle and expand it as it proves useful. You can leave the agent exploring while you read on. The verification problem the-verification-problem As coding agents get better, we're running into a new problem: they can produce far more code than we can comfortably review. PRs pile up. How do we know these changes are correct? How do we know they actually do what we wanted? We can't keep scaling line-by-line human review to match what agents can generate. The economics of programming are changing. Writing implementations used to consume a huge share of our engineering effort. We invested in tests and review, of course, but implementation itself was expensive. Agents are making it dramatically cheaper. Verification is becoming the bottleneck. Since publishing my post about using Oracles to harden TanStack DB https://tanstack.com/blog/tanstack-db-1.0-rc1-going-all-in-on-oracles , I've heard from lots of people exploring how to improve verification. Anthropic has been using agents to formally verify properties of real software https://www.anthropic.com/research/formal-verification , and Microsoft Research is exploring formal verification of agent-written applications https://www.microsoft.com/en-us/research/blog/formally-verifying-agent-written-full-stack-web-apps-with-pdd-kit/ . There are different approaches, but we're increasingly running into the same question: How do we turn human judgment about what software should do into something agents can act on and tools can enforce? Getting this right could automate much of the behavioral correctness work in code review. Agents could work more independently, leaving us more time for deciding what software should do, exploring designs, and making tradeoffs. I think figuring all of this out will be a multi-year effort across the industry. But the starting point can be remarkably simple: one rule about how software should behave, and a way to test it. A simple rule exposes a real bug a-simple-rule-exposes-a-real-bug Here's a bug from Headroom, my scrolling-header library. With its default settings, the rule was simple: the wrapper must track the header's height, even as its contents change. In Oracles, I record a rule like this as a law : a statement of expected behavior independent of how the code works. To test this rule, Oracles generated sequences of changes to the header, varying its content and size, and checked the layout after each change. One sequence exposed a bug in an earlier version of Headroom: when the header grew, its wrapper still reserved space for the old height. The header covered the content below it. The fix was to keep the reserved space in sync with the header's actual height. That's the basic idea behind Oracles. It combines property-based testing, model-based testing, fuzzing, and mutation testing into a framework that agents can use to discover and enforce behavioral requirements. Rather than writing out every example and its expected answer, I can describe the behavior I want and let the framework explore sequences I wouldn't have thought to test individually. A layout rule like Headroom's can be checked directly: measure the header and compare it with the space its wrapper reserves. But what if determining the correct result requires calculating the effects of many interacting changes? One history, two answers one-history-two-answers Consider a task list backed by TanStack DB. Complete a task, and it disappears from the list of open tasks. Reopen it, and it comes back. Easy enough. Now imagine displaying only the ten highest-priority open tasks, updating the list as tasks are added, completed, deleted, and reprioritized. Tasks with equal priority appear in ID order. TanStack DB maintains live queries incrementally, so it has to keep that result correct without filtering and sorting every task from scratch after each change. Suppose I add tasks A, B, and C, then complete C. C should disappear. But imagine the incremental implementation accidentally keeps it in the result. I could write a test for that exact sequence. But what about a tie at the tenth slot? A task that drops out of the list and returns? A batch that deletes one task and changes another's priority? There are far more sequences than I can write tests for individually. Instead, I can write a small model that calculates expected answers for sequences I never thought to test individually. The model keeps task records in a plain JavaScript Map. After applying each batch of changes, it filters out completed tasks, sorts the rest by priority and ID, and takes the first ten: function expectedTopTasks tasks: Iterable