Skip to content

hasActiveSpinner

hasActiveSpinner(text): boolean

Defined in: src/blocked.ts:65

True when the terminal tail shows an actively-working Claude Code turn — a glyph-anchored spinner line with an elapsed-time counter or the legacy “esc to interrupt” hint. Scans the same last-15-non-empty-lines window as classifyBlocked (the spinner always sits just above the input box; this avoids matching stale scrollback).

Why this exists: herdr can latch agent_status=blocked after the user answers a permission/elicitation dialog, reporting “blocked” for the rest of the working turn. A “blocked” agent whose TUI shows a live turn spinner is actually working, not waiting on the user — this is a defensive guard against that upstream herdr bug.

string

boolean