---
title: Badges and holes
description: Every hole (truncated, stripped, redacted, max_tokens, interrupted, gap, not_recorded, derived, hidden, compacted), its fourteen causes, the cost badges and the other words Studio and the devtools panel draw when a record is missing, cut, withheld or computed, with tone, cause, fix text and where each appears.
url: https://weftgo.dev/docs/reference/badges/
type: reference
sources:
  - 'weft/otel/options.go:104-123 (DevMode), 169-198 (DevDetail, dev-gated); weft/otel/pipeline.go:241-311, 931-960 (the gate, its WARNs and the DevMode INFO lines); weft/obsdb/request.go:93, 149, 167-168 (the gap and raw_off fixes name otel.DevMode()); weft/CHANGELOG.md:124 (0.19.0: DevMode), 35 (0.20.0: DevDetail)'
  - 'weft v0.20.2: obsdb/request.go:273-277 (the hidden hole''s reason and fix); studio/web/src/lib/honesty.ts:166-171 (its label, hidden by your token''s access), 96 (the count, N child runs); studio/testdata/holes.golden.json:100-102; studio/requests.go:200 and studio/export.go:325-340 (the refusal''s message and badge); studio/pricing.go:888-892, 977 (the delegated reason counts child runs); weft/CHANGELOG.md:76 (0.20.0 Breaking: child runs), 77 (0.20.0 Breaking: the hidden hole''s words)'
  - 'W11-tag3, v0.20.2: weft/obsdb/request.go:225-228 (stockSpansFix: the derived fix without a repository path); weft/studio/web/src/lib/honesty.ts:253-258 (the same words in Studio and the panel)'
  - the rest of the paths and lines below were read at the weft v0.17.0 tag (53bab77f) and re-pinned at v0.20.0 by the W11-tag pass, at v0.20.1 by W11-tag2 and at v0.20.2 by W11-tag3
  - obsdb/request.go:14-37 (Hole, the ten constants, Holes), 47-50 (HoleNote), 56-154 (HoleCause, the Cause constants, MetadataCapReason, queueFix, HoleCauses), 156-223 (causeNotes), 230-282 (HoleNoteFor, holeNotes), 521-551 (DB.Prompt, DB.Tools, HoleError), 583-662 (RequestsHoleCause, LostRecordsHole, TailLostHole, EventsLostHole), 675-722 (MessagesLostHole, the counted reasons), 743-751 (contentHole)
  - 'obsdb/asof.go:33-55 (ErrStepMessages, StepMessagesError: MessagesAsOf''s and AssembleStep''s refusal), 109 (AssembleStep)'
  - studio/web/src/styles.css:75, 135 (--ev-error, mustard in light and dark)
  - studio/web/src/lib/palette.ts:30, 51 (warn, the same two colours)
  - studio/preview.go:302-305 (the preview's 409 without a badge)
  - studio/fixtures.go:340-342, 613-618 (fixtures' 409 with the hole as badge)
  - studio/testdata/holes.golden.json (the closed table's words, golden)
  - studio/web/src/lib/honesty.ts:437-445 (usageKnown, USAGE_AT_FINISH); studio/web/src/components/studio/subagent-block.tsx:218-222; studio/web/src/panel/element.ts:7850-7856
  - studio/web/src/lib/error-kind.ts:243-259 (REPAIRED_RESULT, synthesised by Repair); studio/web/src/lib/compaction.ts:151-153 (the prefix on a request message line)
  - CHANGELOG.md:347 (the Repair badge; 'never in the panel' means its call rows)
  - studio/web/src/panel/request.ts:28, 271 (the panel's Request tab shows it)
  - 'studio/web/src/lib/honesty.ts:30-37 (tones, the queue fix), 113-180 (HOLES: labels and tones), 185-266 (CAUSES), 42-96 (HoleMark, contentHoles, mergeHoles, labels), 278-376 (derived, row and status holes, settling)'
  - studio/web/src/components/studio/hole-badge.tsx:29-134 (HoleBadge, the tone outlines)
  - studio/web/src/panel/badges.ts:1-9 (drawn here only), 74-85 (badge, data-hole, holeLine), 85-155 (the footer content line), 411-462 (cost words)
  - studio/web/src/panel/styles.ts:232-242 (the panel's badge, tag and note colours)
  - studio/web/src/lib/cost.ts:77-113, 603-624 (cache hint, the unknown dash, scripted words, formatUSD), 138-453 (the unpriced line, cost sort note, at-least totals)
  - studio/web/src/lib/delegation.ts:20-44 (the children chips)
  - studio/web/src/lib/error-kind.ts:383-458 (the problem glyphs, ≥ when logs_capped)
  - studio/web/src/lib/stepdiff.ts:57-64, 202-245 (diff cell words and marks)
  - studio/web/src/lib/title.ts:161 (content not captured)
  - studio/steps.go:239-312 (stepHole, holeSet), 813-815, 1026-1028, 1127-1129, 1142-1143 (derived step marks), 1247-1254 (a step's compacted reason)
  - studio/api.go:1718-1795 (the run document's holes), 2018-2026 (a hidden view), 2088-2166 (tree holes, treeHole)
  - studio/requests.go:40-44 (badgeFields), 98-110 (raw_badge), 192-202 (the hidden refusal)
  - studio/export.go:325-340 (refuseHidden), 765-851 (export holes)
  - studio/auth.go:386-428 (hidden child holes)
  - studio/logs.go:105-127, 198-232 (log holes)
  - studio/traces.go:186-198 (a trace's missing root)
  - studio/pricing.go:407, 426-480, 521-581, 1015-1032 (cost badges, cache, reasons)
  - docs/record-contract.md:1554-1580 (§7 Badges)
  - studio/README.md:652-654 (redacted comes only from a non-weft writer)
  - CHANGELOG.md:2949-2956 (obsdb.Hole and its ten constants, 0.10.0)
  - 'observed: weft studio built from the v0.17.0 worktree on a scratch database of scripted runs; the JSON blocks are captured responses'
---

# Badges and holes

A **hole** is Studio's word for a place where a record is missing, cut, withheld or computed rather than stored. Holes come from one closed table of ten, [`obsdb.Hole`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#Hole) (ADR 0028 §11), and Studio, the devtools panel and the JSON API draw each one as a **badge** with a reason and, where one exists, a fix. A hole may carry a cause that sharpens its words. This page lists every hole, every cause, the run-level rules from the record contract, the cost badges and the other words the UIs draw. [Read a run in Studio](https://weftgo.dev/docs/observe/studio/run-page/) shows them in place.

A read-scoped panel token asking for a run's request records gets a hole as its refusal (captured; the long words are the table's):

```json
{
  "error": { "code": "forbidden", "message": "the request record carries the system prompt and the tool catalog: a read-scoped panel token does not read it" },
  "badge": "hidden",
  "reason": "your token's access does not reach this: a read-only panel token reads no system prompt or tool catalog",
  "fix": "use a playground token"
}
```

<span id="hole"></span><span id="holes"></span>
## The ten holes

[`obsdb.Holes()`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#Holes) returns them in this order, which is also the order every surface lists them in. The words are `obsdb.HoleNote`'s, copied into `studio/testdata/holes.golden.json` and the web app's `lib/honesty.ts`, which tests hold equal. A **note** tone means withheld, inferred or by design; a **loss** tone means something was lost or cut. `obsdb.Hole` and its ten constants arrived in 0.10.0.

| Hole | Constant | Tone | Label drawn | Reason | Fix |
|---|---|---|---|---|---|
| <span id="holetruncated"></span>`truncated` | [`HoleTruncated`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleTruncated) | loss | `truncated`; with a byte count and no cause, `shortened by the recorder: <n> cut` | a destination's size cap cut this content before it was stored (`weft.content.truncated_bytes`) | raise the destination's cap: `otel.Content(otel.ContentConfig{MaxBytes: …})`, -1 for unlimited |
| <span id="holestripped"></span>`stripped` | [`HoleStripped`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleStripped) | note | `content not captured by this app` | content not captured by this app: the destination stripped it (`weft.content = stripped`) or the agent captured none (`weft.Content(false)`, `weft.content = none`): prompts, catalogs, messages, tool arguments and results were dropped before storage | turn content on: drop `otel.NoContent()` from the destination, or `weft.Content(false)` from the agent |
| <span id="holeredacted"></span>`redacted` | [`HoleRedacted`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleRedacted) | note | `redacted` | the destination's Redact hook rewrote this content before it was stored | none. Reserved: weft's pipeline does not mark a redaction, and no Go reader sends it; the UIs badge it only from a non-weft writer's `weft.content = redacted` |
| <span id="holemaxtokens"></span>`max_tokens` | [`HoleMaxTokens`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleMaxTokens) | loss | `max_tokens` | the step finished on the output token limit: the response was cut | raise max_tokens: `weft.Params(weft.RequestParams{MaxTokens: …})` |
| <span id="holeinterrupted"></span>`interrupted` | [`HoleInterrupted`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleInterrupted) | loss | `interrupted` | the run stopped reporting: no finish arrived and nothing was heard from it for over 30 s | none |
| <span id="holegap"></span>`gap` | [`HoleGap`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleGap) | loss | `gap` | a record the run counts is missing: a destination dropped it on the way | the queue fix: raise the destination's queue, `otel.QueueSize(n)` (Studio's default 16,384), or `otel.Blocking()` under `WEFT_ENV=dev` (or `otel.DevMode()`); the app's WARN "weft/otel: destination queue full" names it, `weft doctor` the drops (`weft.records.dropped`) |
| <span id="holenotrecorded"></span>`not_recorded` | [`HoleNotRecorded`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleNotRecorded) | note | `not recorded`; a request pane reads `request not recorded by weft v0.9.0 or earlier` | the weft that wrote this run kept no such record (v0.9.0 or earlier keeps no request, prompt or tools records, ADR 0028): nothing was lost | upgrade weft and re-run |
| <span id="holederived"></span>`derived` | [`HoleDerived`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleDerived) | note | `derived` | computed by the reader, not stored as emitted: the record that would say it is absent | none |
| <span id="holehidden"></span>`hidden` | [`HoleHidden`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleHidden) | note | `hidden by your token's access`; with a count, ` · N child runs` | your token's access does not reach this: a read-only panel token reads no system prompt or tool catalog | use a playground token |
| <span id="holecompacted"></span>`compacted` | [`HoleCompacted`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleCompacted) | note | `compacted` | the model saw a compacted view: compaction replaced part of the transcript for this request. A step document says "a PrepareStep replaced part of the transcript for this step's request" | open the compaction record |

A hole name the table does not know is drawn verbatim with the loss tone. Both surfaces draw loss in the same mustard, never red: `--ev-error` in Studio (with a 40% border) and `--weft-warn` in the panel, `#875c04` light and `#e3b341` dark. A note-toned badge is a neutral outline in Studio (`border-border text-muted-foreground`) and a dim tag in the panel (`.weft-tag`).

### Where each hole appears

| Hole | Raised on |
|---|---|
| `truncated` | An event, prompt or catalog a destination cut (step cards, the export). A tool result past its cap (`result_cap`), and a run whose metadata was dropped (`metadata_cap`, the run document). The logs page past 10,000 lines (`log_cap`); a response past its read cap (`response_cap`: the span tree past 10,000 spans, a diff past 500 steps, an export tree past 200 runs) |
| `stripped` | A run whose first event is marked `stripped` or `none` (the run document); a step's request, messages and tool calls; a transcript that cannot rebuild for lack of messages (409 on `transcript?step=` and `wefttest` exports); a missing prompt or catalog of a content-off run |
| `redacted` | Only where the UIs read a raw `weft.content = redacted` mark |
| `max_tokens` | A step that stopped on the output limit, and its tool calls, none of which ran ("call never executed"); the run header from `stop_reason`; the export's run-level holes; a diff side's marks |
| `interrupted` | The run document, step documents and the header, from the read-time status |
| `gap` | Lost records (causes below); missing event positions; a step with no request record or chat span; a log line naming an unstored span; a trace whose root span never arrived (`root: null`, `badge: "gap"` on `/api/traces`) |
| `not_recorded` | A run written before ADR 0028 (`requests_badge`); a batch with no step stamped; a request with no wire bodies (`raw_badge`); the logs route with no slog bridge, the fix naming `otel.Slog()`; a run with no spans; a session with no public id |
| `derived` | A run built from stock OTel GenAI spans (`derived: true`, `requests_badge: "derived"`): every block of it, and 400 refusals to replay or fixture it; a batch whose `input` flag was inferred; messages no request record placed; an attempt joined by time; a replay whose prefix view is unknown (`weft.replay.view`). On a step: a chat span counting more tool calls than the step lists, a requested model inferred from the run's, a request record with no attempt number (listed by its request index, or joined to the attempt the spans time) |
| `hidden` | A read token's view of a system prompt, catalog or compaction-view messages (inside a 200). Its 403s on requests, tools, logs, manifests, `otlp` and `wefttest` exports and fixtures; a panel token's child runs, tree descendants and export subtrees outside its public id, counted, never named; every panel token's session-to-public-id lookup |
| `compacted` | A step whose request saw a compaction view (its `compaction` block and `messages_in`); the export when the run holds a run-scope view; a diff side's marks |

<span id="holecause"></span><span id="holecauses"></span>
## Causes

[`obsdb.HoleCause`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleCause) names why a hole was raised when the hole's own words are too general. [`obsdb.HoleCauses()`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleCauses) lists the fourteen below; [`obsdb.HoleNoteFor`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleNoteFor) returns a cause's words, falling back to the hole's. A tree hole (`spans?tree=1`, an export's `subagent_holes`) carries a `cause` field; run and step holes carry only the cause's words.

| Cause | Constant | Hole | Raised when | Reason | Fix |
|---|---|---|---|---|---|
| <span id="causedefault"></span>`""` | [`CauseDefault`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseDefault) | any | No sharper cause | the hole's own reason | the hole's own fix |
| <span id="causenospans"></span>`no_spans` | [`CauseNoSpans`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseNoSpans) | `not_recorded` | The run's records arrived and no span did; in a run tree, finished child runs with a row and no span | the run was recorded without a tracer: no attempt spans, no answering model | install a tracer (`otel.Install` records spans) |
| <span id="causeresultcap"></span>`result_cap` | [`CauseResultCap`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseResultCap) | `truncated` | The core's tool-result cap cut the content before any destination saw it | a tool result was cut by its result cap: the model saw a prefix and the marker | raise the tool's `weft.MaxResultBytes` |
| <span id="causelogcap"></span>`log_cap` | [`CauseLogCap`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseLogCap) | `truncated` | The app-log reader scanned its 10,000 candidates (`obsdb.MaxLogCandidates`) before attributing lines | the app-log reader's cap was reached before attribution: later lines of this run may be missing | log less in the run's trace (a busy subagent or sibling run counts too) |
| <span id="causenopublicid"></span>`no_public_id` | [`CauseNoPublicID`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseNoPublicID) | `not_recorded` | `GET /api/sessions/{id}/public_id` on a session whose turns carry none | the session's turns carry no `weft.public_id` (a thread session is created without `thread.PublicID`) | `thread.Create(…, thread.PublicID(id))`, or set `weft.public_id` on every turn |
| <span id="causedevtokenonly"></span>`dev_token_only` | [`CauseDevTokenOnly`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseDevTokenOnly) | `hidden` | A panel token asked a route that answers the dev token only | a panel token reads its one public id, never a session's: this route answers the dev token only | ask with the server (dev) token, or use the public id the panel token was minted for |
| <span id="causenotserved"></span>`not_served` | [`CauseNotServed`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseNotServed) | `not_recorded` | The panel asked a Studio with no `requests` capability | this Studio does not serve the request record (no requests capability): the run may hold one | use a Studio that serves it (upgrade it, or enable the requests group) |
| <span id="causeresponsecap"></span>`response_cap` | [`CauseResponseCap`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseResponseCap) | `truncated` | A route reads at most so much in one response; nothing was lost | the run has more steps than this response reads: the later ones were not compared, nothing was lost (each route states its own cap) | open the later steps one by one (`runs/{id}/steps/{n}`) |
| <span id="causerawoff"></span>`raw_off` | [`CauseRawOff`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseRawOff) | `not_recorded` | An attempt has no wire record (ADR 0028 §12); `raw_badge` on `/requests` rows | no wire bodies recorded for this attempt: `otel.RawBodies` is off (the default; refused outside `WEFT_ENV=dev` or `otel.DevMode()`) or the adapter does not report them | run under `WEFT_ENV=dev` (or `otel.DevMode()`) with `otel.RawBodies(true)` and a first-party adapter (an injected google client is not captured) |
| <span id="causestockspans"></span>`stock_spans` | [`CauseStockSpans`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseStockSpans) | `derived` | The run was built from stock OTel GenAI spans (record contract §9) | derived from spans · no events | stock OTel GenAI spans carry no weft events or request records: set `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true` for the messages and tool arguments (Studio reads them from the span attributes) and `gen_ai.conversation.id` on the `invoke_agent` span for a session; weft's own records need a weft SDK (Go today) |
| <span id="causenologger"></span>`no_logger` | [`CauseNoLogger`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseNoLogger) | `not_recorded` | A weft run's spans were stored and none of its records, and its root says none were emitted | the app exported spans only: they arrived, none of its records did — no events, transcript or request records | wire the logs too: pass `weft.LoggerProvider(lp)` beside `weft.TracerProvider`, or use `otel.Install` (it wires both) |
| <span id="causetaillost"></span>`tail_lost` | [`CauseTailLost`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseTailLost) | `gap` | The root span is stored and reads succeeded, events are stored and `run_finish` is not, and the root carries no event count | the run's root span ended but its run_finish record never arrived: a destination dropped the record tail, so the last steps' records are missing | the queue fix |
| <span id="causeeventslost"></span>`events_lost` | [`CauseEventsLost`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseEventsLost) | `gap` | The root's `weft.run.events` says M were emitted and fewer were stored; replaces `tail_lost` and `no_logger` wherever the root carries the count | more event records were emitted than stored (`weft.run.events` on the root span): a destination dropped them, its queue full or an export failed. Counted: "N of M events were lost", with how many are the run's tail | the queue fix |
| <span id="causemessageslost"></span>`messages_lost` | [`CauseMessagesLost`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseMessagesLost) | `gap` | The root's `weft.run.messages` says N were emitted and some, but fewer, were stored. None stored is never called lost: it reads like content off | more transcript batches were emitted than stored (`weft.run.messages` on the root span): a destination dropped them, its queue full or an export failed — messages are missing. Counted: "K of N transcript batches were lost: …" | the queue fix |
| <span id="causemetadatacap"></span>`metadata_cap` | [`CauseMetadataCap`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#CauseMetadataCap) | `truncated` | The core dropped metadata pairs over its limits, whole, never cut (`weft.metadata.dropped`) | metadata pairs over the core's limits were dropped whole. Counted (`obsdb.MetadataCapReason`): "N metadata pairs dropped (limit 64 keys, 128-byte keys, 1 KiB values): no span or record of the run carries them" | send fewer or smaller pairs (`weft.Metadata`: 64 keys, 128-byte keys, 1 KiB values) |

The five other holes (`stripped`, `redacted`, `max_tokens`, `interrupted`, `compacted`) have no cause.

<span id="record-badges"></span>
## Run-level badges

[The record contract §7](https://weftgo.dev/docs/reference/record-contract/) states when a reader puts each badge on a whole run. These are the rules the export's and the fixtures' `holes` follow. `GET /api/runs/{id}` raises the counted ones, `interrupted`, `stripped`, `derived`, `not_recorded` and `truncated` with cause `metadata_cap`; `max_tokens`, a cut event and `compacted` it leaves to the step or event they belong to, and the run header adds `max_tokens` and `interrupted` itself.

| Badge | On a run when |
|---|---|
| `not_recorded` | `instructions_hash` is `""` and `request_count` is 0: written before ADR 0028, no request, prompt or tools records exist (`requests_badge`) |
| `interrupted` | The read-time status is `interrupted` |
| `max_tokens` | `stop_reason` is `max_tokens` |
| `stripped` | An event record is marked `stripped` or `none` |
| `truncated` | An event record carries `weft.content.truncated_bytes` > 0 |
| `truncated`, `metadata_cap` | The root span carries `weft.metadata.dropped` > 0 |
| `gap` | The event counter has a hole below its high-water mark; when the root carries `weft.run.events`, Studio folds this into `events_lost`'s words |
| `gap`, `events_lost` / `messages_lost` / `tail_lost` | As in [Causes](#holecause); raised only once the run stopped settling |
| `compacted` | The run holds a run-scope view (`weft.messages.reason = compacted`) |
| `derived` | The run was built from stock spans: that run's alone, never a weft run whose records are missing |
| `not_recorded` (logs route only) | The root span is stored without `weft.logs.bridged` and no app log line is attributed to the run: a hint beside the empty page, the fix naming `otel.Slog()`; never on a derived run |
| `not_recorded`, `no_logger` | A weft run (not derived, not running) whose spans are stored and no record, whose root says none were emitted |

`redacted` is reserved, and `hidden` is decided by the reader's scope, not by the data.

## Wire shapes

| Shape | Fields | Where |
|---|---|---|
| Hole | `{hole, reason, fix?, count?}` | `holes` on a run document, its `children`, a step, a diff and its sides, the logs page, an export |
| Tree hole | `{hole, cause?, reason, fix?, runs?, count?}` | `spans?tree=1`'s `holes`, an export's `subagent_holes` |
| Inline badge | `{badge?, reason?, fix?}` | A block that is itself missing: a step's `request`, `messages_in`, the transcript, tools and requests pages, a trace row, and every 403, 409 and 400 refusal about a hole |
| One word | `requests_badge`, a batch's `badge`, a missing prompt's or catalog's `{hash, badge}`, an attempt's and a tool call's `badge`, `attempts_badge`, the preview's `system_badge`, `messages_badge`, `tools_badge` | Beside the value it qualifies |
| Raw | `raw: null`, `raw_badge: "not_recorded"`, `raw_reason`, `raw_fix` | Each `/requests` row without wire bodies |

A hole never goes out without a reason. `fix` is absent where no fix applies: `redacted`, `interrupted`, and `derived` without a cause (a derived run's hole carries `stock_spans`' fix). `count` is set on a `hidden` hole for child runs, and on a tree's `not_recorded` with its first 100 run ids in `runs`. The UIs merge marks of one hole into one badge with the first one's words, summing a truncation's bytes, and sort them in table order. In the panel, every badge is a `<span data-hole="…">` whose `title` is "reason — fix: fix" and whose screen-reader text repeats both; badges are drawn by `src/panel/badges.ts` and nowhere else.

## Go types

| Symbol | What it is |
|---|---|
| [`obsdb.Hole`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#Hole), [`obsdb.Holes`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#Holes) | The hole type and the ten values in table order |
| [`obsdb.HoleCause`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleCause), [`obsdb.HoleCauses`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleCauses) | The cause type and the fourteen named causes |
| [`obsdb.HoleNote`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleNote), [`obsdb.HoleNoteFor`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleNoteFor) | A hole's reason and fix; a cause's, falling back to the hole's |

<span id="holeerror"></span>
### `obsdb.HoleError`

[`obsdb.HoleError`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#HoleError) is the error `DB.Prompt`, `DB.Tools` and `DB.OtherLogs` return when a record is absent, with the hole that says why.

| Member | Meaning |
|---|---|
| `Kind` | `prompt`, `tools` or `logs` |
| `Hash` | The prompt or catalog hash asked for; empty for logs |
| `Hole` | `not_recorded` (written before ADR 0028, or logs of a run with no span), `stripped` (a content-off chain) or `gap` (the request names the hash and the record is absent) |
| `Error()` | `obsdb: not found: <kind> <hash> (<hole>)`, or without a hash `obsdb: not found: <kind> (<hole>)` (`obsdb: not found: logs (not_recorded)`) |
| `Is(target)` | True for `obsdb.ErrNotFound`, so `errors.Is(err, obsdb.ErrNotFound)` matches |

<span id="stepmessageserror"></span>
### `obsdb.StepMessagesError`

[`obsdb.StepMessagesError`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb#StepMessagesError) is the error `obsdb.MessagesAsOf` and `obsdb.AssembleStep` return when a step's messages do not rebuild from the records. `Step` is the step, `Hole` is `gap` (a named record is missing or does not fit) or `stripped` (no messages stored at all), and `Msg` says which. `Error()` reads `obsdb: step <n>: <msg>`; `Is(target)` matches `obsdb.ErrStepMessages`. Studio answers it as 409 with the hole as the badge on `transcript?step=N` and fixtures; the preview answers 409 with the message only. A reader badges the hole and never guesses.

<span id="cost-badges"></span>
## Cost badges

Cost is priced at read time ([Cost](https://weftgo.dev/docs/observe/studio/cost/)). A run row carries these; they are not holes, but the UIs draw them the same way.

| Value | Field | Means | Drawn as |
|---|---|---|---|
| `unpriced` | `cost_badge` | No pricing row matches the model; `cost_reason` is `<provider>/<model> has no price` or `the run reported no model to price` | `—`, the reason as its title; pages say once "N runs unpriced: no row for …" with a link prefilling a row in Settings |
| `unknown` | `cost_badge` | The figure could not be computed: `running: usage arrives at run end`, `the run's end (run_finish or its invoke_agent span) never arrived: its usage is not recorded`, stock spans reporting no usage, or children that could not be read | `—`, the reason as its title |
| `scripted` | `cost_badge` | A scripted model no row matches (`wefttest`, `weft/runtime/scripted`): an exact 0, `cost_known: true`, `a scripted model: nothing bills it, an exact $0` | `$0 · scripted` |
| `exact` | `cache` | The adapter reported cache splits | — |
| `not_reported` | `cache` | No cache split: every input token priced at the input rate; `cost_reason` adds `no cache split reported; a cached prompt may be overstated` | `cache not reported` |

`cost_usd` is `null` when not known, never 0. Delegated cost carries no badge on the wire; its reason sums the children ("2 of 3 child runs unpriced: no price for …"). A total with an unknown part reads `≥ $x · k of n runs priced`; `unpriced_models` lists at most five, then `(+n)`.

## Other words

| Word | Where | Means |
|---|---|---|
| `settling` | A run row's `settling: true`; a panel chip | The root span is stored and the last records may still arrive (up to 30 s): the story can stop short until they land |
| `⑂ ?` | Runs list | `children_unknown`: the child runs could not be read with the row |
| `≥` on `E` / `W` | Run header's problem glyphs | `logs_capped`: the warning and error counts are floors |
| `not comparable` | Compare | A side did not record this column (its holes say why): the two were not compared |
| `(content not captured)` | Run titles | The prompt was not recorded (content off) |
| `spans not reported yet` | The run tree | A running run's step or call that no span covers yet |
| `usage at finish` | A running child run's usage, in the story's subagent block and the panel | The record sets usage only when a run ends, so a running child's zeros are not yet known |
| `[synthesised by Repair]` | The Request pane's message lines | A tool result [`weft.Repair`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2#Repair) wrote (`no result recorded: the call was interrupted`) for a call whose result never arrived: no tool ran. Matched on the text; never on story call rows or the panel's call rows |
| `app-owned turn · read-only` | Panel and run page verbs | A refusal, not a hole: the app's own turn, with the fix the API's 403 carries |

The footer of the panel states the run's content in one line: `content off · <why>`, `content on · N events shortened (<n> cut)`, or `content on`.

## See also

- [Read a run in Studio](https://weftgo.dev/docs/observe/studio/run-page/)
- [Studio HTTP API](https://weftgo.dev/docs/reference/studio-api/)
- [The record contract](https://weftgo.dev/docs/reference/record-contract/)
- [Control what content leaves the process](https://weftgo.dev/docs/production/content-and-privacy/)
- [Glossary: hole](https://weftgo.dev/docs/reference/glossary/#hole)

Package: [`weft/obsdb`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/obsdb)
