View verbs
kraft view reads work items without changing them. Wherever a command takes an ID, you can omit it inside that item's worktree. Every verb here accepts --json; the exceptions are in Output format.
Verbs at a glance
| Verb | What it does |
|---|---|
view list | The board, scoped to the repo you are in. |
view show | One work item in full. |
view search | Searches specs, plans and session summaries. |
view logs | A worker session's log. |
view events | The item's node transitions, gate decisions and escalations. |
view watch | A live board, redrawn on every event. |
view diff | What the agent changed. |
view docs | Documents linked to the item, and the spec or plan it was filed with. |
view doc | Prints one document, or opens it in an editor. |
view artifact | The document the pending gate is about. |
view threads | Review threads on the item, drafts marked. |
view compare | Diffs two review targets, such as two attempts. |
view mr, pipelines, jobs, job-log, merged, labels | The item's merge request, CI and project labels, as the forge has them. Added in 2.5 |
view storage | What worktrees use against the disk quota and limit. Added in 2.1 |
Reading the board
view list
kraft view list [flags]
The board, scoped to the repo you are in.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--all | switch | off | Spans every repo, ignoring where you stand. |
--repo | path | the repo you are standing in | Picks one repo. |
--status | stored or displayed status | every status but abandoned | A stored status, such as needs_human, or a displayed one, such as failed. A word both have means the stored status; needs you may be typed needs_you. |
--include-abandoned | switch | off | Adds abandoned items, cancelled ones included. |
What view list prints
view list prints one line per item, with the columns ID, STATUS, GATE, NODE and TITLE. GATE is the gate the item waits at, and NODE the node it is on, with 3/6 after it while the item reports its progress through a plan (task 3 of 6). An empty cell reads -, and the last column is cut with … to fit the terminal. With no items, it prints (nothing).
STATUS is the item's displayed status, the word the web board and the console show, with _ printed as a space (needs you). --json carries it as display_status, beside the stored status. --status takes either word, and a word both have, such as waiting, means the stored status: a rate-limited item shows waiting but isn't listed by --status waiting. Type needs you with its space or as needs_you.
ID STATUS GATE NODE TITLE
3f9c1e7a5b2d4c80a6e1d97f0b34c2aa needs you spec_approval spec_approval Fix flaky retry
b81d0c42e6a94f3d8c5a7e19f2046b13 running - implementation 3/6 Add JSON export
07ae5d3c91b84e26a4f8c0d1e7b352f9 paused - - Bump the lockfile
A sliced item's STATUS ends with (slices: 2 done, 1 needs you), and each of its slices follows it, indented, with the slice's status, node and cost in the TITLE column. --status lists a parent whose slice matches with just the slices that match.
ID STATUS GATE NODE TITLE
8c2f4a1d9e3b4750b6a8d0c1e7f92b34 needs you (slices: 1 done, 1 needs…) - slices Add the cache
5d1e7a0c3b924f68a1c4e9d2b7058f13 done - verification $0.42 Add the cache · slice 1: Reads
e90b3c5d7a114e28b0f6c2a8d4713e59 needs you - implementation $0.18 Add the cache · slice 2: Writes
view list --json carries display_status on every row, and slices and children on a parent's row.
view show
kraft view show [flags] [ID]
One work item in full. With no ID, the one whose worktree you are in, or the in-place item whose branch your checkout is on. It takes no flags.
What view show prints
view show prints one key value line for each of these fields the item has, and None for one with no value. dependencies lists the items it comes after as ID (status), or none. --json prints the item's full detail instead.
queued says which start the item waits to make and since when. When no busy slot holds it, it also says why: waiting for the checkout: “<title>” is using it for an in-place item, or held by the worktree storage limit: 12G counted against the 10G limit.
id 3f9c1e7a5b2d4c80a6e1d97f0b34c2aa
title Fix flaky retry
...
repo /Users/you/code/app
status needs_human
display_status needs you
current_node_id spec_approval
pending_gate spec_approval
gate_artifact items/3f9c1e7a5b2d4c80a6e1d97f0b34c2aa/docs/spec.md
...
next_node_id plan
| Field | Meaning |
|---|---|
id, title, description, repo, bead_id | What the item is and where it lives. |
status, display_status, current_node_id, next_node_id | Where it stands: its stored status, its displayed status as view list prints it, the node it is on, and the node after. |
pending_gate, gate_artifact | The gate it waits at, and the name of the document that gate is about: items/<id>/docs/<kind>.md under Kraft's run/ folder, or .engineering/<kind>s/<id>.md in the worktree for one written before Kraft kept one folder per item. kraft view artifact prints it. |
worktree_path | Where its worktree is. |
attachments | The spec or plan it was filed with, and what each trimmed. |
progress | Where the implementer is in its plan, such as "3 of 6", when it is on that node. |
usage | What the item has spent. See below. |
policy_override | The item's own policy override, only when it has one. |
concerns | What a task flagged about its own work when it finished, since the last gate that was decided. Only when there is one. |
chain | On an item filed with a one-off chain, after status: one-off, extends <chain> when it extends one, then awaiting review, approved by <who> (<door>) <when> or library-only, joined by ·. Added in 2.5 |
in_place | yes on an item that runs in place; absent on any other. Added in 2.1 |
stop_kind | On a stopped item, the kind of stop, such as gate, cap or checkout. Added in 2.1 |
stop_reason, suggested_action | On a stopped item, why it stopped, and the one command the chain proposes. |
slices, children, slice_of | On a sliced parent, its slices by state, then one line per slice: key, ID, displayed status (as view list prints it), node, cost and title. On a slice, its parent's ID and its key. Added in 2.6 |
next | On a stop on a dollar cap the item can raise, and with no suggested_action: kraft item raise-budget ID --usd N, the command behind the board's Raise cap. |
usage lists uncached input, cache writes, cache reads and output tokens, then cost. A session recorded before cache tokens were split out has a single input figure, counted under in, and the line says (cache not split on older sessions). A token_budget counts all four kinds.
A session reports its output tokens when it ends, and one that was paused or killed never does. While a session's count is missing, the line reads at least N out, or out not known when no session has reported one.
The cap next names is the item's own, or its policy's item-wide budget_usd. A stop on a cap raise-budget doesn't take adds no next line.
view search
kraft view search [flags] QUERY
Searches the document index: specs, plans and session summaries.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--limit | integer | 20 | Caps the result count. |
Following a running item
view logs
kraft view logs [flags] [ID]
view logs reads the newest session's log. While the item is stopped, it reads the log of the session that stopped it instead, such as the failed test command. It then names the newest session on stderr, such as the auto-escalation that started after the stop.
| Flag | Type | Default | Meaning |
|---|---|---|---|
-f, --follow | switch | off | Follows the newest session until it stops. While the item is stopped, stderr names the session that stopped it. |
-n | integer | 50 | Sets the backlog lines shown first. |
--session | session ID | the newest; while the item is stopped and with no -f, the one that stopped it | Reads that session of the item. |
--agent | sub-agent ID or main | every agent | Shows only that Claude Code sub-agent's lines, or main for the main agent's. Applied before -n; output that isn't JSON stays. Added in 2.6 |
-n 0 -f prints only lines written after it starts.
A session ID is unique only within its work item, so --session reads the session of the item you name, or of the worktree you are in. With neither, it asks for the session by its ID alone, which works only when one session has that ID: Kraft otherwise answers 404 and names the item's route. When view logs names another session on stderr, it prints the whole command, kraft view logs <item> --session <id>.
view events
kraft view events [flags] [ID]
Node transitions, gate decisions and escalations.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--after | integer | 0 | Shows only events after that sequence number. |
--type | event type | every type | Filters by type; see Events for every type. |
-f, --follow | switch | off | Streams until the item completes or is abandoned; with --json, every event is one line of NDJSON. |
view watch
kraft view watch [flags]
A live board, redrawn on every event. Needs a terminal. It takes no --json.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--repo | path | the repo you are standing in | Picks the repo. |
Reviewing before you approve
view diff
kraft view diff [flags] [ID]
The coloured diff, through $PAGER. For an in-place item, its branch's commits only, never your uncommitted or untracked files.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--stat | switch | off | Size of the change: per-file counts only. |
--name-only | switch | off | Changed and untracked paths. |
-w, --ignore-whitespace | switch | off | Leaves out files whose only change is whitespace. |
--no-pager | switch | off | Prints straight to the terminal. |
What the diff shows
Once an item has commits, view diff and view diff --stat show two blocks.
The change under review is every commit on the item's branch since its
base, the spec and plan documents included. Uncommitted is what an agent
left in the worktree without committing; Kraft commits after every task, so it
is usually empty and reads "(nothing uncommitted)". An item with no commits
yet shows one block.
A truncated diff always says so on its last line. Files the agent wrote
without git add are listed separately, because a unified diff doesn't show
them.
view docs
kraft view docs [flags] [ID]
Specs, plans and summaries linked to the item, including the spec or plan it was filed with.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--attachment | spec or plan | none | Shows the spec or plan as Kraft stored it at filing, which is what its worktree gets. It is the only way to read the document before the item starts. |
--json | switch | off | Prints the same list; with --attachment, prints its path, title and content. |
--no-pager | switch | off | With --attachment, prints straight to the terminal. |
A document the index doesn't hold yet is listed as attachment:<id>:spec (or :plan). Kraft reads it from the item's worktree, or, before the item starts, from the copy stored at filing. kraft view doc takes that ID.
The document a pending gate is about is listed as gate:<id>:<gate> until approval indexes it. It is read from disk and isn't searchable until then, because it is still a draft. kraft view doc takes that ID too.
view doc
kraft view doc [flags] ID
Prints one document, or opens it in an editor.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--open | optional editor: code, cursor, zed, obsidian or system | not opened; with no editor named, the Default editor in Settings, else KRAFT_EDITOR, else the OS opener | Opens the document in an editor on the server's machine. system is the OS opener. |
--no-pager | switch | off | Prints straight to the terminal. |
| Refusal | Cause |
|---|---|
409 naming view docs --attachment | An attachment: ID opens only once the item has started and has a worktree. |
view artifact
kraft view artifact [flags] [ID]
The document the pending gate is about.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--no-pager | switch | off | Prints straight to the terminal. |
Reading the forge
Added in 2.5
A step reads its item's merge request and CI through these verbs, never through gh or glab, and holds no forge login to do it. The server derives the project and the merge request from the item.
Each verb takes [ID] and --repo MOUNT, a workspace member's mount path. status is the forge's own word. A workspace item reads its root repository; --repo MOUNT reads the member mounted there. A rate limit answers 429, and an unusable forge 502.
In a sandboxed worker the same verbs print the JSON payload. Ids come from view pipelines and view jobs.
view mr
kraft view mr [flags] [ID]
The merge request: !N title [state] labels url. Refused with 404 until the item has one. It takes only --repo.
view pipelines
kraft view pipelines [flags] [ID]
One line each: id kind status ref url. kind is branch, merge_request, train or merge_group. The newest 20 only (GitHub: 20 branch runs and 20 merge-queue runs): jobs and job-log answer 404 for an older one. It takes only --repo.
view jobs
kraft view jobs [flags] [ID]
The jobs of one of the item's pipelines, one line each. The first 100 only: a job past them answers 404.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--pipeline | pipeline ID | none given: required | A pipeline ID from view pipelines. |
--repo | mount path | the root repository | Reads that workspace member. |
view job-log
kraft view job-log [flags] [ID]
The last lines of one job's log, colour codes removed.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--pipeline | pipeline ID | none given: required | A pipeline ID from view pipelines. |
--job | job ID | none given: required | A job ID from view jobs. |
-n, --lines | integer, 1 to 5000 | 200 | How many lines from the end. |
--repo | mount path | the root repository | Reads that workspace member. |
view merged
kraft view merged [flags] [ID]
The latest merged merge requests into the base branch.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--limit | integer, 1 to 100 | 20 | How many. |
--repo | mount path | the root repository | Reads that workspace member. |
view labels
kraft view labels [flags] [ID]
The project's labels. It takes only --repo.
Reviewing threads and comparing attempts
view threads
kraft view threads [flags] [ID]
Review threads on the item, drafts marked.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--open | switch | off | Drops resolved ones. |
Each line range carries its side as the diff marks it:
calc.py:+8is new line 8.calc.py:-3 to -4is old lines 3 to 4.calc.py:-2 to +2is a removed line through its replacement.
view compare
kraft view compare [flags] [ID]
Diffs two review targets, such as two attempts. With neither --from nor --to it shows the whole change so far.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--from | base, attempt:N, last_review or latest | base | Where the diff starts. latest is the working tree; attempt:N needs a pending gate. |
--to | base, attempt:N, last_review or latest | latest | Where the diff ends. |
--nodes | node IDs, comma-separated | every node | Limits it to files those node IDs touched. |
--stat, --name-only, -w | switch | off | Mirror view diff. |
--no-pager | switch | off | Prints straight to the terminal. |
--json | switch | off | Each file also carries viewed. |
The size of the change between two attempts:
kraft view compare --from attempt:1 --to attempt:2 --stat
base and latest resolve at any time. last_review needs a review you have already submitted, and attempt:N needs a pending gate. latest can only be the --to end.
Worktree disk use
Added in 2.1
view storage
kraft view storage [flags]
It takes no flags but --json.
view storage prints what the worktrees use against the quota and limit, the totals per category, and one line per item, largest first, with its title, status, size, documents, step outputs and age. A finished item that archiving would free is marked yes under RECLAIMABLE. A folder that belongs to no item reads orphan. It exits 0 in every state, held included: it is a read.
SIZE is the item's worktree and sandbox home, which archiving frees. DOCUMENTS is its docs/ and session summaries, which count toward the quota, and which archiving keeps and abandoning removes. Since archiving can't free them, they never hold a start on their own. OUTPUTS is the step outputs its tasks left for later tasks: they count toward the quota, and archiving frees them with the worktree.
worktrees 12G of 10G (held)
quota 8G
reclaimable 9.1G
measured 4m ago
CATEGORY SIZE
worktrees 11.5G
...
ID STATUS SIZE DOCUMENTS OUTPUTS AGE RECLAIMABLE TITLE
3f9c1e7a completed 4.2G 12K 2M 3d ago yes Fix flaky retry
b81d0c42 active 1.1G - - 2h ago - Add JSON export
With no limit set it prints 1G (no limit set) and no quota. --json prints the GET /api/storage payload. The figure is the last measurement, taken at startup and every 10 minutes while a limit is set, and on the first request when there is none. To archive what it marks, use kraft item archive --reclaimable.
Related
- Item verbs: act on what you read here: approve, reject, comment, retry.
- Reviewing a change: how threads, comments and outcomes fit together.
- Events: every event type
view eventscan show.