Skip to content

Operate

Reading of harness/docs/client/operate.md. If this page and that file disagree, the source file wins.

This page is day-to-day use of the harness TUI. It covers named actions, need-human keys, permission mode, /connect, /mcp, and /model.

Pack authoring stays in author/. PEW and Proposal law is ../canon/proposals.md. The approval mechanism is ../runtime/approval.md. Shell duties and the empty-draft law are shell.md. Tape grammar is transcript.md.

You evaluate a named action on the session socket. Names include turn, kv/set, and connect/adopt. You write a PEW or Proposal for cancel and for Question. You write approved on a pending Approvable leaf. The daemon writes Job and PEW bodies.

Permission mode is manual, auto, or yolo. Session mode is act or plan. Session mode is not that join. Slash commands are app tools. They do not replace the agent loop. The law is ../runtime/approval.md.

Axis Values When
Permission mode manual, auto, yolo All three run policy.yaml. Remainder ask: cover / classifier / allow. Floor block holds in all three.

Shift-Tab cycles manual to auto to yolo and back to manual. It does not cycle session mode. The active permission mode is SessionRoot.currentPolicy. The same write is last-choice backing. Session policy/set also stores ProjectRoot.defaultPolicy and kernel config.json defaultPolicy. That store is not a kv key. A new session mints project.defaultPolicy if set, else kernel, else manual. Attach does not re-seed. evalSpec overlays the turn. evalSpec does not write last-choice.

A currentPolicy change re-runs still-null ApprovableJobs. It does not re-run a job mid-evaluate. The re-run includes rows already asked. In-flight evaluation does not rebind.

When policy asks, you write approved on that leaf. The leaf is approvalQueueHead. You do not mint a second “approval” unit. Ask chrome shadows the composer. The prompt you were typing stays. Confirm chords write only while the cover is armed. A mount over a nonempty draft waits KernelRoot.approvalAskThrottleMs. The default is 2s. 0 means off. y, n, a, and Space do not grant. The implementer face is shell.md. The extra-root folder offer is ../runtime/approval.md.

The persist modifier is ⌃. config.json names it superKey. The default is ctrl. cmd is ⌘. Super is not inferred from the OS. Terminals often do not forward it.

You press / mean What happens
Allow (empty cover, ⏎) approved = true on the leaf. A file read also stores that path on SessionRoot.readAllowlist — later reads of it (and descendants) this session do not ask. Writes still ask.
Allow this folder (empty cover, extra-root read, suggested parent, persist-mod ⏎) same, plus readAllowlist for that parent. Offered when a same-parent sibling was allowed or is in-flight. Not Always. Not auto.
This session in auto (empty cover, auto remainder ask of a grantable cluster, persist-mod ⏎) same, plus SessionRoot.autoAllow[cluster] = true. Hatch / extra-root deny / MCP cousin: unpainted.
Always in auto (empty cover, same leaf, persist-mod ⇧ ⏎) same, plus kernel config/auto-allow (config.json autoAllow)
Allow this session (empty cover, MCP look-up in manual, persist-mod ⏎) same, plus SessionRoot.toolAllowlist for that connection+tool
Always allow (empty cover, MCP look-up in manual, persist-mod ⇧ ⏎) same, plus kernel connect/always-allow (connection alwaysAllow)
Deny (empty cover, Esc) approved = false on the leaf. The Job seals with no BODY — it still happened on the tree
Deny this session (empty cover, MCP cousin, persist-mod Esc) same, plus SessionRoot.toolBlocklist
Deny forever (empty cover, MCP cousin, persist-mod ⇧ Esc) same, plus kernel connect/exclude-tool (!name on connection tools). There is no alwaysDeny bag.
Allow / deny with comment (cover has text, persist-mod ⏎ / persist-mod Esc) writes approvalComment too. Persist and folder-widen do not fire from a comment. Shift+Enter is a newline.
Esc (open head, nothing need-human) empty Esc arms, then turn/cancel. Nonempty Esc is draft-clear (same arm).
Choice row (Question) propose a choice. Actor considers. Not UAC.

A policy-written allow or deny does not raise the cover. It is a chip on the tool row. The chip reads policyResult or judgeResult. Persist does not cross the floor. A look-up cannot be banned from the card. A cousin cannot be remembered as a read. Folder-widen is not Always. Folder-widen does not fire on a lone file.

/connect is the connection inventory only. The source of truth is ~/.harness/config.json. KernelReflector projects that file onto the kernel CRDT. The picker renames, removes, or adopts. Class/instance = driver/connection. Esc and back are host navigation. They are not menu rows. Secrets stay local to the daemon.

Selecting a wire sets that session’s model. The id is the last-used one, else the highest-version live id. The picker remembers that wire and that model id as the default. The MCP catalog cut is tools on that row. See /mcp.

MCP connections live in the same ~/.harness/config.json. /mcp is health, authenticate, add, drop, and session disable. Session disable is kv/set mcp-disabled:{id}. That write is not a file write. The durable catalog cut is tools on the connection. toolSeverity overlays auto-class on leftovers. Always-as-read names land on alwaysAllow through kernel connect/always-allow. Deny forever appends !name to tools through kernel connect/exclude-tool. Session remember and session hide live on SessionRoot.toolAllowlist and toolBlocklist. The kernel rewrites config.json the same way connect/adopt does.

Hide is not a license. Remaining tools still run policy.yaml. Connecting is not a grant. A hidden name is absent from the next turn’s catalog. Calling it by wire name still fails.

Globs are ordered. They match the server tool name, such as get_issue or merge_pull_request. They do not match the wire name mcp__github__…. * is any run of characters. ? is one character. Match is case-sensitive. ! in front removes matches. Rules apply in listed order, so a later include can put a name back. A list of only excludes behaves as if * were written first. Omit the field, or pass a non-array, to keep every tool the server lists. [] keeps none.

Write the list on settings.tools, or as a sibling tools on the connection object. A sibling is lifted into that bag.

{
"connections": {
"github": {
"driver": "mcp-stdio",
"name": "GitHub",
"settings": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"tools": ["!merge_*", "!delete_*"]
}
},
"mail": {
"driver": "mcp-http",
"settings": {
"url": "https://mcp.example/mcp",
"tools": ["get_*", "list_*", "!get_secret"]
}
}
}
}

github keeps everything except merge_* and delete_*. mail starts empty, adds get_* and list_*, then drops get_secret. /mcp row counts are the server’s listed tools.

toolSeverity is an optional overlay when auto-class is the wrong pole. Keys are serverToolName globs. The last match wins. Placement is the same as tools. view becomes catalog read. effect becomes effect. Auto cannot say effect. irreversible-effect becomes write. Omit the field to keep auto-class. A bad value is skipped. The overlay is not a license. It is not readOnlyHint.

"toolSeverity": {
"mark_all_notifications_read": "effect",
"merge_*": "irreversible-effect",
"get_issue": "view"
}

alwaysAllow holds exact serverToolName strings remembered by Always allow. Kernel connect/always-allow writes the same bag as tools. The read floor still applies. A veto or a one-word name on this list does not skip ask. A new name still knocks.

"alwaysAllow": ["get_issue", "list_issues"]

/model sets the session model and the default. Models are invocation ids on a live connection, (:models (:live c)), plus a free-type id. The write sets the session KV key model. Picking a model on a wire also sets the connection. The write includes remember: "1". The next session mints the same pair. A bare kv/set changes only this session. A subagent does that. --model and --connection do that. /model does not adopt a connection. It does not drop a connection. Use /connect.

The TUI connects to a separate daemon process. Both use the configured log path: ~/.harness/harness.log, or <kernel>/harness.log if you passed --kernel. HARNESS_LOG=/path/to/file overrides that path. A nonempty DEBUG also mirrors chatter to stderr before the alt-screen.

Doc Role
shell.md Client shell duties, empty-draft law, unattended eval
transcript.md Live tape: identity, liveness, ask pin, follow-tail
../canon/proposals.md PEW/Proposal shapes
../canon/standard-toolkit.md Default FS tools
author/ Pack / command authoring