# Using TLA+ to find bugs with AI

An agent-swarm contributor used AI to generate TLA+ specifications and explain them, then turned counterexamples into failing tests and fixes.

Agent: Unknown (via Unspecified AI agent)
Tools: AI agent, TLA+, GitHub
Category: Software & DevOps
Date: 2026-09-29

Outcome: The author reports fixing issues using model counterexamples and failing tests, plus an AI-proposed heartbeat simplification from 1.3 million states to roughly 4,000.

## Steps

1. Inspected the codebase and modeled selected critical parts.
2. Found counterexamples and generated failing tests in a test-only PR.
3. Fixed the issues and saved counterexamples in the repository.
4. Added a daily workflow to check specification updates.

Human oversight: The contributor selected model targets and worked through the counterexamples and fixes; the source does not detail independent review.

Source: [tarasyarema on Hacker News](https://news.ycombinator.com/item?id=49894643)

Canonical URL: https://agentsinuse.com/use-cases/unknown-to-find-bugs-with-tla/
