Live band above the prompt following running .harness plans

<img src="docs/hero.svg" alt="ufoz-harness: Claude plans, a cheap executor (pi, opencode or Haiku) writes the code, a runner checks every task" width="100%">
Why · Quick start · Run modes · How it works · Flags · Architecture
A plan/execute harness: a main session (Claude Code, or pi / opencode) plans and reviews, a cheap executor writes the code, and a Python runner checks every task with shell commands, so no model decides whether work passed.
This repo is the lab where the harness is built and tested (CLAUDE.md, agents, skills, run_plan.py, selftest.py, benchmarks). packages/ufoz-harness ships it to other projects (npx ufoz-harness).
Coding agents are expensive when the smart model types every line, and unreliable when the same model decides its own work is done. The harness splits those jobs.
@claude-executor, Haiku by default), all behind the same brief and the same checks.<img src="docs/bench-cost.svg" alt="Staged shop bench: pure Sonnet $3.39 in 13.6 min, harness + opencode $1.18 in 22.1 min, harness + pi $1.47 in 26.4 min" width="100%">
The trade-off is time: a cheap model is slower, so a run takes longer than one Sonnet session. More runs in Test and measure.
python .harness/selftest.py # checks the setup, one $0 smoke task
cp .harness/.env.example .harness/.env # optional: pick planner, models
claude # or pi / opencode, see below
# describe the task, approve the plan, then:
python .harness/run_plan.py <slug> --land # bring the finished run into your tree
The main session writes the plan, runs run_plan.py <slug> after your go, and reviews the reports. You review the diff and commit. See Requirements for what to install.
Two ways to run the same plan. The plan, the acceptance commands and the rule that nobody commits are identical; what differs is who types the code and who enforces the guards.
<img src="docs/mode-claude.svg" alt="Claude mode: Decide, Plan with @planner, Execute with @claude-executor, Check by rerunning --executor agent:haiku, Land with --land" width="100%">
Stay inside Claude Code. After your go, run_plan.py <slug> --executor agent:haiku creates the same worktree the runner would use (.worktrees/<slug>, a snapshot of your tree with the plan files copied in), then the main session spawns the claude-executor subagent (.claude/agents/claude-executor.md) in the background so it shows up in the agents panel. It defaults to Haiku; pass model: sonnet or model: opus for harder work. It edits only each task's files inside that worktree, runs each acceptance command, and retries once. That first call also records a baseline of your main tree, so the second call fails (MAIN <path>) if the agent wrote anything outside its worktree or moved HEAD. A hook in the agent file also blocks this, but Claude Code does not always load agent hooks, so the second call is the guarantee.
python .harness/run_plan.py <slug> --executor agent:haiku # call 1: worktree: <abs path> + handoff; runs nothing
python .harness/run_plan.py <slug> --executor agent:haiku # call 2, after the agent: grade it, report, commit
python .harness/run_plan.py <slug> --land # you: the same land as runner mode
Trade-off: the runner is not driving, so there is no automatic retry-with-feedback or repair pass. Call 2 applies the lock, scope and acceptance checks afterwards, writes the same items/T<n>.report.md, commits each passing task and skips tasks that already passed.
<img src="docs/mode-runner.svg" alt="Runner mode: Decide with Claude, pi or opencode, Plan, Execute with pi or opencode, Check with retry and repair, Land" width="100%">
run_plan.py <slug> drives a cheap executor (pi by default, or --executor opencode) in its own .worktrees/<slug>. The runner does the checking: lock, scope, suppression guard, one retry with feedback, one repair pass. The main session can be Claude, pi or opencode. This is the mode the benchmarks measure, and the cheapest.
python .harness/run_plan.py <slug> # pi; add --executor opencode
python .harness/run_plan.py <slug> --land # you
<img src="docs/harness-map.svg" alt="Harness map, top to bottom: decide, plan, run in a worktree through one of four executors, check with guards and acceptance, then land, fix or discard" width="100%">
Only the main session changes between Claude Code, pi and opencode. More diagrams (open the .html files in a browser; GitHub shows them as source): session-flows.html (terminal to --land per main session), flows.html (every path in docs/FLOWS.md), mermaid.md.
main session (Claude) decides with you, approves plans, reviews results
│
▼
@planner (sonnet subagent) explores (Bash for inspection only), writes the plan,
│ runs --lint itself, lists Verified/Unverified facts
▼
.harness/plans/<slug>/ plan.md (Decisions + one ## T<n> per task), tasks.json; checks/ only if no smoke fits
│
▼
python .harness/run_plan.py <slug>
│ runs in its own worktree .worktrees/<slug>, one run.lock per plan
│ first run: hashes tasks.json + checks/ into plan.lock.json
│ per task, in order:
│ lock unchanged? else RESULT: lock-mismatch
│ check fails before work? else RESULT: check-invalid (the check proves nothing)
│ executor (pi / opencode / claude / llama / ollama) does the brief
│ runner runs the check itself
│ file touched outside the task's `files`? → fail
│ new @ts-ignore / @ts-nocheck / eslint-disable line? → fail
│ plain failure → one retry with items/T<n>.feedback.md
│ still failing → one repair pass: error + files of this and all earlier tasks
│ last task writes SUMMARY.md (<= 600 chars) and a BUILD: pass/fail line
│ writes items/T<n>.report.md (result, seconds, tokens, cost)
│ --review: one Sonnet pass over touched files → REVIEW.md
▼
you read the reports and the diff, then run --land. Nobody in this chain commits.
@planner for larger work. Every plan is a contract plan, <= ~1.5k tokens:python -c ..., node -e ..., plus npx tsc --noEmit --incremental --tsBuildInfoFile .harness/tsc.tsbuildinfo for TS tasks with TypeScript files). No full builds..ts files by importing them through node: it leads the executor to .ts-extension imports that bundlers reject."red_first": true.files lists every file the task may touch, including generated ones.SUMMARY.md, runs the build if any and records BUILD: pass or BUILD: fail <error>; the build never fails the task..harness/CHECK_PATTERNS.md.python .harness/run_plan.py <slug> --lint must print lint OK. Check the plan's Unverified: list, then say go.python .harness/run_plan.py <slug> (in the background from Claude Code; it can take minutes). After your go, Claude keeps going and stops only on a second failure of the same task, a destructive step, or a design question.Blocked on me: / Changed: / Found:.| Result | Meaning | Next step |
|---|---|---|
pass | check passed, only listed files touched (summary says REPAIRED if a repair pass fixed it) | review the diff |
fail | check failed, executor error, out-of-scope file, or a new suppression comment | fix the brief, rerun (passed tasks are skipped) |
check-invalid | the check passed before any work | tighten the check |
lock-mismatch | tasks.json or a check changed after the first run | your edit: rerun with --relock-only; the executor's: discard it |
| Flag | Does |
|---|---|
--land | your command, not the agent's: apply a finished worktree run here, copy its plan records, remove the worktree and branch (details) |
--lint | validate the plan and prove every check fails; runs nothing else |
--only T2 | run one task |
--review [claude[:MODEL]] | cheap review pass after a fresh full run → REVIEW.md (claude only, bare = sonnet; slug goes before it) |
--relock-only | re-record the check hashes after you edited a check; runs nothing |
--status | task states, the first failure's tail and the next command; runs nothing |
--pending | list worktrees not landed yet; runs nothing |
--no-window | a real run opens a shared Windows Terminal window with a live tab (Windows only, on by default; this or HARNESS_WINDOW=0 opts out) |
--executor BACKEND[:MODEL] | which executor writes the code, with an optional model: pi, opencode, claude, llama, ollama, or agent:haiku (the @claude-executor agent; run twice, see Claude mode). Default pi; see Executors and Requirements |
--stats | cost and time totals (see Test and measure) |
--timeout S | per-task executor timeout, default 900 |
--fresh | a new executor session per task instead of one warm session for the plan |
--session ID | continue an existing executor session (refused with --fresh or --parallel > 1) |
--plan SPEC.md | have the planner backend write and lint the plan for <slug>; runs no tasks (details) |
--planner BACKEND[:MODEL] | planner backend and model for --plan (default HARNESS_PLANNER / HARNESS_PLANNER_MODEL, else pi) |
--parallel N | run up to N tasks at once (DAG scheduler, no shared files); refused for llama and ollama (one local model slot, not thread-safe) |
--no-worktree | run in place instead of in its own git worktree (the worktree is the default for a real run; HARNESS_WORKTREE=0 opts out globally) |
All runner executors follow the same brief and guards; pick one with --executor <name>. pi, opencode and claude keep one warm session per plan (llama and ollama too, since they are pi underneath). The main session never writes code for delegable work, which keeps its context small and the bill low.
opencode/deepseek-v4.1-flash (an OpenCode Zen model).opencode serve per run over HTTP+SSE, same model.claude -p per task; bills you; for comparisons. --executor claude:<model> defaults to sonnet (pi and opencode honor that flag too, each with its own default).llama-server in router mode that you start yourself. HARNESS_LLAMA_MODEL picks the model (default: the only one the server lists) and HARNESS_LLAMA_URL the server (default http://127.0.0.1:8080). Pi's built-in llama.cpp provider needs an interactive /login, so the executor writes its own models.json into a throwaway PI_CODING_AGENT_DIR; your ~/.pi/agent is never touched. Free, offline, warm session, but only as good as the local model.HARNESS_OLLAMA_MODEL picks the model (default: the only one the server lists) and HARNESS_OLLAMA_URL the server (default http://127.0.0.1:11434). Ollama's OpenAI-compatible API needs no interactive /login, so the executor writes its own models.json into a throwaway PI_CODING_AGENT_DIR; your ~/.pi/agent is never touched. Unlike llama there is no router/load step: Ollama loads the model on first use. Free, offline, warm session, but only as good as the local model.docs/ARCHITECTURE.md explains the internals: guard order, repair scope, executor invocation, metrics. Read both before changing harness internals.
A real run (run_plan.py <slug>, no --lint/--plan/--stats) happens in its own git worktree at .worktrees/<slug> on branch harness/<slug>, so several plans can run at once, and opens a shared Windows Terminal window with a tab per plan. The tree must be clean (no unstaged changes or untracked files outside .gitignore); if not, worktree.ensure() refuses with a message naming the dirty paths and exits. Opt out per run with --no-worktree / --no-window, or globally with HARNESS_WORKTREE=0 / HARNESS_WINDOW=0. Outside a git repo the run stays in place (not a git repo: running in place).
The plan's own files are copied into the worktree, so its reports, logs and SUMMARY.md live in .worktrees/<slug>/.harness/plans/<slug>/ (the copy in your main tree stays as the source). The base is the current HEAD: the worktree branch harness/<slug> starts at HEAD and all downstream commits are real git. Your index, HEAD and branches stay untouched. .worktrees/ goes into .git/info/exclude (local, no tracked file changes), and shared, gitignored dirs (node_modules, .venv, .opencode/node_modules) are junctioned into the worktree, not copied.
Nobody commits. When the run is done, review the diff and merge or discard by hand:
git -C .worktrees/<slug> diff # what the run changed
git worktree remove .worktrees/<slug>
--landpython .harness/run_plan.py <slug> --land brings a finished run into the main tree. In order it:
.worktrees/<slug> is a real worktree, no run is in progress (no run.lock), every task passed and the worktree has no uncommitted changes; otherwise it refuses,git merge --ff-only harness/<slug>; if your main tree moved after the plan started it falls back to git merge --no-ff. On a conflict it aborts the merge, the worktree and branch stay, and you resolve by hand,SUMMARY.md) into .harness/plans/<slug>/ and commits them, so the tree stays clean,harness/<slug>, then prints landed <slug>: <n> files.The agent never runs --land; you do, once you are happy with the diff.
.harness/MAIN.md holds the same plan → execute loop, backend-neutral. Start it directly, no wrapper script:
pi --model opencode/deepseek-v4.1-flash (AGENTS.md auto-loads the main-session rules and points at .harness/HARNESS.md). On PowerShell ~ doesn't expand, so if pi isn't on PATH use the full path: node "$env:USERPROFILE\.pi\agent\bin\pi-launcher.js" ... (bash: node ~/.pi/agent/bin/pi-launcher.js ...).opencode --agent orchestrator; the repo's opencode.json defines that agent with MAIN.md as its prompt.Planning is a command, not a subagent: write a spec file, then
python .harness/run_plan.py <slug> --plan <spec.md>
It runs runner/planner.py only, which asks the planner backend for .harness/plans/<slug>/plan.md + tasks.json, lints them (retrying the same session twice with the lint output as feedback), writes planner.json, and exits 0 iff the plan lints. No tasks run; execute later with python .harness/run_plan.py <slug>.
Under Claude Code the main session follows CLAUDE.md and plans with @planner (.claude/agents/planner.md); opencode has the same @planner as a subagent (.opencode/agent/planner.md), pi uses .pi/planner.md as a system prompt. --plan reuses that file's layout and rules as the fallback.
Copy .harness/.env.example to .harness/.env (gitignored) and uncomment what you want to change. A real env var already set in your shell always wins over the same key in that file.
| Var | Default | Effect |
|---|---|---|
HARNESS_PLANNER | pi | planner backend for --plan: pi, opencode or claude |
HARNESS_PLANNER_MODEL | unset | model for the planner backend; falls back to sonnet for claude, else the backend's own default |
HARNESS_MODEL | opencode/deepseek-v4.1-flash | executor model for pi and opencode |
HARNESS_PI | unset | path to pi; falls back to ~/.pi/agent/bin/pi-launcher.js |
HARNESS_VARIANT | medium | reasoning effort for every executor (pi --thinking, opencode variant, claude --effort) |
HARNESS_WORKTREE | on | 0 runs every plan in place instead of in .worktrees/<slug> |
HARNESS_WINDOW | on | 0 skips the live Windows Terminal window |
HARNESS_RUNNER_FLAGS | empty | bench only: extra flags appended to run_plan.py |
HARNESS_ARM_LABEL | unset | bench only: cosmetic arm label written into the results csv |
HARNESS_LLAMA_URL | http://127.0.0.1:8080 | llama executor: the llama-server router to attach to |
HARNESS_LLAMA_MODEL | unset | llama executor: router model id; unset = the only model the router lists |
HARNESS_OLLAMA_URL | http://127.0.0.1:11434 | ollama executor: the Ollama server to attach to |
HARNESS_OLLAMA_MODEL | unset | ollama executor: server model id; unset = the only model the server lists |
<img src="docs/bench-flow.svg" alt="Benchmark cell flow: Seed, Project, Plan, Run, Land, Score" width="100%">
bench/suite/suite.py runs a matrix of executor x size x mode x rep. Each cell is an isolated temp project (committed seed, kit installed, plan at the root), run and landed like a real user's work, then scored on hidden tests, the seed's own tests and a tamper diff. --plan-source planner has @planner write the plan instead of using the fixture's; --legacy keeps the old lab-worktree path.
python .harness/selftest.py: checks python, git, pi and the executor model, then runs a one-task smoke plan in a throwaway temp repo. $0; never touches this project.python .harness/selftest.py --bench: fair A/B. @planner plans once, then the same plan runs with the pi executor and with a Claude (Sonnet) executor, both with --review; only who writes the code differs. Rows go to .harness/bench.csv. About $0.50 per run.python .harness/run_plan.py --stats: per plan, executor time/tokens/cost from .harness/metrics.jsonl, --review cost (exact), and planner/reviewer/validator usage read from Claude Code's own logs (estimated dollars). The main session's own tokens are not included.bench/speed/: duel.py compares opencode and pi on the same model and hidden tests, then report.py writes RESULTS.md from results.csv. bench.py copies the current on-disk tree (git ls-files -co --exclude-standard, skipping deleted files and bench/speed/), not HEAD, and staged.py honors HARNESS_ARM_LABEL. Across 9 small/medium/large runs each, both passed 100%; pi's median was 15 s versus 38 s, with about 10x fewer input tokens and half the tool calls. That is why pi became the default executor; opencode is back as an optional executor (--executor opencode) for whole-task runs.bench/verify/: the verification matrix, orchestrator x planner x executor over the small fixture (27 cells at --reps 3; verify.py, report.py -> RESULTS.md). Each row records per-phase time, tokens, cache and cost, a fail_reason, hidden-test counts and the saved log dir. Cells are isolated (stale projects wiped, escapes into other cells or hidden tests are flagged) and a timed-out phase has its process tree killed. On 2026-10-19 all 27 cells passed after fixing a spec gap and four harness bugs. See bench/verify/README.md.test_detail_page_unknown_slug_404).bench/speed/latency.py: measures "Reply OK" startup. --oc-tune 0..4 walks the opencode speedups: 1 = one warm server plus run --attach, 2 = plus a lean config, 3 = plus a lean agent, 4 = warm server over HTTP with the current fixes (default agent). Startup medians: pi 1.71 s, opencode over HTTP 3.14 s, opencode run --attach 6.78 s. On whole tasks HTTP is about equal to run --attach (~5% faster, within noise)..harness/bench/runs/stages.csv): K + opencode (rep 3) 59/59 for $1.18 in 22.1 min with no retries; PURE Sonnet (rep 4) 59/59 for $3.39 in 13.6 min; K + pi (rep 2) 58/59 for $1.47 in 26.4 min, its stage 1 broken by a stray untracked root app/ file. Pitfall: the bench copies untracked files too (git ls-files -co), so one stray file lands in every bench copy..pi/executor.md with .pi/deny.json and .pi/extensions/deny-list.ts) is denied git state commands and writes/edits outside cwd, and runs with the rules in .pi/executor.md: only the brief's files, never .harness/, finish with DONE: or BLOCKED:. Reads outside cwd are not blocked.@claude-executor is guarded by .harness/hooks/git_guard.py, a PreToolUse hook set in its agent file; it reads the same .pi/deny.json and also blocks --land.--land has no terminal gate: agents are stopped from running it by the git_guard hook and the .pi/deny.json deny list instead, and the main session lands the worktree itself..claude/settings.json, so installing never overwrites your permissions. .claude/settings.strict.json holds the old hard denies if you want them: copy it over.CLAUDE.md).hooks/register.tsx 178 lines1import { atom, read, update } from 'claude-code'
2import type { EngineInterface, Register } from 'claude-code'
3
4import type { HarnessRun } from '../types'
5
6// Viewer only: run_plan.py keeps owning the run (Bash background), this band only reads
7// its files, so a reload of the mod never touches a live plan.
8
9const runs = atom({ plugin: 'harness-band', key: 'runs' } as const, [] as HarnessRun[])
10
11const POLL_MS = 2000
12const KEEP_DONE_MS = 60_000
13const TAIL = 3
14const DETAIL_KEYS = ['path', 'command', 'file_path', 'filePath', 'pattern', 'url']
15const EXECUTORS = ['pi', 'claude', 'opencode', 'llama']
16
17// Same shape as watch.render_line, one display line or null.
18function renderLine(line: string): string | null {
19 line = line.replace(/\r?\n$/, '')
20 if (!line.trim()) return null
21 if (line.startsWith('[toolCall ')) {
22 const rest = line.slice('[toolCall '.length)
23 const end = rest.indexOf(']')
24 const name = (end < 0 ? rest : rest.slice(0, end)).trim()
25 const args = end < 0 ? '' : rest.slice(end + 1).trim()
26 return `${name.padEnd(6)} ${detail(args)}`
27 }
28 if (line.startsWith('[tool error] ')) return `✖ tool error: ${line.slice('[tool error] '.length)}`
29 if (line.startsWith('DONE:')) return `✔ ${line}`
30 if (line.startsWith('BLOCKED:')) return `✖ ${line}`
31 return `│ ${line}`
32}
33
34function detail(args: string): string {
35 try {
36 const obj = JSON.parse(args.split('\n', 1)[0])
37 if (obj && typeof obj === 'object') {
38 for (const key of DETAIL_KEYS) {
39 if (key in obj) return String(obj[key]).split('\n', 1)[0]
40 }
41 }
42 } catch {}
43 return args
44}
45
46// Same as watch.log_title: `T4.repair2.claude.log` -> `T4 repair 2`.
47function logTitle(name: string): string {
48 const parts = name.replace(/\.log$/, '').split('.')
49 if (parts.length > 1 && EXECUTORS.includes(parts[parts.length - 1])) parts.pop()
50 return parts.map(p => p.replace(/^(retry|repair)(\d+)$/, '$1 $2')).join(' ')
51}
52
53async function list($: EngineInterface, dir: string) {
54 return $.fs.list(dir).catch(() => [])
55}
56
57async function snapshot($: EngineInterface, slug: string, planDir: string, prev?: HarnessRun) {
58 let ids: string[] = []
59 try {
60 const data = JSON.parse(await $.fs.read(`${planDir}/tasks.json`))
61 ids = (data.tasks ?? []).map((t: { id?: string }) => t.id).filter(Boolean)
62 } catch {}
63
64 let pass = 0
65 for (const id of ids) {
66 const text: string = await $.fs.read(`${planDir}/items/${id}.report.md`).catch(() => '')
67 if (/^RESULT: pass\s*$/m.test(text)) pass += 1
68 }
69
70 const logs = (await list($, `${planDir}/logs`))
71 .filter((f: { kind: string; name: string }) => f.kind === 'file' && f.name.endsWith('.log'))
72 .sort((a: { mtimeMs: number }, b: { mtimeMs: number }) => b.mtimeMs - a.mtimeMs)
73 let log = prev?.log ?? ''
74 let lines = prev?.lines ?? []
75 if (logs.length) {
76 const text: string = await $.fs.read(`${planDir}/logs/${logs[0].name}`).catch(() => '')
77 log = logTitle(logs[0].name)
78 lines = text
79 .split('\n')
80 .map(renderLine)
81 .filter((l): l is string => l !== null)
82 .slice(-TAIL)
83 }
84
85 return { slug, pass, total: ids.length, log, lines, isDone: false, endedAt: 0 }
86}
87
88async function poll($: EngineInterface) {
89 const root = await $.session.cwd()
90 const now = await $.clock.now()
91 const prev: HarnessRun[] = await read($, runs)
92 const next: HarnessRun[] = []
93 const seen = new Set<string>()
94
95 // worktree runs (the default), then in-place runs (--no-worktree)
96 const dirs: [string, string][] = []
97 for (const d of await list($, `${root}/.worktrees`)) {
98 if (d.kind === 'dir') dirs.push([d.name, `${root}/.worktrees/${d.name}/.harness/plans/${d.name}`])
99 }
100 for (const d of await list($, `${root}/.harness/plans`)) {
101 if (d.kind === 'dir') dirs.push([d.name, `${root}/.harness/plans/${d.name}`])
102 }
103
104 for (const [slug, planDir] of dirs) {
105 if (seen.has(slug)) continue
106 if (!(await $.fs.exists(`${planDir}/run.lock`))) continue
107 seen.add(slug)
108 next.push(await snapshot($, slug, planDir, prev.find(r => r.slug === slug)))
109 }
110
111 // a run whose lock just went away stays a minute as a done row
112 for (const run of prev) {
113 if (seen.has(run.slug)) continue
114 if (!run.isDone) {
115 const wt = `${root}/.worktrees/${run.slug}/.harness/plans/${run.slug}`
116 const planDir = (await $.fs.exists(wt)) ? wt : `${root}/.harness/plans/${run.slug}`
117 const last = await snapshot($, run.slug, planDir, run)
118 next.push({ ...last, isDone: true, endedAt: now })
119 } else if (now - run.endedAt < KEEP_DONE_MS) {
120 next.push(run)
121 }
122 }
123
124 if (JSON.stringify(next) !== JSON.stringify(prev)) await update($, runs, () => next)
125}
126
127export const register: Register = on => {
128 on('session.start', async ($, e, next) => {
129 const result = await next(e)
130 let isBusy = false
131
132 $.clock.every(POLL_MS, () => {
133 if (isBusy) return
134 isBusy = true
135 void poll($).finally(() => {
136 isBusy = false
137 })
138 })
139
140 return result
141 })
142
143 on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
144 const shown = await read($, runs)
145 if (e.props.hasSurvey || shown.length === 0) return next(e)
146
147 const { Box, Text } = $.ui.resolve(e)
148 const budget = Math.max(1, e.props.maxRows - 2)
149 const perRun = Math.max(0, Math.floor(budget / shown.length) - 1)
150
151 return (
152 <Box flexDirection="column">
153 {shown.map(run => {
154 const isOk = run.isDone && run.total > 0 && run.pass === run.total
155 const head = run.isDone
156 ? `${isOk ? '✔' : '✖'} harness ${run.slug} · done · ${run.pass}/${run.total} pass`
157 : `▶ harness ${run.slug} · ${run.pass}/${run.total} pass · ${run.log || 'starting'}`
158 return (
159 <Box key={run.slug} flexDirection="column">
160 <Text bold color={run.isDone ? (isOk ? 'green' : 'red') : 'cyan'} wrap="truncate-end">
161 {head}
162 </Text>
163 {run.isDone
164 ? null
165 : run.lines.slice(-perRun).map((line, i) => (
166 <Text key={`${run.slug}-${i}`} dimColor wrap="truncate-end">
167 {' '}
168 {line}
169 </Text>
170 ))}
171 </Box>
172 )
173 })}
174 </Box>
175 )
176 })
177}
178types/index.d.ts 16 lines1export type HarnessRun = {
2 slug: string
3 pass: number
4 total: number
5 log: string
6 lines: string[]
7 isDone: boolean
8 endedAt: number
9}
10
11declare module 'claude-code' {
12 interface PluginState {
13 'harness-band': { runs: HarnessRun[] }
14 }
15}
16