Agents write a lot of tests, and that's mostly good news. The catch is the habit that usually comes with it: run the whole suite after every round of changes. On a long build, that can quietly turn into hours of waiting and a growing model bill. Nobody chooses to spend that. It comes from a rule that made perfect sense when the suite was small.
How a sensible rule gets expensive
Early in a build the suite is small, a run takes seconds and a task rarely needs more than one. Then later phases add tests. Each run takes longer, and each task needs more of them, because there's more that can fail. Slower runs and more of them multiply, which is why this creeps up on you and then arrives all at once. Agents add a cost of their own, because a model may have to read each test log.
Watch minutes per round, not suite size
A thousand tests can be fine, so a test count won't warn you. Track test minutes per round and test runs per task, and look at how they move over the life of a build. Those two numbers climb well before anything times out, and a timeout is the worst way to find out, because a run that gets cut off tells you nothing about the code.
During a round, run what the change can affect
While an agent is iterating, it needs fast feedback on the code it just touched. Vitest's --changed flag and Jest's --changedSince flag both pick the tests related to what changed since a commit you name. Point them at the merge base with your target branch, so everything on the branch counts, however many commits it took. Add --passWithNoTests so a change with no related tests doesn't read as a failure. Most test runners have some way to do this.
Keep the full suite for the moments that count
A scoped run will miss things: a test tied to shared config, or two changes that pass alone and fail together. So run the full suite once before a change lands, and once on main after a batch of work has landed. Cache that result by commit so nothing runs twice for the same code. You end up with fewer full runs, each one guarding something specific.
Make the fallback loud
Sometimes you can't scope a run. The test script may wrap the runner in something else, or the checkout may have no merge base. Run everything in those cases and record that you did, so a surprise cost has an explanation. When a scoped run fails, rerun just the failing files on the base branch. That tells you whether this change broke them or they were already broken, without paying for the whole suite again.
How 1904 handles this
While an agent works, 1904 runs the tests related to the changed files when your app's test script calls Vitest or Jest directly. Anything else runs the full suite and says so. Your full suite still runs before a change merges and again on main when a phase finishes, and if something fails there, the build stops until it's fixed.