Skip to content
Kura

Run Header

experimental

Header for one agent run: title, agent, model, branch, status, live elapsed clock, tokens, cost vs budget, step progress and Stop/Pause controls.

@kura-ui/react/run-headerCopy for agentsMarkdownRegistry JSON

Running

minimal

Migrate session API to @acme/auth

Running
Elapsed
–:––
Run running

Live run

Steps advance, tokens and spend climb against a $5 budget, the run waits for approval, then completes and offers Open PR. Pause, Resume and Stop work (⌘. and ⌘⇧P).

full

Migrate session API to @acme/auth

Runningkura/auth-client
Elapsed
–:––
Steps
4 of 7
Tokens
268k in · 21.9k out
Spend
$1.14 of $5.00
Run running

Bar

One dense row per run: running, waiting for you, failed and completed.

variant

Migrate session API to @acme/auth

Elapsed
–:––
Run running

Patch src/middleware.ts

Elapsed
–:––
Run waiting for you

Fix login.test.ts › refreshes an expired session

Elapsed
11:09
Run failed

Bump @acme/auth to 2.4.0

Elapsed
11:54
Run completed

With agent-fleet

A bar header above the run's subagents.

composition

Migrate session API to @acme/auth

Elapsed
–:––
Run running

Subagents3

  • explorerFound 23 calls to fetchUser() in 9 files1:36
  • , 62%test-writerRewriting mocks in src/auth/__tests__/login.test.ts–
  • reviewerStarts after test-writer–

Installation

npx shadcn@latest add https://kuro.abstergo.fyi/r/run-header.json

Copies the source into components/kura/run-header with its dependencies (kura-theme, button, icon-button, kura-format, shimmer-text, status-glyph, tooltip, use-elapsed, use-hotkey, utils). Tokens come from the kura-theme item.

When to use it

Use it for

  • The top of a page or pane that shows one agent session (Claude Code, Codex, Devin-style runs): what it is doing, how long, how much it costs, and a way to stop it.
  • A dense status row above a run's transcript, plan or fleet (variant='bar').
  • Showing spend against a per-run budget, with the meter turning amber at 80% and red past 100%.
  • Giving the human Stop / Pause / Resume with keyboard shortcuts while an agent works.

Reach for something else when

  • The run's step-by-step plan — use task-list (todo-style) or agent-timeline (steps with connectors).
  • Parallel subagents inside a run — use agent-fleet.
  • Context-window usage of one conversation — use context-meter.
  • A single tool invocation — use tool-call.

Props

PropTypeDefaultDescription
title*React.ReactNode—What the run is doing, e.g. "Migrate session API to @acme/auth". Truncates.
agentstring—Agent name, e.g. "Kura". Panel meta line only.
modelstring—Model id in mono, e.g. "claude-opus-5-5". Panel meta line only.
status*"queued" | "running" | "waiting" | "done" | "failed" | "skipped" | "paused"—Run state, drawn with StatusGlyph. running = blue arc + shimmering 'Running'; waiting = amber 'Waiting for you'; done = 'Completed'; failed = red; skipped = 'Stopped'. queued/running/waiting/paused keep the clock ticking.
startedAtDate | number—Run start. Drives the live elapsed clock (m:ss, h:mm:ss). Without it the clock shows –:––.
endedAtDate | number—Run end. Freezes the clock at endedAt − startedAt (use for finished or persisted runs).
tokens{ input: number; output: number }—Token usage. Panel shows "412k in · 38.1k out"; bar shows the total.
costnumber—Spend so far in USD, formatted $1.82.
budgetnumber—Budget in USD. Shows '$1.82 of $5.00' with a 4px meter; amber from 80%, red (and red cost) past 100%.
branchstring—Git branch in mono with a branch icon. In the bar it shows from ~768px container width.
progress{ done: number; total: number }—Plan progress: '4 of 7' plus a segmented bar (continuous above 24 steps). The current segment is blue while running, amber while waiting, red when failed.
actionsReact.ReactNode—Extra controls before Pause/Stop, e.g. an 'Open PR' Button once the run is done.
onStop() => void—Shows Stop while the run is live (queued, running, waiting, paused). Bound to ⌘/Ctrl+.
onPause() => void—Shows Pause while running. Bound to ⌘/Ctrl+Shift+P.
onResume() => void—Shows Resume while paused. Bound to ⌘/Ctrl+Shift+P.
variant"bar" | "panel""panel"bar = one 44px row (glyph, title, status, branch, steps, tokens, cost, clock, controls; stats drop out as the container narrows). panel = title + meta line + a stats strip (Elapsed, Steps, Tokens, Spend).
shortcutsbooleantrueBind ⌘/Ctrl+. (Stop) and ⌘/Ctrl+Shift+P (Pause/Resume) on the document. Only one run header on screen should bind them.

All native attributes of the root element, className and ref pass through.

Anatomy

  1. RunHeaderRoot <section> labelled by the title; `data-variant`, `data-status`. A size container.data-slot="run-header"
  2. Title<h2>, truncated.data-slot="run-header-title"
  3. StatusStatus word; shimmers while running, amber when waiting, red when failed.data-slot="run-header-status"
  4. AgentAgent name (panel).data-slot="run-header-agent"
  5. ModelModel id in mono (panel).data-slot="run-header-model"
  6. BranchBranch icon + mono name.data-slot="run-header-branch"
  7. Controlsactions, then run-header-pause and run-header-stop.data-slot="run-header-controls"
  8. Stats<dl>. In the panel each cell is run-header-stat with `data-stat` = elapsed | steps | tokens | cost, separated by hairlines.data-slot="run-header-stats"
  9. ElapsedMono tabular clock with reserved width so ticking never shifts layout.data-slot="run-header-elapsed"

Accessibility

  • Role: region (section labelled by the title)
  • The stats are a <dl>: each value has a term (Elapsed, Steps, Tokens, Spend), visually hidden in the bar.
  • A polite status region announces only status changes ('Run waiting for you'); the ticking clock and counters are not announced.
  • Stop and Pause have tooltips with their shortcuts and aria-keyshortcuts. Status is never colour-only: the glyph shape and the status word carry it.
  • The status glyph is decorative here (label=null) because the status word sits next to it.
  • Reduced motion: The running arc, the current step's pulse and the status shimmer stop; meters change width without transition.
KeysAction
Mod+.Stop the run (when onStop is set and the run is live)
Mod+Shift+PPause or resume
TabActions, Pause, Stop

Notes for agents

  • Keep one RunHeader mounted for the life of a run and update props; pass startedAt from the server so reloads keep the right clock, and endedAt once it finishes.
  • Set shortcuts={false} on every RunHeader except the one for the focused run, otherwise ⌘. stops all of them.
  • Map harness states: in-progress → running; needs approval / input → waiting; interrupted by the user → skipped ('Stopped'); error → failed.
  • tokens.input should include cache reads if you want the number to match the bill; cost is whatever you computed — the component only formats it.
  • Use the bar inside dense layouts (above a fleet or transcript) and the panel at the top of a run page.