Measure how much coding agent time goes to waiting on tests

A developer had Claude Code analyse its own work on a ticket backlog and found 9.1 of 21.8 working hours, 42 percent, went to waiting for test runs.

Done withClaude Code· Nov 24, 2026

What they did

The poster, u/NerdyNThick, works through a backlog of tickets with Claude Code using Matt Pocock's spec, ticket and TDD skills. Noticing that Claude often seemed to be sitting on test runs, they asked it to go through its own session history and work out how much of its working time went to waiting on tests, overall and per ticket.

How it went

Claude's first pass gave 26.5 hours of work with 34 percent on tests, but it had counted idle gaps of up to ten minutes as work. The corrected figure was 9.1 of 21.8 hours, 42 percent. Per ticket the share ran from 5 percent to 70 percent, and it rose on most tickets once idle time was removed. Commenters said the full suite after every small edit was the cause and suggested scoped test commands in CLAUDE.md, fail-fast flags, moving slow suites to CI or a commit hook, and asking Claude to make the slow tests faster.

Worth knowing

Check how the agent defines working time: the first answer was off by nearly five hours because of how it treated idle gaps. Red-green-refactor skills make a test run after every step by design, so the waiting is partly the method, not a bug. One commenter said a single instruction did not hold and they had to deny the bare test command in permissions.

Try it

With Claude Code· 4 parts to fill in

Go through your session history for [project or date range]. For each [ticket or task], work out total working time and the time spent waiting on test commands, and give the share per ticket and overall. Do not count idle gaps longer than [number] minutes as working time, and say how you handled them. List the five tickets with the highest test share and the test commands that cost the most time. Then suggest changes to [CLAUDE.md or my test setup] that cut repeat full-suite runs, and stop for my approval before changing anything.

Square brackets are the parts to fill in. The prompt is ours; the story is theirs.

Where they said it

Related