Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 5 min read

I was sure Claude waited 15 minutes for me. It happened once.

I wrote that one of my Claude Code sessions is usually waiting for me, and that I find out fifteen minutes late. Then I measured it: 30 days of transcripts, 38 waits, median 1 minute 53 seconds. Fifteen minutes happened

I wrote that one of my Claude Code sessions is usually waiting for me, and that I find out fifteen minutes late. Then I measured it: 30 days of transcripts, 38 waits, median 1 minute 53 seconds. Fifteen minutes happened once.

I had built a whole feature on that sentence: every session became a lit window in the city behind my terminals, and it turns amber when the session waits. I had never checked whether the sentence was true.

Claude Code keeps a transcript of every session as a JSONL file under ~/.claude/projects. By default it deletes them after 30 days, so 30 days is what I had.

How I measured

A wait starts when Claude's turn ends: the last assistant message, with no tool call still open. It ends with my next prompt. If a background task or another agent wakes the session first, that gap doesn't count, because Claude wasn't waiting for me.

The other rules:

  • A prompt I typed while Claude was still working (Claude Code marks it as queued) ends no wait. It just joins the running turn.
  • Gaps over two hours count as "I was away" and are left out. There was one of those in 30 days, almost 6 hours long. With the cutoff anywhere between 30 minutes and 4 hours, every number below stays the same.
  • Headless runs (claude -p) and subagent transcripts are out. Nothing waits for me there.
  • A permission wait is a tool call I approved or rejected myself. Recent Claude Code versions write who decided into the transcript (permissionDecision).
  • "Claude working" is the time from my prompt to the last assistant message of that turn.

The script prints numbers and nothing else. Trimmed down, the core is this (Node 20+):

const fs = require('fs'), os = require('os'), path = require('path')
const root = path.join(os.homedir(), '.claude', 'projects')
const files = fs.readdirSync(root, { recursive: true })
  .filter(f => f.endsWith('.jsonl') && !f.includes('subagents'))

const waits = []
for (const f of files) {
  let lastAssistant = null
  const open = new Set() // tool calls without a result yet
  for (const line of fs.readFileSync(path.join(root, f), 'utf8').split('\n')) {
    if (!line) continue
    const e = JSON.parse(line), c = e.message?.content
    const t = Date.parse(e.timestamp)
    if (e.type === 'assistant') {
      lastAssistant = t
      for (const b of Array.isArray(c) ? c : []) if (b.type === 'tool_use') open.add(b.id)
    } else if (e.type === 'user' && Array.isArray(c) && c.some(b => b.type === 'tool_result')) {
      for (const b of c) open.delete(b.tool_use_id)
    } else if (e.type === 'user' && !e.isMeta
        && (e.turnOrigin ?? 'human') === 'human' && e.promptSource !== 'queued'
        && lastAssistant && open.size === 0) {
      const min = (t - lastAssistant) / 60000
      if (min <= 120) waits.push(min) // longer: I was away
    }
  }
}

The full version also skips slash-command output, interrupts and headless sessions, and only looks at the last 30 days.

The numbers

19 interactive sessions, 83 prompts from me, 38 waits.

Claude done β†’ my next prompt
median 1 min 53 s
p75 4 min 41 s
p90 8 min 26 s
longest 24 min
over 5 min 9 of 38 (24 %)
over 15 min 1 of 38 (2.6 %)
over 60 min 0

14 waits were over in less than a minute. 37 of 38 were under ten.

A wait also includes the time I spend typing the next prompt. So a two-minute "wait" is often just me writing the reply.

Where the time went

All 38 waits add up to 2.2 hours in 30 days.

Claude worked about 36 hours in the same sessions. A few long autonomous runs inflate that: the five longest turns make up two thirds of it, and the longest ran for more than eight hours. If I cap every gap inside a turn at 15 minutes (long builds, background agents, the PC going to sleep), it's still 18.8 hours. Either way, Claude worked 8 to 16 times longer than it waited for me.

The median turn was 4 minutes. And 15 of my 83 prompts (18 %) I typed before Claude was even done.

Permission prompts have almost disappeared for me. I use auto mode. Of 3,662 tool calls, I answered 3 myself (median 51 seconds, longest 2.5 minutes). The classifier and my allow rules took care of the rest and blocked 4.

Parallel sessions

This was the part I cared about most. Lights across the street only make sense if several sessions wait at the same time.

Two or more sessions waiting at once: 12 minutes in 30 days. 3 of the 38 waits started while another session was already waiting.

Two sessions working at once: 3.2 of 32.7 hours.

So the "three sessions most days" from my last post isn't what my transcripts show, at least not this month. Mostly I ran one main session and let it hand work to subagents. Subagents don't wait for me, so they aren't in these numbers.

My guess about the fifteen minutes: I remember the 24-minute wait. I don't remember the 14 that were over in under a minute. And the waits I'd most like to measure might not be in the data at all (third point below).

What this doesn't prove

  • One person, one Windows PC, 30 days. 38 waits is a small sample.
  • I measured while already using a tool that shows me when a session waits. There's no "before". Maybe the waits are short because of it, maybe I just sit close to my terminals.
  • The last wait of a session is invisible. 16 of 19 sessions end with Claude done and no reply from me: I read the result and closed the session, or I forgot about it. That could be where my fifteen minutes live, and the transcript can't tell.
  • "Me" means what Claude Code marks as a human prompt. If another agent types into a session on my behalf, it looks like me.
  • Time spent on background agents counts as Claude working, not as waiting.
  • Auto mode. If you approve tool calls by hand, your permission waits will look nothing like mine.

Question

Run the script above. What's your median? I'd like to know if mine is typical.

(I build VibeDesk, a free, open-source Windows desktop for Claude Code. It shows waiting sessions with status colors, as lights in the background scene and on your phone. The post with the lights is here.)

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.