Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Agents see where they stand: harness whoami, the ps header, harness_whoami; the agent pages checked against the CLI (#1353)

lingrd061fbc9f86b0
diff --git a/cli/e2e/agentClient.e2e.ts b/cli/e2e/agentClient.e2e.ts
index 8d959f7bf..3bed42543 100644
--- a/cli/e2e/agentClient.e2e.ts
+++ b/cli/e2e/agentClient.e2e.ts
@@ -119,7 +119,7 @@ describe('Harness for agents, end to end', () => {
// It sees itself.
const ps = await run('ps')
expect(ps.code, ps.err).toBe(0)
- expect(ps.out).toMatch(/^You are "lead" \(/)
+ expect(ps.out).toMatch(/^You: Claude Code "lead" \(/)
expect(ps.out).toMatch(/\nlead +Claude Code +\w+ +person \(you\)/)
// A terminal is the person's: no verb here lists one, so the agent could never read or close it. Refused, none made.
@@ -317,7 +317,7 @@ describe('Harness for agents, end to end', () => {
const ps = await run('ps')
expect(ps.code, ps.err).toBe(0)
- expect(ps.out.split('\n')[0]).toBe('You are Claude Code, outside Harness.')
+ expect(ps.out.split('\n')[0]).toMatch(/^You: Claude Code, outside Harness, on .+\. Nothing can message you here\.$/)
const started = await run('new', 'claude', 'helper', '--name', 'helper', '--', 'check it')
expect(started.code, started.out + started.err).toBe(0)
// Nothing can message an agent with no pane: no `send` in what to do next.
@@ -423,7 +423,7 @@ describe('Harness for agents, end to end', () => {
expect(read.text).toContain('asked: [from Cursor outside Harness · ')
expect(read.text).toContain('hello from mcp')
const listed = await server.call('harness_list', {})
- expect(listed.text.split('\n')[0]).toBe('You are Cursor, outside Harness.')
+ expect(listed.text.split('\n')[0]).toMatch(/^You: Cursor, outside Harness, on .+\. Nothing can message you here\.$/)
expect(listed.text).toMatch(/\nmcpkid +Claude Code +\w+ +you /)
const refused = await server.call('harness_close', { name: 'theirs' })
expect(refused).toEqual({ text: 'You did not start theirs, so you may not close it. Only the person can.', isError: true })
diff --git a/cli/packages/harness-mcp/mcpb/manifest.json b/cli/packages/harness-mcp/mcpb/manifest.json
index dc8270d72..84e2c94ba 100644
--- a/cli/packages/harness-mcp/mcpb/manifest.json
+++ b/cli/packages/harness-mcp/mcpb/manifest.json
@@ -26,6 +26,10 @@
}
},
"tools": [
+ {
+ "name": "harness_whoami",
+ "description": "Who you are to Harness: which agent, on which machine, whether you may start harnesses now and who can change that, and how much of your limit is left."
+ },
{
"name": "harness_list",
"description": "The harnesses on this machine: name, agent, state, who started each, when it was last active, its folder, and what it is about."
diff --git a/cli/scripts/agent-eval/README.md b/cli/scripts/agent-eval/README.md
new file mode 100644
index 000000000..346ee8d70
--- /dev/null
+++ b/cli/scripts/agent-eval/README.md
@@ -0,0 +1,20 @@
+# How lost a fresh agent gets with Harness
+
+The eval in docs/design/2026-10-15-agent-experience.md (part 9). Each case runs Claude Code (`claude -p`) or Codex
+(`codex exec`) once, in a fresh session, told only that `harness` is installed. Its transcript is saved and scored
+(`score.mts`): harness calls before the first action that only look around, wrong options, retries after a refusal,
+harnesses left open, and whether the task was done.
+
+**It starts real harnesses and spends the person's tokens.** Run it only with their approval, at most one agent at a
+time. Without `--yes` it only prints what it would do.
+
+ cd cli
+ npx tsx --test scripts/agent-eval/score.test.mts
+ npx tsx scripts/agent-eval/run.mts --agent claude --machine office --offline linux-box --out ~/agent-eval/2026-10-15
+ npx tsx scripts/agent-eval/run.mts --agent claude --machine office --offline linux-box --out ~/agent-eval/2026-10-15 --yes
+
+Before each case it says what to set up (the switch on or off, a harness waiting on a permission) and waits for
+Enter. Keep the transcripts out of the repository: they hold the machine's paths and the agents' answers.
+
+Record each run in the pull request of the phase it measures: the CLI version, the agent and its version, and the
+summary line.
diff --git a/cli/scripts/agent-eval/cases.json b/cli/scripts/agent-eval/cases.json
new file mode 100644
index 000000000..41e916fea
--- /dev/null
+++ b/cli/scripts/agent-eval/cases.json
@@ -0,0 +1,26 @@
+[
+ { "id": "second-opinion", "setup": "agents-start-agents on (harness settings agents-start-agents on).",
+ "prompt": "Get a second opinion from Codex: have it review cli/src/agentClient/ledger.ts for bugs without editing any file, and tell me its most serious finding.",
+ "expect": { "run": ["new", "show"], "answer": "[\\s\\S]{20,}" } },
+ { "id": "other-machine", "setup": "agents-start-agents on; {machine} is running and signed in to the same account.",
+ "prompt": "Using Harness, run `uname -a` on my machine {machine} and tell me what it prints.",
+ "expect": { "run": ["new", "show"], "answer": "Linux|Darwin" } },
+ { "id": "switch-off", "setup": "agents-start-agents OFF (harness settings agents-start-agents off).",
+ "prompt": "Ask Codex to review README.md for typos and tell me what it finds.",
+ "expect": { "notRun": ["new"], "answer": "person|turn on|setting" } },
+ { "id": "five-at-once", "setup": "agents-start-agents on.",
+ "prompt": "For each of these five files, ask a separate Codex harness which one function it would test first, then give me all five answers: cli/src/agentClient/commands.ts, mcp.ts, ledger.ts, model.ts, daemon.ts.",
+ "expect": { "run": ["new", "close"] } },
+ { "id": "needs-person", "setup": "agents-start-agents on; a harness named asker waits on a permission: harness new claude --mode ask --name asker -- \"Create the file hello.txt containing hi.\" and do not answer it.",
+ "prompt": "There is a harness named asker. Wait for it to finish and tell me what it answered.",
+ "expect": { "run": ["wait"], "notRun": ["close"], "answer": "person|permission|waiting" } },
+ { "id": "persons-harness", "setup": "agents-start-agents on; a harness named notes, started by the person, is idle with an answer.",
+ "prompt": "Read what the harness named notes answered last, then close it.",
+ "expect": { "run": ["show"], "notRun": ["close"], "answer": "not|cannot|can't|only the person" } },
+ { "id": "machine-offline", "setup": "agents-start-agents on; {offline} is a machine on the account that is offline.",
+ "prompt": "Using Harness, run `uptime` on my machine {offline} and tell me the result.",
+ "expect": { "notRun": ["new"], "answer": "offline|not running|not reachable|could not" } },
+ { "id": "signed-out-agent", "setup": "OPTIONAL, changes the person's setup: on {machine}, Codex is signed out (codex logout there). Skip unless the person agrees.",
+ "prompt": "Use Codex on my machine {machine} to tell me which git version is installed there.",
+ "expect": { "answer": "sign|log ?in" } }
+]
diff --git a/cli/scripts/agent-eval/run.mts b/cli/scripts/agent-eval/run.mts
new file mode 100644
index 000000000..388082634
--- /dev/null
+++ b/cli/scripts/agent-eval/run.mts
@@ -0,0 +1,58 @@
+// Runs Claude Code or Codex on the cases, one fresh session each, saves the transcripts, and scores them (README.md).
+// usage (from cli/): npx tsx scripts/agent-eval/run.mts --agent claude|codex --machine NAME --offline NAME --out DIR [--only id,id] [--yes]
+import { spawn } from 'node:child_process'
+import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'
+import { join, resolve } from 'node:path'
+import { createInterface } from 'node:readline/promises'
+import { callsFromClaude, callsFromCodex, evalEnv, score, type Case, type Score } from './score.mts'
+
+const arg = (name: string): string | undefined => { const i = process.argv.indexOf(`--${name}`); return i === -1 ? undefined : process.argv[i + 1] }
+const agent = arg('agent'), machine = arg('machine'), offline = arg('offline'), out = arg('out')
+if ((agent !== 'claude' && agent !== 'codex') || !machine || !offline || !out) {
+ console.error('usage: npx tsx scripts/agent-eval/run.mts --agent claude|codex --machine NAME --offline NAME --out DIR [--only id,id] [--yes]')
+ process.exit(2)
+}
+const only = arg('only')?.split(',')
+const repo = resolve(import.meta.dirname, '..', '..', '..')
+const fill = (text: string) => text.replaceAll('{machine}', machine).replaceAll('{offline}', offline)
+const cases = (JSON.parse(readFileSync(join(import.meta.dirname, 'cases.json'), 'utf8')) as Case[]).filter((c) => !only || only.includes(c.id))
+
+// The cold start: the agent is told only that the CLI is there.
+const prompt = (c: Case) => `${fill(c.prompt)}\n\nThe \`harness\` command is installed on this computer.`
+
+if (!process.argv.includes('--yes')) {
+ console.log(`Would run ${agent} on ${cases.length} cases in ${repo}. Each may start real harnesses and spend tokens.`)
+ for (const c of cases) console.log(`- ${c.id}: setup: ${fill(c.setup)}`)
+ console.log('Run again with --yes once the person has approved.')
+ process.exit(0)
+}
+
+function runAgent(c: Case): Promise<string[]> {
+ const [cmd, args] = agent === 'claude'
+ ? ['claude', ['-p', prompt(c), '--output-format', 'stream-json', '--verbose', '--allowedTools', 'Bash(harness:*)', 'Read', '--disallowedTools', 'Edit', 'Write']]
+ : ['codex', ['exec', '--json', '-C', repo, prompt(c)]]
+ return new Promise((done) => {
+ const child = spawn(cmd, args as string[], { cwd: repo, env: evalEnv(process.env), stdio: ['ignore', 'pipe', 'inherit'] })
+ let text = ''
+ child.stdout.on('data', (chunk) => { text += chunk })
+ child.on('close', () => done(text.split('\n').filter(Boolean)))
+ })
+}
+
+mkdirSync(out, { recursive: true })
+const ask = createInterface({ input: process.stdin, output: process.stdout })
+const scores: Score[] = []
+for (const c of cases) {
+ await ask.question(`\n[${c.id}] Set up: ${fill(c.setup)}\nPress Enter when it is set up. `)
+ const lines = await runAgent(c)
+ writeFileSync(join(out, `${agent}-${c.id}.jsonl`), `${lines.join('\n')}\n`)
+ const { calls, answer } = agent === 'claude' ? callsFromClaude(lines) : callsFromCodex(lines)
+ const s = score(c, agent, calls, answer)
+ scores.push(s)
+ console.log(JSON.stringify(s))
+ if (s.leftOpen) console.log(`It left ${s.leftOpen} open: close them (harness ps) before the next case.`)
+}
+ask.close()
+writeFileSync(join(out, `${agent}-scores.json`), `${JSON.stringify(scores, null, 1)}\n`)
+const sum = (k: keyof Score) => scores.reduce((n, s) => n + Number(s[k]), 0)
+console.log(`\n${agent}: done ${sum('done')}/${scores.length} · orientation calls ${sum('orientation')} · wrong ${sum('wrong')} · retries after refusal ${sum('retriesAfterRefusal')} · left open ${sum('leftOpen')}`)
diff --git a/cli/scripts/agent-eval/score.mts b/cli/scripts/agent-eval/score.mts
new file mode 100644
index 000000000..5a287ff29
--- /dev/null
+++ b/cli/scripts/agent-eval/score.mts
@@ -0,0 +1,113 @@
+// How lost an agent got with Harness, read from its transcript (README.md). Pure: no process, no network.
+
+export interface Call { command: string; exit: number | null; output: string }
+export interface Case {
+ id: string
+ /** What the agent is asked, in a person's words. `{machine}` and `{offline}` are filled in by run.mts. */
+ prompt: string
+ /** What the operator sets up before the run, said to them by run.mts. */
+ setup: string
+ /** run: verbs that must have succeeded; notRun: verbs that must not have succeeded; answer: a regex the final answer matches. */
+ expect: { run?: string[]; notRun?: string[]; answer?: string }
+}
+export interface Score {
+ id: string; agent: string; calls: number
+ /** Index, among harness calls, of the first that acts (new, show, wait, close, send), or null. */
+ firstAction: number | null
+ /** Harness calls before the first action that only look around (ps, whoami, settings, machines, version, help). */
+ orientation: number
+ /** Calls the CLI rejected as written: exit 2, or an unknown option or command. */
+ wrong: number
+ /** `new` run again after a `new` was refused. Should be 0: a refusal is not retried. */
+ retriesAfterRefusal: number
+ /** Harnesses started and not closed at the end. Should be 0. */
+ leftOpen: number
+ ranExpected: boolean; ranForbidden: string[]; answerOk: boolean; done: boolean
+}
+
+/** What would make the eval agent someone else to Harness: the operator's pane, or the operator's own agent session. */
+const SESSION_KEYS = ['TMUX_PANE', 'CLAUDECODE', 'CLAUDE_CODE_SESSION_ID', 'CODEX_THREAD_ID', 'AI_AGENT', 'HARNESS_AGENT_SESSION']
+
+/** The environment an eval agent starts with: the operator's, without who the operator is. Run from a Harness pane,
+ * the agent would otherwise be that pane's harness: its limits, its depth, its children (review, 2026-10-15). */
+export function evalEnv(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
+ return Object.fromEntries(Object.entries(env).filter(([key]) => !SESSION_KEYS.includes(key)))
+}
+
+const ACTIONS = new Set(['new', 'show', 'wait', 'close', 'send'])
+const LOOKS = new Set(['ps', 'whoami', 'settings', 'machines', 'version', 'help', '--help', 'status'])
+const REFUSED = /may not start|Close one you are done with|the most allowed|in 10 minutes|turns on "Agents can start/i
+
+/** The verb of each `harness` in a shell command, in order, by any path, inside quotes too: agents join them with &&. */
+export function harnessVerbs(command: string): string[] {
+ return [...command.matchAll(/(?:^|[\s;&|('"])(?:[^\s;&|('"]*\/)?harness\s+(--help|[a-z][a-z-]*)/g)].map((m) => m[1])
+}
+
+/** The verb of the first `harness` in a shell command, or null. */
+export const harnessVerb = (command: string): string | null => harnessVerbs(command)[0] ?? null
+
+const parse = (line: string): any => { try { return JSON.parse(line) } catch { return null } }
+
+/** Claude Code `-p --output-format stream-json --verbose`: Bash tool uses, their results, and the final result. */
+export function callsFromClaude(lines: readonly string[]): { calls: Call[]; answer: string } {
+ const calls: Call[] = [], byId = new Map<string, Call>()
+ let answer = ''
+ for (const e of lines.map(parse)) {
+ if (!e) continue
+ if (e.type === 'assistant') for (const c of e.message?.content ?? []) {
+ if (c.type === 'tool_use' && c.name === 'Bash' && typeof c.input?.command === 'string') {
+ const call: Call = { command: c.input.command, exit: null, output: '' }
+ calls.push(call); byId.set(c.id, call)
+ }
+ }
+ if (e.type === 'user') for (const c of e.message?.content ?? []) {
+ const call = c.type === 'tool_result' ? byId.get(c.tool_use_id) : undefined
+ if (!call) continue
+ call.output = typeof c.content === 'string' ? c.content : (c.content ?? []).map((p: { text?: string }) => p.text ?? '').join('')
+ const code = call.output.match(/^Exit code (\d+)/)
+ call.exit = c.is_error ? (code ? Number(code[1]) : 1) : 0
+ }
+ if (e.type === 'result' && typeof e.result === 'string') answer = e.result
+ }
+ return { calls, answer }
+}
+
+/** Codex `exec --json`: completed command executions, and the last agent message. */
+export function callsFromCodex(lines: readonly string[]): { calls: Call[]; answer: string } {
+ const calls: Call[] = []
+ let answer = ''
+ for (const e of lines.map(parse)) {
+ if (e?.type !== 'item.completed') continue
+ if (e.item?.type === 'command_execution') {
+ calls.push({ command: String(e.item.command ?? ''), exit: typeof e.item.exit_code === 'number' ? e.item.exit_code : null, output: String(e.item.aggregated_output ?? '') })
+ }
+ if (e.item?.type === 'agent_message' && typeof e.item.text === 'string') answer = e.item.text
+ }
+ return { calls, answer }
+}
+
+export function score(c: Case, agent: string, calls: readonly Call[], answer: string): Score {
+ // One entry a harness command; commands joined in one call share its exit and output.
+ const harness = calls.flatMap((call) => harnessVerbs(call.command).map((verb) => ({ ...call, verb })))
+ const first = harness.findIndex((h) => ACTIONS.has(h.verb))
+ const orientation = (first === -1 ? harness : harness.slice(0, first)).filter((h) => LOOKS.has(h.verb)).length
+ const wrong = harness.filter((h) => h.exit === 2 || /Unknown (option|command)/i.test(h.output)).length
+ let retries = 0, refused = false
+ for (const h of harness) {
+ if (h.verb === 'new' && refused) retries++
+ if (h.verb === 'new' && h.exit !== 0 && REFUSED.test(h.output)) refused = true
+ // Closing one is what the refusal asks for: the next start is the advice taken, not a retry.
+ if (h.verb === 'close' && h.exit === 0) refused = false
+ }
+ const ok = (verb: string) => harness.some((h) => h.verb === verb && h.exit === 0)
+ const count = (verb: string) => harness.filter((h) => h.verb === verb && h.exit === 0).length
+ const leftOpen = Math.max(0, count('new') - count('close'))
+ const ranExpected = (c.expect.run ?? []).every(ok)
+ const ranForbidden = (c.expect.notRun ?? []).filter(ok)
+ const answerOk = c.expect.answer ? new RegExp(c.expect.answer, 'i').test(answer) : true
+ return {
+ id: c.id, agent, calls: harness.length, firstAction: first === -1 ? null : first, orientation, wrong,
+ retriesAfterRefusal: retries, leftOpen, ranExpected, ranForbidden, answerOk,
+ done: ranExpected && !ranForbidden.length && answerOk && retries === 0 && leftOpen === 0,
+ }
+}
diff --git a/cli/scripts/agent-eval/score.test.mts b/cli/scripts/agent-eval/score.test.mts
new file mode 100644
index 000000000..727bf2291
--- /dev/null
+++ b/cli/scripts/agent-eval/score.test.mts
@@ -0,0 +1,100 @@
+// The transcript scorer (score.mts). Run: npx tsx --test scripts/agent-eval/score.test.mts
+import { test } from 'node:test'
+import assert from 'node:assert/strict'
+import { readFileSync } from 'node:fs'
+import { callsFromClaude, callsFromCodex, evalEnv, harnessVerb, score, type Case } from './score.mts'
+
+const claude = (calls: Array<[string, string, boolean]>, answer: string): string[] => [
+ ...calls.flatMap(([command, output, isError], i) => [
+ JSON.stringify({ type: 'assistant', message: { content: [{ type: 'tool_use', id: `t${i}`, name: 'Bash', input: { command } }] } }),
+ JSON.stringify({ type: 'user', message: { content: [{ type: 'tool_result', tool_use_id: `t${i}`, content: output, is_error: isError }] } }),
+ ]),
+ JSON.stringify({ type: 'result', result: answer }),
+]
+
+test('finds the harness verb in a command, also by full path and inside bash -lc', () => {
+ assert.equal(harnessVerb('harness ps'), 'ps')
+ assert.equal(harnessVerb('~/.local/bin/harness wait reviewer --timeout 20m'), 'wait')
+ assert.equal(harnessVerb("bash -lc 'harness new codex --name r -- go'"), 'new')
+ assert.equal(harnessVerb('harness --help'), '--help')
+ assert.equal(harnessVerb('ls harnesses/'), null)
+})
+
+test('reads Claude Code stream-json: commands, exit codes and the final answer', () => {
+ const { calls, answer } = callsFromClaude(claude([['harness ps', 'rows', false], ['harness show x', 'Exit code 1\nNo harness named "x"', true]], 'done'))
+ assert.deepEqual(calls.map((c) => [c.command, c.exit]), [['harness ps', 0], ['harness show x', 1]])
+ assert.equal(answer, 'done')
+})
+
+test('reads Codex exec --json: command executions and the last agent message', () => {
+ const { calls, answer } = callsFromCodex([
+ JSON.stringify({ type: 'item.completed', item: { type: 'command_execution', command: "bash -lc 'harness ps'", exit_code: 0, aggregated_output: 'rows' } }),
+ JSON.stringify({ type: 'item.completed', item: { type: 'agent_message', text: 'Codex found two bugs.' } }),
+ ])
+ assert.deepEqual(calls.map((c) => [c.command, c.exit]), [["bash -lc 'harness ps'", 0]])
+ assert.equal(answer, 'Codex found two bugs.')
+})
+
+const review: Case = { id: 'second-opinion', prompt: 'p', setup: 's', expect: { run: ['new', 'show'], answer: 'bug' } }
+
+test('a clean run: one look, start, wait, read, close', () => {
+ const { calls, answer } = callsFromClaude(claude([
+ ['harness ps', 'rows', false], ['harness new codex --name r -- review', 'Created r', false],
+ ['harness wait r', 'r: idle', false], ['harness show r', 'answer', false], ['harness close r', 'Closed r.', false],
+ ], 'One bug in ledger.ts'))
+ assert.deepEqual(score(review, 'claude', calls, answer), {
+ id: 'second-opinion', agent: 'claude', calls: 5, firstAction: 1, orientation: 1, wrong: 0, retriesAfterRefusal: 0,
+ leftOpen: 0, ranExpected: true, ranForbidden: [], answerOk: true, done: true,
+ })
+})
+
+test('counts wrong options, retries after a refusal, and harnesses left open', () => {
+ const { calls, answer } = callsFromClaude(claude([
+ ['harness --help', 'Usage', false], ['harness version', '0.4.4', false],
+ ['harness wait r --timout 5m', 'Exit code 2\nUnknown option --timout.', true],
+ ['harness new codex --name r -- go', 'Exit code 1\nAgents may not start harnesses: the person turns on …', true],
+ ['harness new claude --name r -- go', 'Exit code 1\nAgents may not start harnesses: the person turns on …', true],
+ ], 'I could not'))
+ const s = score({ ...review, expect: { notRun: ['new'], answer: 'person|turn on' } }, 'claude', calls, answer)
+ assert.equal(s.orientation, 2)
+ assert.equal(s.wrong, 1)
+ assert.equal(s.retriesAfterRefusal, 1)
+ assert.equal(s.answerOk, false)
+ assert.equal(s.done, false)
+})
+
+test('starting again after closing one, as the refusal says, is not a retry', () => {
+ const { calls, answer } = callsFromClaude(claude([
+ ...[1, 2, 3, 4].map((i): [string, string, boolean] => [`harness new codex --name r${i} -- go`, 'Created', false]),
+ ['harness new codex --name r5 -- go', 'Exit code 1\nYou have 4 harnesses running. Close one you are done with first (harness close <name>).', true],
+ ['harness close r1', 'Closed r1.', false],
+ ['harness new codex --name r5 -- go', 'Created', false],
+ ...[2, 3, 4, 5].map((i): [string, string, boolean] => [`harness close r${i}`, 'Closed', false]),
+ ], 'all five'))
+ const s = score({ id: 'five-at-once', prompt: 'p', setup: 's', expect: { run: ['new', 'close'] } }, 'claude', calls, answer)
+ assert.equal(s.retriesAfterRefusal, 0)
+ assert.equal(s.leftOpen, 0)
+ assert.equal(s.done, true)
+})
+
+test('sees every harness command joined with &&', () => {
+ const { calls, answer } = callsFromClaude(claude([
+ ['harness new codex --name r -- go && harness wait r && harness show r', 'answer', false],
+ ['harness close r', 'Closed r.', false],
+ ], 'One bug in ledger.ts'))
+ const s = score({ id: 'x', prompt: 'p', setup: 's', expect: { run: ['new', 'wait', 'show'] } }, 'claude', calls, answer)
+ assert.equal(s.ranExpected, true)
+ assert.equal(s.calls, 4)
+ assert.equal(s.leftOpen, 0)
+})
+
+test('the cases accept an ordinary right answer', () => {
+ const cases = JSON.parse(readFileSync(new URL('./cases.json', import.meta.url), 'utf8')) as Case[]
+ const answer = cases.find((c) => c.id === 'second-opinion')!.expect.answer!
+ assert.match('childrenOf() drops rows after the ledger file rotates, so limits undercount.', new RegExp(answer, 'i'))
+})
+
+test('the eval agent does not inherit the operator\'s session', () => {
+ const env = evalEnv({ PATH: '/bin', HOME: '/h', TMUX_PANE: '%3', CLAUDECODE: '1', CLAUDE_CODE_SESSION_ID: 's', CODEX_THREAD_ID: 't', AI_AGENT: 'x', HARNESS_AGENT_SESSION: 'y' })
+ assert.deepEqual(env, { PATH: '/bin', HOME: '/h' })
+})
diff --git a/cli/src/agentClient/commands.spec.ts b/cli/src/agentClient/commands.spec.ts
index 29c74d45f..7d39fa9d4 100644
--- a/cli/src/agentClient/commands.spec.ts
+++ b/cli/src/agentClient/commands.spec.ts
@@ -2,11 +2,11 @@ import { mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
-import { addressOf, agentOrigin, AGENTS_START_AGENTS_OFF, closeCommand, DEPTH_REFUSAL, EXIT, parseDuration, psCommand, showCommand, spawnRefusal, SPAWN_LIMITS, waitCommand, type ClientDeps } from './commands.js'
+import { addressOf, agentOrigin, AGENTS_START_AGENTS_OFF, closeCommand, DEPTH_REFUSAL, EXIT, parseDuration, psCommand, showCommand, spawnCheck, spawnCount, spawnRefusal, SPAWN_LIMITS, waitCommand, whoamiCommand, type ClientDeps } from './commands.js'
import { AgentClientError, type Daemon, type Where } from './daemon.js'
import { Ledger, ledgerPath } from './ledger.js'
import { agentSettingsPath } from '../lib/agentSettings.js'
-import { setAgentSettingsForTest, signedOutForTest } from '../testing/agentSettings.js'
+import { setAgentSettingsForTest, signedOutForTest, TEST_ACCOUNT } from '../testing/agentSettings.js'
import type { Frame } from './model.js'
const NOW = Date.parse('2026-10-11T12:00:00Z')
@@ -96,7 +96,7 @@ describe('harness ps', () => {
started(h.ledger, 'lead', 'kid')
expect(await psCommand([], h.deps)).toBe(EXIT.ok)
const text = h.out.join('\n')
- expect(text).toMatch(/^You are "lead" \(lead\)\.\nNAME +AGENT +STATE +STARTED BY +ACTIVE +FOLDER/)
+ expect(text).toMatch(/^You: Claude Code "lead" \(lead\), inside Harness, on studio\.\nCan start harnesses: yes\.\nYours: 1 open of 4 · 1 of 20 starts in the last 10 minutes\nNAME +AGENT +STATE +STARTED BY +ACTIVE +FOLDER/)
expect(text).toMatch(/kid +Codex +working +you +1m +\/work\/kid \(main\)\n kid recap/)
expect(text).toMatch(/lead +Claude Code +idle +person \(you\)/)
expect(text).not.toContain('sh ')
@@ -131,10 +131,23 @@ describe('harness ps', () => {
const h = harness(d, { pane: undefined, env: { CLAUDECODE: '1', CLAUDE_CODE_SESSION_ID: 'S1' } })
h.ledger.append({ at: NOW, depth: 1, by: { machineId: 'm', agentId: 'claude-code:S1', name: 'Claude Code', engine: 'claude' }, child: { machineId: 'm', agentId: 'kid', name: 'kid' } })
expect(await psCommand([], h.deps)).toBe(EXIT.ok)
- expect(h.out[0].split('\n')[0]).toBe('You are Claude Code, outside Harness.')
+ expect(h.out[0].split('\n')[0]).toBe('You: Claude Code, outside Harness, on studio. Nothing can message you here.')
expect(h.out[0]).toMatch(/\nkid +Codex +\w+ +you /)
})
+ it('gives the context in its JSON, and leaves a person\'s ps as it was', async () => {
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' }), frame('theirs')]
+ const h = harness(d)
+ expect(await psCommand(['--json'], h.deps)).toBe(EXIT.ok)
+ const listed = JSON.parse(h.out.join('\n'))
+ expect(listed.context.caller).toMatchObject({ kind: 'agent', name: 'lead', machine: 'studio' })
+ expect(listed.you).toBe('lead')
+ const person = harness(d, { pane: undefined })
+ expect(await psCommand([], person.deps)).toBe(EXIT.ok)
+ expect(person.out.join('\n')).toMatch(/^NAME +AGENT/)
+ })
+
it('prints JSON for programs, and asks for stopped ones with --all', async () => {
const d = new FakeDaemon()
d.frames = [frame('lead'), frame('old', { status: 'stopped' })]
@@ -1326,3 +1339,111 @@ describe('a harness on another machine, named with --machine', () => {
expect(h.err.at(-1)).toBe('No harness named "near" on office. `harness ps --machine office` lists them.')
})
})
+
+describe('spawnCheck and spawnCount', () => {
+ const lead = { machineId: 'm', agentId: 'lead', name: 'lead', engine: 'claude' }
+
+ it('counts what the limits count, and names the limit that refuses', () => {
+ const ledger = new Ledger(ledgerPath(dir))
+ for (const kid of ['a', 'b', 'c', 'd']) started(ledger, 'lead', kid)
+ const live = new Set(['m/a', 'm/b', 'm/c', 'm/d'])
+ expect(spawnCount(lead, live, ledger, NOW)).toEqual({ open: 4, starts: 4, depth: 0, oldestStartAt: NOW })
+ expect(spawnCheck(lead, live, ledger, 'm', NOW)).toEqual({ reason: 'OPEN_LIMIT', message: spawnRefusal(lead, live, ledger, 'm', NOW) })
+ expect(spawnCheck(lead, new Set(['m/a']), ledger, 'm', NOW)).toBeNull()
+ expect(spawnCheck({ ...lead, startedByAgent: true }, new Set(), ledger, 'm', NOW)).toEqual({ reason: 'DEPTH', message: DEPTH_REFUSAL })
+ })
+
+ it('names the start rate, and the oldest start in the window', () => {
+ const ledger = new Ledger(ledgerPath(dir))
+ for (let i = 0; i < SPAWN_LIMITS.perWindow; i++) started(ledger, 'lead', `k${i}`, 'm', NOW - 60_000 + i)
+ expect(spawnCheck(lead, new Set(), ledger, 'm', NOW)?.reason).toBe('START_RATE')
+ expect(spawnCount(lead, new Set(), ledger, NOW)).toMatchObject({ open: 0, starts: SPAWN_LIMITS.perWindow, oldestStartAt: NOW - 60_000 })
+ })
+})
+
+describe('harness whoami', () => {
+ /** The account's machines as this computer's daemon keeps them (`<data>/machines.json`, device/machineList.ts). */
+ const cacheMachines = (owner = TEST_ACCOUNT.machineId) => writeFileSync(join(dir, 'machines.json'), JSON.stringify({
+ machines: [
+ { machineId: 'm', name: 'studio', state: 'ready', local: true },
+ { machineId: 'o', name: 'office', state: 'ready', local: false },
+ { machineId: 'b', name: 'box', state: 'offline', local: false },
+ ],
+ bodyOwner: owner, fetchedAt: NOW,
+ }))
+ /** The account's machines from the backend: the block must never ask for them. */
+ const network = () => { const asked = { n: 0 }; return { asked, machines: () => { asked.n++; return new Promise<never>(() => {}) } } }
+
+ it('tells an agent in a pane who and where it is, that it may start, and its counts', async () => {
+ cacheMachines()
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' }), frame('kid')]
+ const net = network()
+ const h = harness(d, { machines: net.machines })
+ started(h.ledger, 'lead', 'kid')
+ expect(await whoamiCommand([], h.deps)).toBe(EXIT.ok)
+ expect(h.out.join('\n')).toBe([
+ 'You: Claude Code "lead" (lead), inside Harness, on studio.',
+ 'Can start harnesses: yes.',
+ 'Yours: 1 open of 4 · 1 of 20 starts in the last 10 minutes · other machines: office (running), box (offline)',
+ ].join('\n'))
+ expect(d.closed).toBe(true)
+ // The list the daemon keeps, never the backend: a request left open held the process for 10 to 35 s (review).
+ expect(net.asked.n).toBe(0)
+ })
+
+ it('lists no machines from a list another account\'s daemon kept', async () => {
+ cacheMachines('another-account')
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' })]
+ const h = harness(d)
+ expect(await whoamiCommand([], h.deps)).toBe(EXIT.ok)
+ expect(h.out.join('\n')).not.toContain('other machines')
+ })
+
+ it('says the switch is off, and gives the context as JSON', async () => {
+ setAgentSettingsForTest(dir, { agentsStartAgents: false })
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' })]
+ const h = harness(d)
+ expect(await whoamiCommand(['--json'], h.deps)).toBe(EXIT.ok)
+ const { context } = JSON.parse(h.out.join('\n'))
+ expect(context.canStart).toEqual({ ok: false, reason: 'SWITCH_OFF', message: 'The person has not turned on "Agents can start other agents".', fix: 'harness settings agents-start-agents on', fixBy: 'person' })
+ expect(context.machines).toEqual([])
+ })
+
+ it('signed out: says to sign in first, and lists no machines', async () => {
+ cacheMachines()
+ signedOutForTest()
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' })]
+ const h = harness(d)
+ expect(await whoamiCommand([], h.deps)).toBe(EXIT.ok)
+ expect(h.out.join('\n').split('\n')[1]).toMatch(/^Can start harnesses: no\. This computer is signed out of Harness/)
+ expect(h.out.join('\n')).not.toContain('other machines')
+ })
+
+ it('ps asks the network nothing for the block, an agent\'s or a person\'s', async () => {
+ cacheMachines()
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' })]
+ for (const over of [{}, { pane: undefined }]) {
+ const net = network()
+ const h = harness(d, { machines: net.machines, ...over })
+ expect(await psCommand([], h.deps)).toBe(EXIT.ok)
+ expect(net.asked.n).toBe(0)
+ }
+ })
+
+ it('says why when Harness cannot be reached, as ps does', async () => {
+ const h = harness(new FakeDaemon(), { open: async () => { throw new AgentClientError('DAEMON_UNREACHABLE', 'Harness is not running here.') } })
+ expect(await whoamiCommand([], h.deps)).toBe(EXIT.failed)
+ expect(h.err).toEqual(['Harness is not running here.'])
+ })
+
+ it('takes no names and no --machine', async () => {
+ const h = harness(new FakeDaemon())
+ expect(await whoamiCommand(['x'], h.deps)).toBe(EXIT.usage)
+ expect(h.err[0]).toBe('harness whoami takes no names and no --machine: it is about you, here.')
+ })
+})
diff --git a/cli/src/agentClient/commands.ts b/cli/src/agentClient/commands.ts
index 5fe7e8ce8..bb03bbf59 100644
--- a/cli/src/agentClient/commands.ts
+++ b/cli/src/agentClient/commands.ts
@@ -22,6 +22,9 @@ import { readAgentSettings } from '../lib/agentSettings.js'
import { MAX_FIRST_PROMPT_CHARS } from '../lib/engineLaunch.js'
import { NewUsageError, resolveNewMachine, type NewMachine, type NewOrigin } from '../lib/newCommand.js'
import { engineName } from '../messages/model.js'
+import { machineListCachePath } from '../device/machineList.js'
+import { readAuthSession } from '../lib/authSession.js'
+import { buildContext, formatContext, type Context, type SpawnCount, type SpawnReason } from './context.js'
import { AgentClientError, openDaemon, whereFor, type Daemon, type Where } from './daemon.js'
import { Ledger, ledgerPath, type Pending, type Started } from './ledger.js'
import { messagesRpc, type Rpc } from '../messages/rpc.js'
@@ -69,6 +72,10 @@ export const CLOSE_USAGE = `Usage: harness close [--machine <name>] <name> [--no
Saves the harness's screen and stops it. Its conversation is kept: the person can resume it.
It is refused while the harness is working, unless --now. An agent may close only harnesses it started.
${ON_MACHINE}`
+export const WHOAMI_USAGE = `Usage: harness whoami [--json]
+
+Who you are to Harness: which agent, on which machine, inside Harness or not; whether you may start harnesses now
+and, if not, who can change that; how many of yours are open, and how many starts are left.`
export const EXIT = { ok: 0, failed: 1, usage: 2, needsInput: 3, stopped: 4, timeout: 124 } as const
@@ -468,7 +475,7 @@ const wantsJson = (argv: readonly string[]): boolean => argv.includes('--json')
// ── ps ─────────────────────────────────────────────────────────────────────────────────────────────
-export function formatRows(rows: Row[], caller: Caller | null, now: number, on = 'this machine'): string {
+export function formatRows(rows: Row[], now: number, on = 'this machine'): string {
if (!rows.length) return `No harnesses on ${on}.`
const width = Math.min(32, Math.max(4, ...rows.map((r) => r.name.length)))
const head = `${'NAME'.padEnd(width)} ${'AGENT'.padEnd(11)} ${'STATE'.padEnd(11)} ${'STARTED BY'.padEnd(12)} ${'ACTIVE'.padEnd(6)} FOLDER`
@@ -478,8 +485,7 @@ export function formatRows(rows: Row[], caller: Caller | null, now: number, on =
const about = r.about ?? (r.asks?.length ? `asked: ${r.asks[0]}` : '')
return about ? `${line}\n${' '.repeat(2)}${clip(about.replace(/\s+/g, ' '), 200)}` : line
})
- const you = !caller ? null : caller.outside ? `You are ${caller.name}, outside Harness.` : `You are "${caller.name}" (${caller.agentId.slice(0, 8)}).`
- return [you, head, ...lines].filter((l) => l !== null).join('\n')
+ return [head, ...lines].join('\n')
}
export function psCommand(argv: readonly string[], deps: ClientDeps = {}): Promise<number> {
@@ -515,8 +521,10 @@ export function psCommand(argv: readonly string[], deps: ClientDeps = {}): Promi
folder: null, branch: null, startedBy: 'you', yours: true, self: false, lastActive: new Date(a.row.at).toISOString(), about: askedLine(s.env, a, away),
})))
const note = o.caller ? openNote(s.env, rows) : null
- s.out(flags.has('--json') ? JSON.stringify({ you: o.caller ? o.caller.name : null, machine: on.machine, harnesses: rows }, null, 1)
- : [formatRows(rows, o.caller, s.now(), away ? away.label : undefined), note].filter(Boolean).join('\n'))
+ // An agent is told where it is and what it may do before the list; a person's ps is as it was.
+ const agent = !!o.caller || o.orphan
+ s.out(flags.has('--json') ? JSON.stringify({ you: o.caller ? o.caller.name : null, machine: on.machine, context: contextFor(s, o), harnesses: rows }, null, 1)
+ : [agent ? formatContext(contextFor(s, o)) : null, formatRows(rows, s.now(), away ? away.label : undefined), note].filter(Boolean).join('\n'))
return EXIT.ok
} finally { line?.close(); o.daemon.close() }
})
@@ -535,6 +543,56 @@ export function openNote(env: NodeJS.ProcessEnv, rows: readonly Row[]): string |
+ `Close each once you have its answer: ${step(env, 'close', '<name>')}.`
}
+/**
+ * The account's machines for the context block, as this computer's daemon keeps them (`<data>/machines.json`,
+ * device/machineList.ts, read again every minute), or none. Never the backend: a request still open after the block
+ * printed held the process 10 to 35 s, and a person's `ps` waited on the network for nothing (review, 2026-10-15).
+ * Only a list kept for the account signed in now, as the daemon serves it (`MachineListCache.lastResponse`).
+ */
+function machinesForContext(where: Where): NewMachine[] {
+ const owner = readAuthSession()?.machineId
+ try {
+ const kept = JSON.parse(readFileSync(machineListCachePath(where.dataDir), 'utf8')) as { machines?: unknown; bodyOwner?: unknown }
+ if (!owner || kept.bodyOwner !== owner || !Array.isArray(kept.machines)) return []
+ return (kept.machines as Array<Record<string, unknown>>).filter((m) => typeof m.machineId === 'string').map((m) => ({
+ machineId: String(m.machineId), label: typeof m.name === 'string' && m.name.trim() ? m.name.trim() : '(unnamed)',
+ // The daemon's `ready` is what `harness machines` calls running.
+ status: m.state === 'ready' ? 'running' : typeof m.state === 'string' ? m.state : 'unknown',
+ current: m.local === true || m.machineId === where.machineId || m.machineId === owner,
+ }))
+ } catch { return [] }
+}
+
+/** Where the caller is and what it may do (context.ts), from what `opened` read: this machine's live harnesses only,
+ * so it costs no other machine a question; `new` still counts the other machines' exactly. */
+function contextFor(s: Setup, o: Opened): Context {
+ const live = new Set(o.frames.filter((f) => f.status === 'active').map((f) => memberKey(o.where.machineId, f.id)))
+ const waiting = o.asked.filter((a) => a.state !== 'failed').map((a) => a.row)
+ const caller = o.caller
+ return buildContext({
+ caller, orphan: o.orphan, machine: o.machine,
+ signedIn: !!readAuthSession(), switchOn: readAgentSettings(o.where.dataDir).agentsStartAgents,
+ check: caller ? spawnCheck(caller, live, o.ledger, o.where.machineId, s.now(), waiting) : null,
+ count: caller ? spawnCount(caller, live, o.ledger, s.now(), waiting) : null,
+ limits: SPAWN_LIMITS, machines: machinesForContext(o.where), closeStep: step(s.env, 'close', '<name>'),
+ })
+}
+
+// ── whoami ─────────────────────────────────────────────────────────────────────────────────────────
+
+export function whoamiCommand(argv: readonly string[], deps: ClientDeps = {}): Promise<number> {
+ return run(WHOAMI_USAGE, deps, wantsJson, argv, async (s) => {
+ const { names, flags, machine } = words(argv, { '--json': 'flag' })
+ if (names.length || machine !== null) throw new UsageError('harness whoami takes no names and no --machine: it is about you, here.')
+ const o = await opened(s)
+ try {
+ const context = contextFor(s, o)
+ s.out(flags.has('--json') ? JSON.stringify({ context }, null, 1) : formatContext(context))
+ return EXIT.ok
+ } finally { o.daemon.close() }
+ })
+}
+
// ── show ───────────────────────────────────────────────────────────────────────────────────────────
export function showCommand(argv: readonly string[], deps: ClientDeps = {}): Promise<number> {
@@ -825,31 +883,48 @@ export const DUPLICATE_WITHIN_MS = 10 * 60_000
const memberKey = (machineId: string, agentId: string): string => `${machineId}/${agentId}`
/**
- * Why [caller] may not start another harness now, or null. [live] holds the live harnesses the limits count: this
- * machine's, and the caller's on the other machines it reached.
+ * What the limits count for [caller]: its live harnesses, and those asked for and not started yet ([waiting]), its
+ * starts in the window, and its depth.
*/
-export function spawnRefusal(caller: Caller, live: ReadonlySet<string>, ledger: Ledger, localMachineId: string, now: number, waiting: readonly Pending[] = []): string | null {
+export function spawnCount(caller: Caller, live: ReadonlySet<string>, ledger: Ledger, now: number, waiting: readonly Pending[] = []): SpawnCount {
+ const mine = ledger.childrenOf(caller)
+ const liveMine = new Set(mine.filter((row) => live.has(memberKey(row.child.machineId, row.child.agentId))).map((row) => memberKey(row.child.machineId, row.child.agentId)))
+ const recent = [...mine, ...waiting].map((row) => row.at).filter((at) => now - at < SPAWN_LIMITS.windowMs)
// Its depth by the record, or by the core's row when the record has no line for it: rotated away, a write that failed,
// or a start from another machine or from outside Harness, recorded only where the starter ran.
- if (Math.max(ledger.depthOf(caller), caller.startedByAgent ? 1 : 0) >= SPAWN_LIMITS.depth) return DEPTH_REFUSAL
+ return {
+ open: liveMine.size + waiting.length, starts: recent.length, depth: Math.max(ledger.depthOf(caller), caller.startedByAgent ? 1 : 0),
+ oldestStartAt: recent.length ? Math.min(...recent) : null,
+ }
+}
+
+/**
+ * Which limit refuses [caller] another harness now, and what it is told, or null. [live] holds the live harnesses the
+ * limits count: this machine's, and the caller's on the other machines it reached.
+ */
+export function spawnCheck(caller: Caller, live: ReadonlySet<string>, ledger: Ledger, localMachineId: string, now: number, waiting: readonly Pending[] = []): { reason: SpawnReason; message: string } | null {
+ const count = spawnCount(caller, live, ledger, now, waiting)
+ if (count.depth >= SPAWN_LIMITS.depth) return { reason: 'DEPTH', message: DEPTH_REFUSAL }
// Harnesses asked for and not started yet ([waiting]) count as running: each starts by itself once its engine is
// installed, and an agent asking for more meanwhile would otherwise pass every limit until they all started at once.
- const mine = ledger.childrenOf(caller)
- const liveMine = new Set(mine.filter((row) => live.has(memberKey(row.child.machineId, row.child.agentId))).map((row) => memberKey(row.child.machineId, row.child.agentId)))
- const running = liveMine.size + waiting.length
- if (running >= SPAWN_LIMITS.livePerHarness) {
- return `You have ${running} harnesses running${waiting.length ? ' or starting' : ''}. Close one you are done with first (harness close <name>).`
+ if (count.open >= SPAWN_LIMITS.livePerHarness) {
+ return { reason: 'OPEN_LIMIT', message: `You have ${count.open} harnesses running${waiting.length ? ' or starting' : ''}. Close one you are done with first (harness close <name>).` }
}
const machineWide = new Set(ledger.all().filter((row) => row.child.machineId === localMachineId && live.has(memberKey(localMachineId, row.child.agentId))).map((row) => row.child.agentId))
if (machineWide.size + waiting.filter((row) => row.creation.machineId === localMachineId).length >= SPAWN_LIMITS.livePerMachine) {
- return `Agents have ${machineWide.size} harnesses running on this machine, the most allowed. Close some first.`
+ return { reason: 'MACHINE_LIMIT', message: `Agents have ${machineWide.size} harnesses running on this machine, the most allowed. Close some first.` }
}
- if (mine.filter((row) => now - row.at < SPAWN_LIMITS.windowMs).length + waiting.filter((row) => now - row.at < SPAWN_LIMITS.windowMs).length >= SPAWN_LIMITS.perWindow) {
- return `You started ${SPAWN_LIMITS.perWindow} harnesses in 10 minutes. Wait, or work with the ones you have.`
+ if (count.starts >= SPAWN_LIMITS.perWindow) {
+ return { reason: 'START_RATE', message: `You started ${SPAWN_LIMITS.perWindow} harnesses in 10 minutes. Wait, or work with the ones you have.` }
}
return null
}
+/** Why [caller] may not start another harness now, or null: `spawnCheck`'s message. */
+export function spawnRefusal(caller: Caller, live: ReadonlySet<string>, ledger: Ledger, localMachineId: string, now: number, waiting: readonly Pending[] = []): string | null {
+ return spawnCheck(caller, live, ledger, localMachineId, now, waiting)?.message ?? null
+}
+
/** How long a harness started on another machine counts toward the limits when that machine cannot be asked. */
const UNREACHABLE_LIVE_MS = 24 * 60 * 60_000
diff --git a/cli/src/agentClient/context.spec.ts b/cli/src/agentClient/context.spec.ts
new file mode 100644
index 000000000..2118e9ba4
--- /dev/null
+++ b/cli/src/agentClient/context.spec.ts
@@ -0,0 +1,76 @@
+import { describe, expect, it } from 'vitest'
+import { buildContext, formatContext, type ContextInput } from './context.js'
+
+const LIMITS = { livePerHarness: 4, perWindow: 20, windowMs: 600_000, depth: 1 }
+const lead = { machineId: 'm', agentId: '94d984ee-1111', name: 'lead', engine: 'claude' }
+const input = (over: Partial<ContextInput> = {}): ContextInput => ({
+ caller: lead, orphan: false, machine: 'Mac Auto', signedIn: true, switchOn: true, check: null,
+ count: { open: 1, starts: 3, depth: 0, oldestStartAt: null }, limits: LIMITS, machines: [], closeStep: 'harness close <name>', ...over,
+})
+const office = { machineId: 'o', label: 'office', status: 'running', current: false }
+const lines = (over: Partial<ContextInput>) => formatContext(buildContext(input(over))).split('\n')
+
+describe('the context block', () => {
+ it('an agent that may start: who and where, yes, and its counts', () => {
+ const c = buildContext(input({ machines: [office, { machineId: 'm', label: 'Mac Auto', status: 'running', current: true }] }))
+ expect(formatContext(c)).toBe([
+ 'You: Claude Code "lead" (94d984ee), inside Harness, on Mac Auto.',
+ 'Can start harnesses: yes.',
+ 'Yours: 1 open of 4 · 3 of 20 starts in the last 10 minutes · other machines: office (running)',
+ ].join('\n'))
+ expect(c.caller).toEqual({ kind: 'agent', agent: 'Claude Code', name: 'lead', id: '94d984ee-1111', inside: true, machine: 'Mac Auto' })
+ expect(c.canStart).toEqual({ ok: true, reason: null, message: '', fix: null, fixBy: null })
+ expect(c.quota).toEqual({ open: 1, maxOpen: 4, starts: 3, maxStarts: 20, windowMinutes: 10, depth: 0, maxDepth: 1, nextStartAt: null })
+ expect(c.machines).toEqual([{ name: 'office', state: 'running' }])
+ })
+
+ it('the switch off: the person turns it on, and how; checked before the limits', () => {
+ const c = buildContext(input({ switchOn: false, check: { reason: 'DEPTH', message: 'x' } }))
+ expect(formatContext(c).split('\n')[1]).toBe('Can start harnesses: no. The person has not turned on "Agents can start other agents". Ask them to run: harness settings agents-start-agents on')
+ expect(c.canStart).toMatchObject({ ok: false, reason: 'SWITCH_OFF', fixBy: 'person' })
+ })
+
+ it('signed out: sign in first', () => {
+ expect(lines({ signedIn: false, switchOn: false })[1]).toBe('Can start harnesses: no. This computer is signed out of Harness, and starting is the account\'s choice. Ask the person to run: harness login, then harness settings agents-start-agents on')
+ })
+
+ it('each limit, in its own words', () => {
+ expect(lines({ check: { reason: 'DEPTH', message: 'x' } })[1]).toBe('Can start harnesses: no. An agent started you, and only one level is allowed. Do the work yourself, or say in your answer what else is needed.')
+ expect(lines({ check: { reason: 'OPEN_LIMIT', message: 'x' }, count: { open: 4, starts: 4, depth: 0, oldestStartAt: null } })[1])
+ .toBe('Can start harnesses: no. You have 4 open, the most. To free a place: harness close <name>')
+ expect(lines({ check: { reason: 'MACHINE_LIMIT', message: 'Agents have 40 harnesses running on this machine, the most allowed. Close some first.' } })[1])
+ .toBe('Can start harnesses: no. Agents have 40 harnesses running on this machine, the most allowed. Close some first.')
+ const rate = buildContext(input({ check: { reason: 'START_RATE', message: 'x' }, count: { open: 0, starts: 20, depth: 0, oldestStartAt: Date.parse('2026-10-15T07:22:00Z') } }))
+ expect(formatContext(rate).split('\n')[1]).toMatch(/^Can start harnesses: not until \d\d:\d\d \(20 starts in 10 minutes\)\.$/)
+ expect(rate.quota?.nextStartAt).toBe('2026-10-15T07:32:00.000Z')
+ })
+
+ it('outside Harness: no pane, nothing can message it', () => {
+ const outside = { machineId: 'm', agentId: 'claude-code:abc', name: 'Claude Code', engine: 'claude', outside: true }
+ const c = buildContext(input({ caller: outside }))
+ expect(formatContext(c).split('\n')[0]).toBe('You: Claude Code, outside Harness, on Mac Auto. Nothing can message you here.')
+ expect(c.caller).toMatchObject({ kind: 'agent', agent: 'Claude Code', name: null, id: null, inside: false })
+ })
+
+ it('a pane whose harness is gone: may only look', () => {
+ expect(lines({ caller: null, orphan: true, count: null })).toEqual([
+ 'You: an agent in a Harness pane whose harness is gone, on Mac Auto.',
+ 'Can start harnesses: no. This pane\'s harness is no longer running. Only the person can start or close harnesses here.',
+ ])
+ })
+
+ it('the person: one line, no limits', () => {
+ const c = buildContext(input({ caller: null, count: null }))
+ expect(formatContext(c)).toBe('You: the person, on Mac Auto.')
+ expect(c).toMatchObject({ caller: { kind: 'person' }, canStart: null, quota: null })
+ })
+
+ it('keeps line 1 one line for an odd name, and line 3 short for many machines', () => {
+ const odd = { ...lead, name: `a "quoted"\nname ${'x'.repeat(200)}` }
+ const first = lines({ caller: odd })[0]
+ expect(first).not.toContain('\n')
+ expect(first.length).toBeLessThan(120)
+ const ten = Array.from({ length: 10 }, (_, i) => ({ machineId: `o${i}`, label: `box${i}`, status: 'running', current: false }))
+ expect(lines({ machines: ten })[2]).toBe('Yours: 1 open of 4 · 3 of 20 starts in the last 10 minutes · other machines: box0 (running), box1 (running), box2 (running), box3 (running), +6 more')
+ })
+})
diff --git a/cli/src/agentClient/context.ts b/cli/src/agentClient/context.ts
new file mode 100644
index 000000000..18b265893
--- /dev/null
+++ b/cli/src/agentClient/context.ts
@@ -0,0 +1,103 @@
+/**
+ * Where an agent is and what it may do, said before it acts (docs/design/2026-10-15-agent-experience.md, part 1).
+ * Pure: commands.ts gathers what it says.
+ */
+import type { NewMachine } from '../lib/newCommand.js'
+import { engineName } from '../messages/model.js'
+import type { Caller } from './model.js'
+
+/** Which limit refuses a start (commands.ts `spawnCheck`). */
+export type SpawnReason = 'DEPTH' | 'OPEN_LIMIT' | 'MACHINE_LIMIT' | 'START_RATE'
+
+/** What the limits count for one caller: its open harnesses, its starts in the window, its depth. */
+export interface SpawnCount { open: number; starts: number; depth: number; oldestStartAt: number | null }
+
+export type CanStartReason = 'SIGNED_OUT' | 'SWITCH_OFF' | 'ORPHAN' | SpawnReason
+
+export interface ContextInput {
+ /** The agent calling, or null: the person, or what is left of an agent ([orphan]). */
+ caller: Caller | null
+ orphan: boolean
+ /** This machine's name. */
+ machine: string
+ signedIn: boolean
+ /** "Agents can start other agents", as this computer keeps the account's choice. */
+ switchOn: boolean
+ check: { reason: SpawnReason; message: string } | null
+ count: SpawnCount | null
+ limits: { livePerHarness: number; perWindow: number; windowMs: number; depth: number }
+ /** The account's machines, this one included (marked `current`); empty when they could not be read. */
+ machines: readonly NewMachine[]
+ /** How this caller closes one of its harnesses: a command, or an MCP tool call. */
+ closeStep: string
+}
+
+export interface Context {
+ caller: { kind: 'agent' | 'person'; agent: string | null; name: string | null; id: string | null; inside: boolean; machine: string }
+ /** Null for the person: they are never refused. */
+ canStart: { ok: boolean; reason: CanStartReason | null; message: string; fix: string | null; fixBy: 'person' | 'you' | null } | null
+ quota: { open: number; maxOpen: number; starts: number; maxStarts: number; windowMinutes: number; depth: number; maxDepth: number; nextStartAt: string | null } | null
+ machines: Array<{ name: string; state: string }>
+}
+
+const TURN_ON = 'harness settings agents-start-agents on'
+/** Other machines named on line 3; the rest are counted. */
+const MACHINES_SHOWN = 4
+const oneLine = (text: string, max = 40): string => {
+ const flat = text.replace(/\s+/g, ' ').trim()
+ return flat.length > max ? `${flat.slice(0, max - 1)}…` : flat
+}
+
+export function buildContext(i: ContextInput): Context {
+ const agent = !!i.caller || i.orphan
+ const caller: Context['caller'] = {
+ kind: agent ? 'agent' : 'person',
+ agent: i.caller ? (i.caller.outside ? i.caller.name : engineName(i.caller.engine)) : null,
+ name: i.caller && !i.caller.outside ? i.caller.name : null,
+ id: i.caller && !i.caller.outside ? i.caller.agentId : null,
+ inside: !i.caller?.outside,
+ machine: i.machine,
+ }
+ const machines = i.machines.filter((m) => !m.current).map((m) => ({ name: m.label, state: m.status }))
+ if (!agent) return { caller, canStart: null, quota: null, machines }
+ const minutes = Math.round(i.limits.windowMs / 60_000)
+ const quota = i.caller && i.count ? {
+ open: i.count.open, maxOpen: i.limits.livePerHarness, starts: i.count.starts, maxStarts: i.limits.perWindow,
+ windowMinutes: minutes, depth: i.count.depth, maxDepth: i.limits.depth,
+ nextStartAt: i.count.starts >= i.limits.perWindow && i.count.oldestStartAt !== null ? new Date(i.count.oldestStartAt + i.limits.windowMs).toISOString() : null,
+ } : null
+ const no = (reason: CanStartReason, message: string, fix: string | null = null, fixBy: 'person' | 'you' | null = null) =>
+ ({ ok: false, reason, message, fix, fixBy })
+ // In the order a start is refused: who may start at all (the pane, the account), then the limits (`spawnCheck`).
+ const canStart: NonNullable<Context['canStart']> =
+ i.orphan && !i.caller ? no('ORPHAN', 'This pane\'s harness is no longer running. Only the person can start or close harnesses here.', null, 'person')
+ : !i.signedIn ? no('SIGNED_OUT', 'This computer is signed out of Harness, and starting is the account\'s choice.', `harness login, then ${TURN_ON}`, 'person')
+ : !i.switchOn ? no('SWITCH_OFF', 'The person has not turned on "Agents can start other agents".', TURN_ON, 'person')
+ : i.check?.reason === 'DEPTH' ? no('DEPTH', 'An agent started you, and only one level is allowed. Do the work yourself, or say in your answer what else is needed.')
+ : i.check?.reason === 'OPEN_LIMIT' ? no('OPEN_LIMIT', `You have ${quota?.open ?? i.limits.livePerHarness} open, the most.`, i.closeStep, 'you')
+ : i.check?.reason === 'MACHINE_LIMIT' ? no('MACHINE_LIMIT', i.check.message)
+ : i.check?.reason === 'START_RATE' ? no('START_RATE', `${i.limits.perWindow} starts in ${minutes} minutes.`, null, 'you')
+ : { ok: true, reason: null, message: '', fix: null, fixBy: null }
+ return { caller, canStart, quota, machines }
+}
+
+/** A time as the person's clock shows it. */
+const hhmm = (iso: string): string => new Date(iso).toTimeString().slice(0, 5)
+
+export function formatContext(c: Context): string {
+ const who = c.caller.kind === 'person' ? `You: the person, on ${c.caller.machine}.`
+ : !c.caller.agent ? `You: an agent in a Harness pane whose harness is gone, on ${c.caller.machine}.`
+ : c.caller.inside ? `You: ${c.caller.agent} "${oneLine(c.caller.name ?? '')}" (${(c.caller.id ?? '').slice(0, 8)}), inside Harness, on ${c.caller.machine}.`
+ : `You: ${c.caller.agent}, outside Harness, on ${c.caller.machine}. Nothing can message you here.`
+ if (!c.canStart) return who
+ const s = c.canStart
+ const asking = s.fixBy === 'you' ? 'To free a place' : s.reason === 'SWITCH_OFF' ? 'Ask them to run' : 'Ask the person to run'
+ const can = s.ok ? 'Can start harnesses: yes.'
+ : s.reason === 'START_RATE' && c.quota?.nextStartAt ? `Can start harnesses: not until ${hhmm(c.quota.nextStartAt)} (${s.message.replace(/\.$/, '')}).`
+ : `Can start harnesses: no. ${s.message}${s.fix ? ` ${asking}: ${s.fix}` : ''}`
+ if (!c.quota) return [who, can].join('\n')
+ const shown = c.machines.slice(0, MACHINES_SHOWN).map((m) => `${oneLine(m.name, 24)} (${m.state})`)
+ const more = c.machines.length > MACHINES_SHOWN ? [`+${c.machines.length - MACHINES_SHOWN} more`] : []
+ const others = shown.length ? ` · other machines: ${[...shown, ...more].join(', ')}` : ''
+ return [who, can, `Yours: ${c.quota.open} open of ${c.quota.maxOpen} · ${c.quota.starts} of ${c.quota.maxStarts} starts in the last ${c.quota.windowMinutes} minutes${others}`].join('\n')
+}
diff --git a/cli/src/agentClient/mcp.spec.ts b/cli/src/agentClient/mcp.spec.ts
index ca61bf468..f484cb6c3 100644
--- a/cli/src/agentClient/mcp.spec.ts
+++ b/cli/src/agentClient/mcp.spec.ts
@@ -17,7 +17,7 @@ const call = (name: string, args: Record<string, unknown> = {}, id = 1) => ({ js
describe('harness mcp', () => {
it('answers initialize in the client\'s protocol version when it knows it, with what to use Harness for', async () => {
const state: { client?: string } = {}
- const known = await answer({ jsonrpc: '2.0', id: 1, method: 'initialize', params: { protocolVersion: '2025-06-18', clientInfo: { name: 'cursor-vscode' } } }, deps(), state)
+ const known = await answer({ jsonrpc: '2.0', id: 1, method: 'initialize', params: { protocolVersion: '2025-06-18', clientInfo: { name: 'cursor-vscode' } } }, deps({ run: runner({ code: 1, out: '' }).run }), state)
expect(known).toMatchObject({ jsonrpc: '2.0', id: 1, result: { protocolVersion: '2025-06-18', capabilities: { tools: {} }, serverInfo: { name: 'harness' }, instructions: INSTRUCTIONS } })
expect(state.client).toBe('cursor-vscode')
const newer = await answer({ jsonrpc: '2.0', id: 2, method: 'initialize', params: { protocolVersion: '2099-01-01' } }, deps())
@@ -25,10 +25,34 @@ describe('harness mcp', () => {
expect(await answer({ jsonrpc: '2.0', id: 3, method: 'ping' }, deps())).toEqual({ jsonrpc: '2.0', id: 3, result: {} })
})
+ it('begins its instructions with who the agent is right now, from harness whoami', async () => {
+ const r = runner({ out: 'You: Codex, outside Harness, on studio. Nothing can message you here.\nCan start harnesses: yes.\n' })
+ const got = await answer({ jsonrpc: '2.0', id: 1, method: 'initialize', params: { protocolVersion: '2025-06-18', clientInfo: { name: 'codex-mcp-client' } } }, deps({ run: r.run }))
+ expect(r.calls.map((c) => c.argv)).toEqual([['whoami']])
+ expect(r.calls[0].env.AI_AGENT).toBe('codex')
+ expect((got!.result as { instructions: string }).instructions)
+ .toBe(`Right now:\nYou: Codex, outside Harness, on studio. Nothing can message you here.\nCan start harnesses: yes.\n\n${INSTRUCTIONS}`)
+ })
+
+ it('connects with the plain instructions when whoami fails or is slow', async () => {
+ const failed = await answer({ jsonrpc: '2.0', id: 1, method: 'initialize', params: {} }, deps({ run: runner({ code: 1, out: '' }).run }))
+ expect((failed!.result as { instructions: string }).instructions).toBe(INSTRUCTIONS)
+ const slow = await answer({ jsonrpc: '2.0', id: 2, method: 'initialize', params: {} }, deps({ run: () => new Promise(() => {}), whoamiMs: 5 }))
+ expect((slow!.result as { instructions: string }).instructions).toBe(INSTRUCTIONS)
+ })
+
+ it('offers harness_whoami as a read-only tool that runs harness whoami', async () => {
+ const r = runner()
+ await answer(call('harness_whoami'), deps({ run: r.run }))
+ expect(r.calls[0].argv).toEqual(['whoami'])
+ expect(TOOLS.find((t) => t.name === 'harness_whoami')?.annotations).toEqual({ readOnlyHint: true })
+ expect(INSTRUCTIONS).toContain('harness_whoami')
+ })
+
it('lists send only to a harness in its own pane: an agent outside Harness has nothing to be answered at', async () => {
const names = async (inPane: boolean) => ((await answer({ jsonrpc: '2.0', id: 1, method: 'tools/list' }, deps({ inPane })))!.result as { tools: Array<{ name: string; argv?: unknown }> }).tools
const outside = await names(false)
- expect(outside.map((t) => t.name)).toEqual(['harness_list', 'harness_start', 'harness_wait', 'harness_read', 'harness_close'])
+ expect(outside.map((t) => t.name)).toEqual(['harness_whoami', 'harness_list', 'harness_start', 'harness_wait', 'harness_read', 'harness_close'])
expect(outside.every((t) => t.argv === undefined)).toBe(true)
expect((await names(true)).map((t) => t.name)).toContain('harness_send')
expect(await answer(call('harness_send', { to: 'x', text: 'y' }), deps())).toMatchObject({ error: { code: -32602 } })
@@ -51,7 +75,7 @@ describe('harness mcp', () => {
const codexAsks = (a: Record<string, unknown> = {}) => a.destructiveHint === true || (a.readOnlyHint !== true && (a.destructiveHint !== false || a.openWorldHint !== false))
const listed = ((await answer({ jsonrpc: '2.0', id: 1, method: 'tools/list' }, deps({ inPane: true })))!.result as { tools: Array<{ name: string; annotations?: Record<string, unknown> }> }).tools
expect(Object.fromEntries(listed.map((tool) => [tool.name, codexAsks(tool.annotations)]))).toEqual({
- harness_list: false, harness_start: false, harness_wait: false, harness_read: false, harness_send: false, harness_close: false,
+ harness_whoami: false, harness_list: false, harness_start: false, harness_wait: false, harness_read: false, harness_send: false, harness_close: false,
})
})
diff --git a/cli/src/agentClient/mcp.ts b/cli/src/agentClient/mcp.ts
index c0a76108d..2b7043788 100644
--- a/cli/src/agentClient/mcp.ts
+++ b/cli/src/agentClient/mcp.ts
@@ -25,7 +25,7 @@ export const INSTRUCTIONS = `Harness runs coding agents (Claude Code, Codex) in
Every harness spends the person's tokens. Start one (harness_start) only for work that can run in parallel with yours, needs another model's view (a review, a second opinion from Codex), takes long, or belongs in its own folder. Do quick work yourself. For scratch or new work give it a project name (project), not a folder of your own: Claude Code and Codex ask the person to trust a folder Harness did not make.
-List first (harness_list). Put everything in the task: starting a harness does not let you message it. A follow-up goes by harness_send only to a teammate in your tab, while Agent Messages are on; otherwise start a new harness with the fuller task. Never give work to, or close, a harness you did not start: those are the person's.
+Call harness_whoami first: it says whether you may start harnesses now. Then list (harness_list). Put everything in the task: starting a harness does not let you message it. A follow-up goes by harness_send only to a teammate in your tab, while Agent Messages are on; otherwise start a new harness with the fuller task. Never give work to, or close, a harness you did not start: those are the person's.
Name every harness. Then wait for it (harness_wait), read its answer (harness_read), and close it once you have its answer (harness_close). At most 4 of yours at once, and a harness another agent started may not start harnesses itself. Never ask a harness to publish, deploy, delete or push.`
@@ -48,6 +48,13 @@ const str = (value: unknown): string => (typeof value === 'string' ? value.trim(
const schema = (properties: Record<string, unknown>, required: string[] = []) => ({ type: 'object', properties, required, additionalProperties: false })
export const TOOLS: Tool[] = [
+ {
+ name: 'harness_whoami',
+ description: 'Who you are to Harness: which agent, on which machine, inside Harness or not; whether you may start harnesses now and, if not, who can change that; how many of yours are open and how many starts are left. Call it first, and whenever a start is refused.',
+ inputSchema: schema({}),
+ annotations: { readOnlyHint: true },
+ argv: () => ['whoami'],
+ },
{
name: 'harness_list',
description: 'The harnesses on this machine: name, agent, state (working, idle, needs-input), who started each ("you" for yours), when it was last active, its folder, and what it is about.',
@@ -149,6 +156,8 @@ export interface McpDeps {
session?: string
/** Messages reach only a harness's pane, and an agent outside Harness has none to answer from. */
inPane?: boolean
+ /** How long `initialize` waits for `harness whoami` before it answers without it (5 s). */
+ whoamiMs?: number
}
type Message = { jsonrpc?: string; id?: string | number | null; method?: string; params?: Record<string, unknown> }
@@ -166,11 +175,19 @@ export async function answer(message: Message, deps: McpDeps, state: { client?:
const asked = str(message.params?.protocolVersion)
const info = message.params?.clientInfo as { name?: unknown } | undefined
state.client = str(info?.name)
+ // Where the agent is and what it may do, as it connects: the block `harness whoami` prints. It never holds the
+ // connection up: without it in time, the instructions alone.
+ let timer: NodeJS.Timeout | undefined
+ const here = await Promise.race([
+ deps.run(['whoami'], callerEnv(deps, state.client)).catch(() => null),
+ new Promise<null>((done) => { timer = setTimeout(() => done(null), deps.whoamiMs ?? 5_000); timer.unref?.() }),
+ ]).finally(() => clearTimeout(timer))
+ const now = here && here.code === EXIT.ok && here.out.trim() ? `Right now:\n${here.out.trim()}\n\n` : ''
return reply({
protocolVersion: (PROTOCOL_VERSIONS as readonly string[]).includes(asked) ? asked : PROTOCOL_VERSIONS[0],
capabilities: { tools: {} },
serverInfo: { name: 'harness', title: 'Harness', version: VERSION },
- instructions: INSTRUCTIONS,
+ instructions: `${now}${INSTRUCTIONS}`,
})
}
case 'ping': return reply({})
diff --git a/cli/src/cli.ts b/cli/src/cli.ts
index b1357c291..14181a069 100644
--- a/cli/src/cli.ts
+++ b/cli/src/cli.ts
@@ -145,6 +145,7 @@ Machine:
every harness, live or stopped (--limit=N, --json)
harness send <name> "text" from an agent's pane: message a teammate in this tab (Agent Messages,
Settings ▸ Experimental); \`harness send\` alone lists who is here
+ harness whoami who you are to Harness: which agent, which machine, whether you may start harnesses
harness ps [--all] the harnesses here: state, who started each, what each is about
harness show <name> a harness's state and last turn: what it was asked and what it answered
harness wait <name>[,<name>] wait until they stop working (--any, --timeout 30m); exit 3 = needs the person
@@ -2497,7 +2498,7 @@ async function logsExportCommand(json: boolean): Promise<void> {
import { orchestratorCommand } from './orchestrator/command.js'
import { paneOwner, sendCommand } from './messages/command.js'
-import { agentOrigin, closeCommand, psCommand, showCommand, waitCommand } from './agentClient/commands.js'
+import { agentOrigin, closeCommand, psCommand, showCommand, waitCommand, whoamiCommand } from './agentClient/commands.js'
import { openUrlCommand } from './agentClient/openUrl.js'
import { harnessRunner, mcpCommand } from './agentClient/mcp.js'
import { settingsCommand } from './agentClient/settings.js'
@@ -2539,6 +2540,9 @@ switch (cmd) {
case 'open-url':
openUrlCommand(rest).then(code => { process.exitCode = code }).catch(() => { process.exitCode = 1 })
break
+ case 'whoami':
+ whoamiCommand(rest, { machines: ownedMachines }).then(code => { process.exitCode = code }).catch(onError)
+ break
case 'ps':
psCommand(rest, { machines: ownedMachines }).then(code => { process.exitCode = code }).catch(onError)
break
diff --git a/cli/src/engines/__fixtures__/hook-installers.golden.json b/cli/src/engines/__fixtures__/hook-installers.golden.json
index 1c9b4a01a..b22e770cf 100644
--- a/cli/src/engines/__fixtures__/hook-installers.golden.json
+++ b/cli/src/engines/__fixtures__/hook-installers.golden.json
@@ -27,7 +27,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -59,7 +59,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -464,7 +464,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -496,7 +496,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -611,7 +611,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -642,7 +642,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -673,7 +673,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-after\"\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -704,7 +704,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 30\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -736,7 +736,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -795,7 +795,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-first\"\n },\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -826,7 +826,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ],\n \"matcher\": \"other\"\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -857,7 +857,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -889,7 +889,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -925,7 +925,7 @@
"elsewhere/real.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -960,7 +960,7 @@
"elsewhere/real.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -1185,7 +1185,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "600",
- "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -1243,7 +1243,7 @@
"moved/claude-work/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
},
"moved/claude-work/settings.json.<pid>.tmp": {
"type": "file",
@@ -1276,7 +1276,7 @@
"home/.claude/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
},
"home/.harness": {
"type": "dir",
@@ -1308,7 +1308,7 @@
"home/.claude/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
},
"home/.harness": {
"type": "dir",
@@ -1368,7 +1368,7 @@
"home/.claude/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
},
"home/.harness": {
"type": "dir",
@@ -1427,7 +1427,7 @@
"home/.claude/settings.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"hooks\": {\n \"SessionStart\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
},
"home/.harness": {
"type": "dir",
@@ -1467,7 +1467,7 @@
"elsewhere/real.json": {
"type": "file",
"mode": "644",
- "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
+ "text": "{\n \"model\": \"opus\",\n \"nested\": {\n \"list\": [\n 1,\n 2.5,\n \"x\"\n ],\n \"none\": null\n },\n \"note\": \"caf\u00e9 \u2713 \ud83c\udf89\",\n \"hooks\": {\n \"SessionStart\": [\n {\n \"matcher\": \"resume\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-start\",\n \"timeout\": 9\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"UserPromptSubmit\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-prompt\"\n }\n ]\n },\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PreToolUse\": [\n {\n \"matcher\": \"Bash\",\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"foreign-tool\"\n }\n ]\n }\n ],\n \"SessionEnd\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"Stop\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"StopFailure\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"<command claude 19473>\",\n \"timeout\": 5\n }\n ]\n }\n ],\n \"PostToolUse\": [\n {\n \"hooks\": [\n {\n \"type\": \"command\",\n \"command\": \"p='<root>/home/.harness/agent-messages/inbox'/\\\"${TMUX_PANE#%}\\\"; [ -n \\\"${TMUX_PANE:-}\\\" ] && [ -d \\\"$p\\\" ] || exit 0; '<node>' '<root>/home/.harness/agent-messages/hook.mjs' --root '<root>/home/.harness/agent-messages'; exit 0 # harness-agent-messages\",\n \"timeout\": 5\n }\n ]\n }\n ]\n },\n \"permissions\": {\n \"allow\": [\n \"Bash(harness --help)\",\n \"Bash(harness -h)\",\n \"Bash(<root>/home/.local/bin/harness --help)\",\n \"Bash(harness whoami:*)\",\n \"Bash(<root>/home/.local/bin/harness whoami:*)\",\n \"mcp__harness__harness_whoami\",\n \"mcp__plugin_harness_harness__harness_whoami\",\n \"Bash(harness ps:*)\",\n \"Bash(<root>/home/.local/bin/harness ps:*)\",\n \"mcp__harness__harness_list\",\n \"mcp__plugin_harness_harness__harness_list\",\n \"Bash(harness show:*)\",\n \"Bash(<root>/home/.local/bin/harness show:*)\",\n \"mcp__harness__harness_read\",\n \"mcp__plugin_harness_harness__harness_read\",\n \"Bash(harness wait:*)\",\n \"Bash(<root>/home/.local/bin/harness wait:*)\",\n \"mcp__harness__harness_wait\",\n \"mcp__plugin_harness_harness__harness_wait\",\n \"Bash(harness new:*)\",\n \"Bash(<root>/home/.local/bin/harness new:*)\",\n \"mcp__harness__harness_start\",\n \"mcp__plugin_harness_harness__harness_start\",\n \"Bash(harness close:*)\",\n \"Bash(<root>/home/.local/bin/harness close:*)\",\n \"mcp__harness__harness_close\",\n \"mcp__plugin_harness_harness__harness_close\",\n \"Bash(harness send:*)\",\n \"Bash(<root>/home/.local/bin/harness send:*)\",\n \"mcp__harness__harness_send\",\n \"mcp__plugin_harness_harness__harness_send\"\n ]\n }\n}\n"
}
}
},
@@ -1515,7 +1515,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -1563,7 +1563,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2012,7 +2012,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2060,7 +2060,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2209,7 +2209,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2256,7 +2256,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2303,7 +2303,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2350,7 +2350,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2398,7 +2398,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2514,7 +2514,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2562,7 +2562,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2610,7 +2610,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2657,7 +2657,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
},
"elsewhere/real.json": {
"type": "file",
@@ -2708,7 +2708,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
},
"elsewhere/real.json": {
"type": "file",
@@ -2859,7 +2859,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -2985,7 +2985,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -3066,7 +3066,7 @@
"moved/codex-work/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
}
}
},
@@ -3110,7 +3110,7 @@
"home/.codex/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
},
"home/.harness": {
"type": "dir",
@@ -3158,7 +3158,7 @@
"home/.codex/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
},
"home/.harness": {
"type": "dir",
@@ -3235,7 +3235,7 @@
"home/.codex/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
},
"home/.harness": {
"type": "dir",
@@ -3316,7 +3316,7 @@
"home/.codex/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
},
"home/.harness": {
"type": "dir",
@@ -3363,7 +3363,7 @@
"home/.codex/rules/harness.rules": {
"type": "file",
"mode": "600",
- "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
+ "text": "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\nhost_executable(name=\"harness\", paths=[\"<root>/home/.local/bin/harness\"])\nprefix_rule(pattern=[\"harness\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\nprefix_rule(pattern=[\"<node>\", \"<root>/home/.harness/cli/cli.js\", [\"whoami\", \"ps\", \"show\", \"wait\", \"new\", \"close\", \"send\"]], decision=\"allow\")\n"
},
"home/.harness": {
"type": "dir",
diff --git a/cli/src/engines/facets/hooks.ts b/cli/src/engines/facets/hooks.ts
index 467e76d99..fcfa146af 100644
--- a/cli/src/engines/facets/hooks.ts
+++ b/cli/src/engines/facets/hooks.ts
@@ -89,7 +89,7 @@ export interface HookSettings {
* sandboxed try first. `harness settings` is not one of them: it changes what agents may do, so it still asks.
*/
export const HARNESS_AGENT_TOOLS = {
- ps: 'harness_list', show: 'harness_read', wait: 'harness_wait', new: 'harness_start', close: 'harness_close', send: 'harness_send',
+ whoami: 'harness_whoami', ps: 'harness_list', show: 'harness_read', wait: 'harness_wait', new: 'harness_start', close: 'harness_close', send: 'harness_send',
} as const
export type HarnessAgentVerb = keyof typeof HARNESS_AGENT_TOOLS
export const HARNESS_AGENT_VERBS = Object.keys(HARNESS_AGENT_TOOLS) as HarnessAgentVerb[]
diff --git a/cli/src/engines/kit/hookSettings.spec.ts b/cli/src/engines/kit/hookSettings.spec.ts
index 5c6ff90e5..e56741839 100644
--- a/cli/src/engines/kit/hookSettings.spec.ts
+++ b/cli/src/engines/kit/hookSettings.spec.ts
@@ -219,8 +219,8 @@ it('allows only Harness\'s own MCP tools, not every tool of a server that is als
/** Harness's Codex rules file on this computer, byte for byte. */
const codexRulesFile = (): string => {
- const verbs = '["ps", "show", "wait", "new", "close", "send"]'
- return "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness ps, show, wait, new, close, send)\n"
+ const verbs = '["whoami", "ps", "show", "wait", "new", "close", "send"]'
+ return "# Written by Harness, which rewrites it: do not edit. Its agent commands (harness whoami, ps, show, wait, new, close, send)\n"
+ "# need Harness's daemon, which Codex's sandbox cannot reach, so they run outside it without asking. What each\n"
+ '# may do is for Harness to decide: Settings > Experimental, and an agent gives work to and closes only what it started.\n'
// Only the launcher's path counts as `harness` by its last part: not a `harness` an agent wrote elsewhere.
diff --git a/docs/cli.md b/docs/cli.md
index a02764e54..78c5f1157 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -109,6 +109,17 @@ auto|ask|plan|full`, `--name`, `--new [name]` and `--json` are the rest. There i
harness on another of your machines: `harness new claude --machine office --name check -- …`, then
`harness wait --machine office check` and `harness show --machine office check`.
+`harness whoami` says, for an agent, where it is and what it may do before it acts (`--json` gives the same as
+`context`); the top of an agent's `harness ps` begins with it, and `harness mcp` puts it in its instructions:
+
+```
+You: <agent> "<name>" (<id>), inside Harness, on <machine>.
+Can start harnesses: <yes, or no and why>. <who can change it, and the command>
+Yours: <open> open of <max> · <starts> of <max starts> starts in the last <minutes> minutes · other machines: <machine> (<state>), …
+```
+
+Run by the person, it prints the first line only: `You: the person, on <machine>.`
+
## Your devices
Signing in is what makes a device trusted: every computer and app signed in to the account adds its
diff --git a/docs/design/2026-10-11-agent-client.md b/docs/design/2026-10-11-agent-client.md
index aaea22811..fbe8c0442 100644
--- a/docs/design/2026-10-11-agent-client.md
+++ b/docs/design/2026-10-11-agent-client.md
@@ -43,6 +43,7 @@ and the person's view of it.
## The agent's side
```
+harness whoami # who and where you are, whether you may start, your limits (2026-10-15-agent-experience.md)
harness ps [--all] # the harnesses here: state, who started each, what each is about
harness new [agent] [--machine <name>] [folder] --name N -- <task> # exists; now knows when an agent runs it
harness show <name> [--chars N] # its state, the last ask and the answer
diff --git a/docs/design/2026-10-15-agent-experience.md b/docs/design/2026-10-15-agent-experience.md
new file mode 100644
index 000000000..3e4bc3e2a
--- /dev/null
+++ b/docs/design/2026-10-15-agent-experience.md
@@ -0,0 +1,281 @@
+# Harness for agents, at first glance
+
+October 15, 2026. Design, not built. Follows [Harness for agents](2026-10-11-agent-client.md).
+
+## Goal
+
+An agent that has never seen Harness (Claude Code, Codex, a script like the lamp's) can get from "is Harness
+here?" to a finished task on another machine without guessing. At every step it knows four things:
+
+1. **Where it is**: which agent it is, on which machine, inside or outside Harness.
+2. **What it may do**: whether it can start harnesses, and how much of its limit is left.
+3. **What the last command did**: what changed, on which machine, who can see it.
+4. **What to run next**: the exact command, for every result and every error.
+
+**Success:** in the eval (part 9), a Claude Code and a Codex agent that have never seen Harness finish a
+two-machine task with no wrong command and no command run only to find out where they are. Today's baseline is
+measured first.
+
+**Not in scope:** the core daemon, the windows, the TUI's own command language, new limits or new permissions.
+
+## What an agent sees today (CLI 0.4.4, the owner's Mac, October 15)
+
+| Moment | What it sees | What is missing |
+|---|---|---|
+| `harness --help` | about 100 lines; the agent verbs sit between `login`, `flash` and `grid` | a short page for agents |
+| `harness ps` | `You are "<name>" (<id>).`, then 40 rows, nearly all the person's idle harnesses | the machine; that starting is off; how much of its limit is left; what to do next |
+| `harness machines` | `AGENTS 0` on every machine, also this one with 40 harnesses | what the number counts; which machines it can reach |
+| `harness settings` | three switches, all off | that only the person can turn them on |
+| `harness new` with starting off | refused, with how the person turns it on | it learns this only by trying |
+| `harness wait` | a state and a next step per harness (good) | `gone` has no next step |
+| errors | each says what to run next (good) | keep this |
+| `npx -y @autonomous-ai/harness-mcp` (in `llms.txt` and `/agents`) | npm 404: never published | |
+
+What already exists and is reused: `agentOrigin()` (who calls), `SPAWN_LIMITS` and `spawnRefusal()` (the limits,
+and whether a start would be refused), `agent-settings.json` (the switches), `step()` (the next command, written as
+a CLI command or as an MCP tool call), `AgentClientError` codes, the MCP tool annotations.
+
+## What other tools do (quick survey, October 15)
+
+| Pattern | Who | Taken here as |
+|---|---|---|
+| a "who and where am I" command | `gh auth status`, `kubectl config current-context`, `vercel whoami` | `harness whoami` (part 1) |
+| the state after every action | Playwright MCP returns the page after each action | every verb ends with the state and Next (part 2) |
+| a state for "waiting on a person" and for "refused" | A2A task states `input-required`, `auth-required`, `rejected` | `needs-person`, `signed-out`, `refused` (part 3) |
+| exit codes that hold in JSON mode too | `gh` (pitfall: exits 0 on many errors in JSON mode) | same exit codes with `--json` (part 3) |
+| text plus typed fields | MCP `structuredContent` with `outputSchema` | MCP returns both (part 6) |
+| a read-only mode | GitHub MCP `--read-only` | `harness mcp --read-only` (part 6) |
+| completion is a signal, not a guess | Claude Code notifies the parent; models claimed "done" before the signal | only `wait` / `show` say done (part 2) |
+| prototype, eval, then improve | Anthropic, "Writing effective tools for agents" | part 9 |
+
+Read at summary level: [gh auth status](https://cli.github.com/manual/gh_auth_status),
+[Playwright MCP snapshots](https://playwright.dev/mcp/snapshots),
+[A2A task states](https://a2aprotocol.ai/docs/guide/a2a-protocol-specification-python),
+[MCP 2025-11-25 changes](https://workos.com/blog/mcp-2025-11-25-spec-update),
+[MCP Tasks extension](https://aaif.io/blog/handle-long-running-mcp-tool-calls-with-the-mcp-tasks-extension),
+[GitHub MCP configuration](https://glama.ai/mcp/servers/@github/github-mcp-server/blob/bf6467855c13d3b8f5cf72f8dfd9c86f8336b20b/docs/server-configuration.md),
+[Anthropic, Writing effective tools for agents](https://www.anthropic.com/engineering/writing-tools-for-agents).
+
+## Part 1. The context block: where am I, what may I do
+
+Three lines at most:
+
+```
+You: <agent> "<name>" (<id>), inside Harness, on <machine>.
+Can start harnesses: <yes, or no and why>. <who can change it, and the command>
+Yours: <open> open of <max> · <starts> of <max starts> starts in the last <minutes> minutes · other machines: <machine> (<state>), …
+```
+
+Line 2, by case, in the order `spawnRefusal()` checks them:
+
+| Case | Line 2 |
+|---|---|
+| allowed | `Can start harnesses: yes.` |
+| switch off | `Can start harnesses: no. The person has not turned on "Agents can start other agents". Ask them to run: harness settings agents-start-agents on` |
+| this computer signed out | `Can start harnesses: no. This computer is signed out of Harness, and starting is the account's choice. Ask the person to run: harness login, then harness settings agents-start-agents on` |
+| started by an agent (depth) | `Can start harnesses: no. An agent started you, and only one level is allowed. Do the work yourself, or say in your answer what else is needed.` |
+| the most open (4) | `Can start harnesses: no. You have <open> open, the most. To free a place: harness close <name>` |
+| the most starts (20 in 10 minutes) | `Can start harnesses: not until <time> (<max starts> starts in <minutes> minutes).` |
+| the most on this machine (40) | `Can start harnesses: no. Agents have <n> harnesses running on this machine, the most allowed. Close some first.` |
+| a pane whose harness is gone | `Can start harnesses: no. This pane's harness is no longer running. Only the person can start or close harnesses here.` |
+| a person | line 2 and 3 left out |
+
+Outside Harness, line 1 reads `You: <agent>, outside Harness, on <machine>. Nothing can message you here.`
+
+**Where it is shown**
+
+| Where | What |
+|---|---|
+| `harness whoami` (new verb) | the block; `--json` gives `context` alone |
+| top of `harness ps` | the block, for an agent, replacing today's `You are …` line; a person's `ps` is unchanged |
+| `new`, `show`, `wait`, `close` | not the block; their result names the machine instead (part 2) |
+| `--json` of `ps` and `whoami` | `context` (below) |
+| MCP | the block at connect time, in `initialize` `instructions`; and a `harness_whoami` tool |
+
+```json
+"context": {
+ "caller": { "kind": "agent" | "person", "agent": "<agent>" | null, "name": "<name>" | null, "id": "<id>" | null, "inside": <boolean>, "machine": "<machine>" },
+ "canStart": { "ok": <boolean>, "reason": "<reason>" | null, "message": "<why>", "fix": "<command>" | null, "fixBy": "person" | "you" | null } | null,
+ "quota": { "open": <n>, "maxOpen": <n>, "starts": <n>, "maxStarts": <n>, "windowMinutes": <n>, "depth": <n>, "maxDepth": <n>, "nextStartAt": "<ISO time>" | null } | null,
+ "machines": [ { "name": "<machine>", "state": "<state>" } ]
+}
+```
+
+`reason` is one of `SIGNED_OUT`, `SWITCH_OFF`, `ORPHAN`, `DEPTH`, `OPEN_LIMIT`, `MACHINE_LIMIT`, `START_RATE`;
+`fixBy` is `person` or `you`.
+
+**Cost.** Switches and the record of starts are local files. The machines line uses the account's machine list
+the daemon already holds; it does not ask each machine, so `ps` stays fast. The count of this agent's harnesses
+on other machines stays exact only in `new`, as today, so the header can count fewer open than `new` does; `new`
+still refuses correctly and says so.
+
+## Part 2. Every verb answers the same way: result, effect, Next
+
+Each verb's text ends with:
+
+- **Result**: one line, `<name> on <machine>: <state>`.
+- **Effect**, only when something changed: what, and who sees it.
+- **Next**: `Next: <command>`, one to three lines, each with when to pick it.
+
+| Verb | Result and effect | Next |
+|---|---|---|
+| `new` | `<name> on <machine>: starting. <agent>, in <folder>. The person sees it in Harness, beside you.` | `Next: harness wait --machine <machine> <name>` (then read it with `harness show`) |
+| `new`, held for an install | `<name> on <machine>: installing <agent> (about <time>).` | `Next: harness wait --machine <machine> <name>. Do not start it again.` |
+| `ps` | the block, then rows: yours first, then working or waiting, then the rest (part 4) | none open: `Next: harness new …`; one idle: `Next: harness show <name>, then harness close <name>` |
+| `show` | `<name> on <machine>: idle · asked … · answer …` | yours and idle: `Next: harness close --machine <machine> <name>`; working: `Next: harness wait …`; needs the person: `Next: tell the person; only they answer it` |
+| `wait` | one line per harness (today's lines) | adds a Next to `gone`: `Next: harness ps --all --machine <machine>, to see if it was closed` |
+| `close` | `<name> on <machine>: closed. Its conversation is kept; the person can resume it.` | `Next: nothing; you have <open> open of <max>.` |
+| `send` | `sent to <name> (read <time>)` | `Next: harness wait <name>` |
+| `whoami` | the block | when it cannot start: who must do what |
+
+Rules:
+
+- A command is written with `step()`, so it is a shell command for the CLI and a tool call for MCP.
+- `Next` names only what the caller may run. A harness the caller did not start never gets `close` as Next.
+- **Done is said only by `wait` and `show`.** `new` says `starting`, never `started the task`, and `send` says
+ `sent`, never `done`.
+- `--json` adds the same, as fields: `"effect": "…"` and `"next": [{ "run": "harness wait …", "when": "to get its answer" }]`.
+ Additive: no field is renamed or removed.
+
+## Part 3. States and exit codes
+
+One set of states, the same words in `ps`, `show`, `wait`, `--json` and MCP:
+
+| State | Means | Exit (`wait`) | Next |
+|---|---|---|---|
+| `installing` | Harness is installing the agent on that machine | 124 when the wait ends | wait again |
+| `starting` | the agent is opening | 124 | wait again |
+| `working` | busy | 124 | wait again |
+| `needs-person` | a question or a permission only the person answers | 3 | tell the person |
+| `signed-out` (new) | the agent on that machine is not signed in to its provider | 3 | tell the person: `<agent's login command>` on `<machine>` |
+| `idle` | finished its turn | 0 | `show`, then `close` |
+| `closed` | the caller closed it | 0 | none |
+| `stopped` | stopped by the person, or by the idle cleanup | 4 | `show` still reads its answer |
+| `gone` | no longer on its machine | 4 | `ps --all` |
+| `failed` | never started, with why | 4 | fix what it says, or tell the person |
+
+- Text says `needs the person`; `--json` keeps `needs-input` and adds `"needsPerson": true`, so nothing that reads
+ today's JSON breaks.
+- **`signed-out` needs work first**: Harness does not detect it today. Phase 6 adds it from what the agent's screen
+ shows at start (Codex and Claude Code print a sign-in prompt), only where it is detected reliably; otherwise
+ it stays `needs-person`.
+- **Refusals** (`SPAWN_LIMIT`, `NOT_YOURS`, the switch off) exit **5** (new; today 1) with the error code in
+ `--json` (`{"error": {"code": "SPAWN_LIMIT", "reason": "OPEN_LIMIT", "message": "…", "next": [...]}}`). A refusal
+ is not a failure: the agent should not retry, it should tell the person or do the work itself.
+- Exit codes are the same with or without `--json`. They are listed in one place: `harness help agents`.
+
+## Part 4. Less to read: `ps` and the help
+
+**`ps`** by default shows, after the block:
+
+1. the caller's own harnesses, every state;
+2. harnesses working or needing the person;
+3. the rest of the live ones, up to 15 rows in total;
+
+then one line: `and 31 more, idle: harness ps --all`. A person running `ps` sees all live ones, as today.
+On the owner's Mac this cuts `ps` from 40 rows to about 8.
+
+**`harness help agents`** (new): at most 40 lines. The block's meaning, the six verbs with one example each, the
+states and exit codes, the limits, the rules. It is generated from the same strings as each verb's usage, so it
+cannot drift.
+
+**`harness --help`**: its first lines say `An agent? Run: harness help agents`. When the caller is an agent (its
+pane, or `AI_AGENT` / `HARNESS_AGENT_SESSION` set), the agent section is printed first.
+
+**`harness machines`**: the `AGENTS` column counts live harnesses (it says 0 today), and a new column says whether
+this machine can reach it now: `yes`, `offline`, `older Harness (0.3.x): update it`.
+
+## Part 5. Across machines
+
+- **`ps --machine all`**: every reachable machine, one section each, the block once. A machine that does not answer
+ in 3 seconds is listed as `not answering` and skipped.
+- **Clean up across machines**: closing a harness closes the harnesses it started on other machines too, through
+ the same relay `close --machine` uses. Today each machine's cleanup sees only its own.
+- **Older Harness on the other machine**: `new --machine` says so before it starts and names the update
+ (`harness update` on `<machine>`), instead of a vague failure.
+- **Fix from #1333**: `ps`/`show --machine` label a harness that machine's own agent started as "started by person";
+ read who started it from that machine's record.
+
+## Part 6. MCP
+
+- Each tool returns its text **and** `structuredContent` with the `--json` fields, and declares `outputSchema`.
+ Clients that read only text see the same as today.
+- `harness_whoami` (read-only) returns the block.
+- `instructions` in `initialize` carries the block as it is at connect time, then the rules.
+- `harness mcp --read-only` serves only `harness_whoami`, `harness_list`, `harness_read` and `harness_wait`, for an
+ agent that should only watch.
+- Annotations stay as they are (`list`, `read`, `wait` read-only; `close` not destructive and idempotent;
+ `start` and `send` not destructive). `harness_whoami` is read-only.
+- Not now: MCP Tasks (spec 2026-07-28) for `harness_start`; added once Claude Code and Codex support it.
+ `harness_wait`'s "call again" stays.
+
+## Part 7. Being found
+
+| Step | Who | What |
+|---|---|---|
+| 1 | us, now | `llms.txt` and `/agents` stop telling agents to run the npm package until it is published |
+| 2 | owner | publish `@autonomous-ai/harness-mcp` to npm (an `autonomous-ai` npm org account) |
+| 3 | us | the CLI release workflow builds `harness-mcp.mcpb` and attaches it, so it is not a manual step (`make mcpb` today) |
+| 4 | owner | publish `server.json` to the Official MCP Registry (`io.github.autonomous-ai/harness`) |
+| 5 | us | Smithery, Glama and the lists in `docs/research/2026-10-11-listing-submissions.md` |
+| 6 | us | `llms.txt`, `SKILL.md` and `/agents` lead with `harness whoami` as the first command |
+
+**One source of truth test**: `website/scripts/listings.spec.ts` already checks the listing files. Add a check that
+every verb and option in `llms.txt`, `SKILL.md` and `/agents` exists in the CLI's usage, and every agent verb is in
+all three. #1333 had to fix `@mini` in two of them by hand; this test would have caught it.
+
+## Part 8. Docs that change with the code
+
+`plugins/harness/skills/harness/SKILL.md`, `website/public/llms.txt`, `website/public/agents/index.html`,
+`docs/cli.md`, `docs/design/2026-10-11-agent-client.md`, `harness --help`, each verb's usage. Each phase updates
+the ones it touches; the test in part 7 fails otherwise.
+
+## Part 9. Proving it: the eval
+
+Extends the eval in the agent-client design (`cli/scripts/route-eval/` style).
+
+- **Agents**: Claude Code and Codex, a fresh session each, given only `llms.txt` (outside Harness) or nothing but
+ being in a pane (inside).
+- **Tasks** (8): get a second opinion from Codex on this machine; run tests on another `<machine>` and report; the switch
+ is off (right answer: tell the person); the limit is full; a harness needs the person; read a harness the person
+ started (right answer: read, do not close); a machine is offline; the agent on another `<machine>` is signed out.
+- **Measured from the transcript**: commands until the first useful one, wrong commands, commands run only to find
+ where it is, retries after a refusal (should be 0), harnesses left open at the end (should be 0), task done.
+- **Before and after**: run on today's CLI first for the baseline, then after each phase. Real machines, the
+ owner's account, at most 2 harnesses per run; the person approves each run.
+
+## Phases (one pull request each)
+
+| # | Phase | Size | Depends on |
+|---|---|---|---|
+| 1 | Docs stop the broken `npx` line; the one-source-of-truth test | S | none |
+| 2 | Eval harness and today's baseline | M | none |
+| 3 | Context block: `whoami`, the `ps` header, `context` in JSON, MCP `harness_whoami` and `instructions` | M | none |
+| 4 | Result, effect, Next on every verb; `next` and `effect` in JSON; `gone` gets a Next | M | 3 |
+| 5 | States and exit codes: `needs-person` wording, refusals exit 5 | S | 4 |
+| 6 | `signed-out` detection (only where reliable) | M | 5 |
+| 7 | Less to read: `ps` default, `harness help agents`, `--help` first lines, `machines` columns | M | 3 |
+| 8 | MCP: `structuredContent`, `outputSchema`, `--read-only` | S | 4 |
+| 9 | Across machines: `ps --machine all`, cross-machine cleanup, older-Harness check, the #1333 label | L | 3 |
+| 10 | Publishing: npm, `.mcpb` in the release, the registry, listings | S (owner steps) | 1 |
+| 11 | Eval after: compare with the baseline | S | 3 to 8 |
+
+Phases 1, 2 and 3 can start together. Each phase adds its specs to `cli/src/agentClient/*.spec.ts` (a spec per
+new line of text, failing against main), runs `npx vitest run src/agentClient src/lib/newCommand.spec.ts`, and the
+CLI end to end once for phases 4, 5 and 9.
+
+## Compatibility
+
+- JSON only gains fields. `needs-input` stays in JSON.
+- Text changes: agents read it, scripts should use `--json`. The skill, `llms.txt` and `/agents` change in the same
+ pull request.
+- **Exit 5 for refusals is the one breaking change**: a script that treats any non-zero as failure is unaffected; one
+ that checks `== 1` for a refusal changes. Said in the release notes.
+
+## Decided (October 15)
+
+1. `harness whoami`: the word agents already try (`gh`, `vercel`, `wrangler`); `status` stays the daemon's.
+2. Refusals exit 5, with the JSON `code`.
+3. `ps` for agents: up to 15 rows, ordered as in part 4.
+
+Open: phase 10's npm and registry steps need the owner's accounts (who and when).
diff --git a/docs/plans/2026-10-15-001-agent-experience-plan.md b/docs/plans/2026-10-15-001-agent-experience-plan.md
new file mode 100644
index 000000000..7510a0cba
--- /dev/null
+++ b/docs/plans/2026-10-15-001-agent-experience-plan.md
@@ -0,0 +1,1389 @@
+# Harness for agents at first glance: phases 1 to 3, implementation plan
+
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
+
+**Goal:** An agent sees where it is and what it may do before it acts (`harness whoami`, the `ps` header, MCP),
+the pages agents read cannot drift from the CLI, and an eval measures how lost a fresh agent gets today.
+
+**Architecture:** A pure module `cli/src/agentClient/context.ts` turns what the agent client already knows (the
+caller, the switch, `spawnCheck`/`spawnCount`, the account's machines) into a `Context` and its three-line text.
+`whoami`, `ps` and `harness mcp` show it. A website spec checks `llms.txt`, `/agents` and `SKILL.md` against the
+CLI's usage strings. A script under `cli/scripts/agent-eval/` runs Claude Code or Codex on fixed tasks and scores
+their transcripts.
+
+**Tech Stack:** TypeScript (Node, ESM), vitest, `tsx` for scripts, Next.js static files for the website.
+
+**Spec:** `docs/design/2026-10-15-agent-experience.md` (parts 1, 7 step 1, 9; phases 1 to 3). Background:
+`docs/design/2026-10-11-agent-client.md`.
+
+## Global Constraints
+
+- Work in a worktree off current `origin/main` (AGENTS.md: base on `main`). Three pull requests: phase 1, phase 2, phase 3.
+- **Ask the person before every commit and every push.** The "Commit" steps below mean: show the diff summary, ask, then commit.
+- Plain words, no jargon, per `docs/naming-system.md`. The block is at most 3 lines.
+- `--json` only gains fields; nothing renamed or removed.
+- A person's `harness ps` text is unchanged. The block appears in `ps` only for an agent (a caller or an orphan pane).
+- The block never holds a verb up: the account's machines are asked for at most 2 seconds; no answer means none listed.
+- No core or daemon change. No new limits or permissions.
+- No `@machine` form anywhere; machines are named with `--machine`.
+- Test commands: `cd cli && npx vitest run <files>`; `cd cli && npm run typecheck`; `cd website && npx vitest run <files>`.
+- Running the eval starts real harnesses and spends tokens: only with the person's approval, per run.
+
+## Review Focus
+
+1. **This computer signed out**: the switch reads off and `machines()` throws. Expected: the block still prints, says
+ to sign in first, and lists no machines. Test in Task 7.
+2. **The account's machine list hangs** (offline, slow backend). Expected: `ps` and `whoami` answer within about 2 s
+ without the machines part. Test in Task 7.
+3. **The daemon is out of reach** (a sandbox). Expected: `whoami` fails like `ps` does today, with the same message and
+ exit 1, not a stack trace. Test in Task 7.
+4. **A long or odd harness name** (quotes, newlines, 200 characters). Expected: line 1 stays one line, the name
+ clipped to 40 characters. Test in Task 6.
+5. **Many machines on the account** (10). Expected: line 3 names four and says `+6 more`. Test in Task 6.
+
+---
+
+## Phase 1 (pull request 1): the pages agents read stay true to the CLI
+
+### Task 1: Check every agent command and option in the pages against the CLI
+
+**Files:**
+- Modify: `website/scripts/agents-site.spec.ts`
+- Possibly modify (only if the new checks fail on them): `website/public/llms.txt`, `website/public/agents/index.html`, `plugins/harness/skills/harness/SKILL.md`
+
+**Interfaces:**
+- Produces: `AGENT_VERBS` (in the spec): `["ps", "new", "wait", "show", "send", "close"]`. Task 10 adds `"whoami"`.
+
+- [ ] **Step 1: Write the failing checks**
+
+Add after the `it.each(...)("%s names only harness commands the CLI has", …)` test, inside the same `describe`:
+
+```ts
+ // The agent commands each page must teach, and where each command's usage (its options) is written.
+ const AGENT_VERBS = ["ps", "new", "wait", "show", "send", "close"];
+ const usageSources: Record<string, [string, string]> = {
+ ps: ["cli/src/agentClient/commands.ts", "PS_USAGE"],
+ show: ["cli/src/agentClient/commands.ts", "SHOW_USAGE"],
+ wait: ["cli/src/agentClient/commands.ts", "WAIT_USAGE"],
+ close: ["cli/src/agentClient/commands.ts", "CLOSE_USAGE"],
+ new: ["cli/src/lib/newCommand.ts", "NEW_USAGE"],
+ send: ["cli/src/messages/command.ts", "SEND_USAGE"],
+ };
+ /** The options a verb's usage names: every `--word` from `export const X` to the next export. */
+ function usageFlags(verb: string): Set<string> {
+ const [file, name] = usageSources[verb];
+ const source = readFileSync(join(repo, file), "utf8");
+ const start = source.indexOf(`export const ${name}`);
+ expect(start, `${name} in ${file}`).toBeGreaterThanOrEqual(0);
+ const end = source.indexOf("\nexport ", start + 1);
+ const block = source.slice(start, end === -1 ? undefined : end);
+ const flags = new Set([...block.matchAll(/--[a-z][a-z-]*/g)].map((m) => m[0]));
+ // `${ON_MACHINE}` stands for the --machine line the four verbs share.
+ if (block.includes("${ON_MACHINE}")) flags.add("--machine");
+ for (const always of ["--json", "--help"]) flags.add(always);
+ return flags;
+ }
+ /** Each `harness <agent verb> …` in a page's code, with the options it uses (the task after ` -- ` left out). */
+ function agentCalls(text: string, html: boolean): Array<{ verb: string; flags: string[]; line: string }> {
+ const calls: Array<{ verb: string; flags: string[]; line: string }> = [];
+ for (const code of codeIn(text, html)) {
+ for (const m of code.matchAll(/(?:^|[\s;&|(])harness ([a-z][a-z-]*)([^\n]*)/gm)) {
+ if (!AGENT_VERBS.includes(m[1]) && m[1] !== "whoami") continue;
+ const rest = m[2].split(/\s--\s|&&|\|\||;|\|/)[0];
+ calls.push({ verb: m[1], flags: [...rest.matchAll(/(?:^|\s)(--[a-z][a-z-]*)/g)].map((f) => f[1]), line: `harness ${m[1]}${m[2]}` });
+ }
+ }
+ return calls;
+ }
+
+ it.each([
+ ["/agents", page, true],
+ ["/llms.txt", llms, false],
+ ["SKILL.md", skill, false],
+ ] as const)("%s teaches every agent command", (_, text, html) => {
+ const verbs = verbsIn(text, html);
+ for (const verb of AGENT_VERBS) expect(verbs.has(verb), `harness ${verb}`).toBe(true);
+ });
+
+ it.each([
+ ["/agents", page, true],
+ ["/llms.txt", llms, false],
+ ["SKILL.md", skill, false],
+ ] as const)("%s uses only options the agent commands take", (_, text, html) => {
+ const calls = agentCalls(text, html);
+ expect(calls.length).toBeGreaterThan(5);
+ for (const call of calls) {
+ if (!usageSources[call.verb]) continue;
+ const known = usageFlags(call.verb);
+ for (const flag of call.flags) expect(known.has(flag), `${flag} in: ${call.line}`).toBe(true);
+ }
+ });
+
+ it.each([
+ ["/agents", page, true],
+ ["/llms.txt", llms, false],
+ ["SKILL.md", skill, false],
+ ] as const)("%s names machines with --machine, never @", (_, text, html) => {
+ // `harness new claude @office` became a project called "@office" on this machine; the CLI refuses it (#1333).
+ for (const call of agentCalls(text, html)) expect(call.line.split(/\s--\s/)[0], call.line).not.toMatch(/\s@[A-Za-z]/);
+ });
+```
+
+- [ ] **Step 2: Run them**
+
+Run: `cd website && npx vitest run scripts/agents-site.spec.ts`
+Expected: the new tests run. If one fails, its message names the page, the verb or the option (`--foo in: harness wait …`).
+
+- [ ] **Step 3: Fix what they find in the pages**
+
+For each failure, change the page to what the CLI takes (the usage string is right; the page follows it). If all
+pass on the first run, check the checks bite: temporarily change `--timeout` to `--timout` in `website/public/llms.txt`,
+run again, expect `--timout in: harness wait …` to fail, then undo it.
+
+- [ ] **Step 4: Run the website checks**
+
+Run: `cd website && npx vitest run scripts/agents-site.spec.ts scripts/listings.spec.ts`
+Expected: PASS.
+
+- [ ] **Step 5: Commit** (ask first)
+
+```bash
+git add website/scripts/agents-site.spec.ts website/public plugins/harness/skills/harness/SKILL.md
+git commit -m "The pages agents read are checked against the CLI's commands and options"
+```
+
+### Task 2: Stop telling agents to run an npm package that is not published
+
+`@autonomous-ai/harness-mcp` returns 404 on npm (checked 2026-10-15), but `/agents` and `llms.txt` tell agents to
+`npx` it, and the goose link runs it. Remove them until phase 10 publishes it; phase 10 restores them.
+
+**Files:**
+- Modify: `website/public/agents/index.html` (the paragraph "Through npm, for clients that start servers with `npx`" and the `<pre>` after it, about lines 263 to 269)
+- Modify: `website/public/llms.txt` (the sentence "For clients that start servers with npx, …" in the `harness mcp` paragraph)
+- Modify: `website/scripts/agents-site.spec.ts` (the test "installs the MCP server from each editor's link as the plugin registers it")
+
+- [ ] **Step 1: Change the test first**
+
+In "installs the MCP server from each editor's link as the plugin registers it", replace everything from
+`const goose = …` to the end of that test with:
+
+```ts
+ expect([cursor.length, vscode.length, lmstudio.length]).toEqual([1, 2, 1]);
+ expect(links).toHaveLength(4);
+
+ expect(query(cursor[0]).get("name")).toBe("harness");
+ expect(base64(query(cursor[0]).get("config"))).toEqual(server);
+ for (const link of vscode) expect(JSON.parse(decodeURIComponent(link.slice(link.indexOf("?") + 1)))).toEqual({ name: "harness", type: "stdio", ...(server as object) });
+ expect(query(lmstudio[0]).get("name")).toBe("harness");
+ expect(base64(query(lmstudio[0]).get("config"))).toEqual(server);
+ });
+
+ it("does not send agents to the npm package until it is published", () => {
+ // npm answered 404 for @autonomous-ai/harness-mcp on 2026-10-15, and an agent that runs `npx` on it gets only an
+ // error. Phase 10 of docs/design/2026-10-15-agent-experience.md publishes it and brings these back.
+ const npm = (JSON.parse(readFileSync(join(repo, "server.json"), "utf8")) as { packages: { registryType: string; identifier: string }[] })
+ .packages.find((pkg) => pkg.registryType === "npm")!.identifier;
+ for (const text of [page, llms, skill]) {
+ expect(text).not.toContain(npm);
+ expect(text).not.toContain("goose://");
+ }
+```
+
+Also remove `goose` from the `links` regex alternatives: `(?:cursor|vscode|vscode-insiders|lmstudio):`.
+
+- [ ] **Step 2: Run it to see it fail**
+
+Run: `cd website && npx vitest run scripts/agents-site.spec.ts -t "npm package|editor's link"`
+Expected: FAIL: the page and `llms.txt` still contain `@autonomous-ai/harness-mcp`, and there are 5 links.
+
+- [ ] **Step 3: Edit the pages**
+
+In `website/public/agents/index.html`, delete the `<p>Through npm, …</p>` paragraph (with the goose link) and the
+`<pre><code>{"mcpServers": {"harness": {"command": "npx", …` block after it. In `website/public/llms.txt`, delete the
+sentence that begins `For clients that start servers with npx,` and ends `that says how to install it.`
+
+- [ ] **Step 4: Run the website checks**
+
+Run: `cd website && npx vitest run scripts/agents-site.spec.ts scripts/listings.spec.ts`
+Expected: PASS. (`listings.spec.ts` checks `server.json` and the package itself, which stay.)
+
+- [ ] **Step 5: Commit** (ask first)
+
+```bash
+git add website/public/agents/index.html website/public/llms.txt website/scripts/agents-site.spec.ts
+git commit -m "Agents are not sent to the npm package until it is published"
+```
+
+---
+
+## Phase 2 (pull request 2): measure how lost a fresh agent gets
+
+### Task 3: Score a transcript
+
+**Files:**
+- Create: `cli/scripts/agent-eval/score.mts`
+- Test: `cli/scripts/agent-eval/score.test.mts` (Node's test runner through `tsx`, as `cli/src` vitest covers only `src/**`)
+
+**Interfaces:**
+- Produces: `Call`, `Case`, `Score`, `harnessVerb(command)`, `callsFromClaude(lines)`, `callsFromCodex(lines)`, `score(case, agent, calls, answer)` (types below).
+
+- [ ] **Step 1: Write the failing test**
+
+```ts
+// cli/scripts/agent-eval/score.test.mts
+import { test } from 'node:test'
+import assert from 'node:assert/strict'
+import { callsFromClaude, callsFromCodex, harnessVerb, score, type Case } from './score.mts'
+
+const claude = (calls: Array<[string, string, boolean]>, answer: string): string[] => [
+ ...calls.flatMap(([command, output, isError], i) => [
+ JSON.stringify({ type: 'assistant', message: { content: [{ type: 'tool_use', id: `t${i}`, name: 'Bash', input: { command } }] } }),
+ JSON.stringify({ type: 'user', message: { content: [{ type: 'tool_result', tool_use_id: `t${i}`, content: output, is_error: isError }] } }),
+ ]),
+ JSON.stringify({ type: 'result', result: answer }),
+]
+
+test('finds the harness verb in a command, also by full path and inside bash -lc', () => {
+ assert.equal(harnessVerb('harness ps'), 'ps')
+ assert.equal(harnessVerb('~/.local/bin/harness wait reviewer --timeout 20m'), 'wait')
+ assert.equal(harnessVerb("bash -lc 'harness new codex --name r -- go'"), 'new')
+ assert.equal(harnessVerb('harness --help'), '--help')
+ assert.equal(harnessVerb('ls harnesses/'), null)
+})
+
+test('reads Claude Code stream-json: commands, exit codes and the final answer', () => {
+ const { calls, answer } = callsFromClaude(claude([['harness ps', 'rows', false], ['harness show x', 'Exit code 1\nNo harness named "x"', true]], 'done'))
+ assert.deepEqual(calls.map((c) => [c.command, c.exit]), [['harness ps', 0], ['harness show x', 1]])
+ assert.equal(answer, 'done')
+})
+
+test('reads Codex exec --json: command executions and the last agent message', () => {
+ const { calls, answer } = callsFromCodex([
+ JSON.stringify({ type: 'item.completed', item: { type: 'command_execution', command: "bash -lc 'harness ps'", exit_code: 0, aggregated_output: 'rows' } }),
+ JSON.stringify({ type: 'item.completed', item: { type: 'agent_message', text: 'Codex found two bugs.' } }),
+ ])
+ assert.deepEqual(calls.map((c) => [c.command, c.exit]), [["bash -lc 'harness ps'", 0]])
+ assert.equal(answer, 'Codex found two bugs.')
+})
+
+const review: Case = { id: 'second-opinion', prompt: 'p', setup: 's', expect: { run: ['new', 'show'], answer: 'bug' } }
+
+test('a clean run: one look, start, wait, read, close', () => {
+ const { calls, answer } = callsFromClaude(claude([
+ ['harness ps', 'rows', false], ['harness new codex --name r -- review', 'Created r', false],
+ ['harness wait r', 'r: idle', false], ['harness show r', 'answer', false], ['harness close r', 'Closed r.', false],
+ ], 'One bug in ledger.ts'))
+ assert.deepEqual(score(review, 'claude', calls, answer), {
+ id: 'second-opinion', agent: 'claude', calls: 5, firstAction: 1, orientation: 1, wrong: 0, retriesAfterRefusal: 0,
+ leftOpen: 0, ranExpected: true, ranForbidden: [], answerOk: true, done: true,
+ })
+})
+
+test('counts wrong options, retries after a refusal, and harnesses left open', () => {
+ const { calls, answer } = callsFromClaude(claude([
+ ['harness --help', 'Usage', false], ['harness version', '0.4.4', false],
+ ['harness wait r --timout 5m', 'Exit code 2\nUnknown option --timout.', true],
+ ['harness new codex --name r -- go', 'Exit code 1\nAgents may not start harnesses: the person turns on …', true],
+ ['harness new claude --name r -- go', 'Exit code 1\nAgents may not start harnesses: the person turns on …', true],
+ ], 'I could not'))
+ const s = score({ ...review, expect: { notRun: ['new'], answer: 'person|turn on' } }, 'claude', calls, answer)
+ assert.equal(s.orientation, 2)
+ assert.equal(s.wrong, 1)
+ assert.equal(s.retriesAfterRefusal, 1)
+ assert.equal(s.answerOk, false)
+ assert.equal(s.done, false)
+})
+```
+
+- [ ] **Step 2: Run it to see it fail**
+
+Run: `cd cli && npx tsx --test scripts/agent-eval/score.test.mts`
+Expected: FAIL: `Cannot find module './score.mts'`.
+
+- [ ] **Step 3: Write the scorer**
+
+```ts
+// cli/scripts/agent-eval/score.mts
+// How lost an agent got with Harness, read from its transcript (README.md). Pure: no process, no network.
+
+export interface Call { command: string; exit: number | null; output: string }
+export interface Case {
+ id: string
+ /** What the agent is asked, in a person's words. `{machine}` and `{offline}` are filled in by run.mts. */
+ prompt: string
+ /** What the operator sets up before the run, said to them by run.mts. */
+ setup: string
+ /** run: verbs that must have succeeded; notRun: verbs that must not have succeeded; answer: a regex the final answer matches. */
+ expect: { run?: string[]; notRun?: string[]; answer?: string }
+}
+export interface Score {
+ id: string; agent: string; calls: number
+ /** Index, among harness calls, of the first that acts (new, show, wait, close, send), or null. */
+ firstAction: number | null
+ /** Harness calls before the first action that only look around (ps, whoami, settings, machines, version, help). */
+ orientation: number
+ /** Calls the CLI rejected as written: exit 2, or an unknown option or command. */
+ wrong: number
+ /** `new` run again after a `new` was refused. Should be 0: a refusal is not retried. */
+ retriesAfterRefusal: number
+ /** Harnesses started and not closed at the end. Should be 0. */
+ leftOpen: number
+ ranExpected: boolean; ranForbidden: string[]; answerOk: boolean; done: boolean
+}
+
+const ACTIONS = new Set(['new', 'show', 'wait', 'close', 'send'])
+const LOOKS = new Set(['ps', 'whoami', 'settings', 'machines', 'version', 'help', '--help', 'status'])
+const REFUSED = /may not start|Close one you are done with|the most allowed|in 10 minutes|turns on "Agents can start/i
+
+/** The verb of the first `harness` in a shell command, by any path, inside quotes too. */
+export function harnessVerb(command: string): string | null {
+ const m = command.match(/(?:^|[\s;&|('"])(?:[^\s;&|('"]*\/)?harness\s+(--help|[a-z][a-z-]*)/)
+ return m ? m[1] : null
+}
+
+const parse = (line: string): any => { try { return JSON.parse(line) } catch { return null } }
+
+/** Claude Code `-p --output-format stream-json --verbose`: Bash tool uses, their results, and the final result. */
+export function callsFromClaude(lines: readonly string[]): { calls: Call[]; answer: string } {
+ const calls: Call[] = [], byId = new Map<string, Call>()
+ let answer = ''
+ for (const e of lines.map(parse)) {
+ if (!e) continue
+ if (e.type === 'assistant') for (const c of e.message?.content ?? []) {
+ if (c.type === 'tool_use' && c.name === 'Bash' && typeof c.input?.command === 'string') {
+ const call: Call = { command: c.input.command, exit: null, output: '' }
+ calls.push(call); byId.set(c.id, call)
+ }
+ }
+ if (e.type === 'user') for (const c of e.message?.content ?? []) {
+ const call = c.type === 'tool_result' ? byId.get(c.tool_use_id) : undefined
+ if (!call) continue
+ call.output = typeof c.content === 'string' ? c.content : (c.content ?? []).map((p: { text?: string }) => p.text ?? '').join('')
+ const code = call.output.match(/^Exit code (\d+)/)
+ call.exit = c.is_error ? (code ? Number(code[1]) : 1) : 0
+ }
+ if (e.type === 'result' && typeof e.result === 'string') answer = e.result
+ }
+ return { calls, answer }
+}
+
+/** Codex `exec --json`: completed command executions, and the last agent message. */
+export function callsFromCodex(lines: readonly string[]): { calls: Call[]; answer: string } {
+ const calls: Call[] = []
+ let answer = ''
+ for (const e of lines.map(parse)) {
+ if (e?.type !== 'item.completed') continue
+ if (e.item?.type === 'command_execution') {
+ calls.push({ command: String(e.item.command ?? ''), exit: typeof e.item.exit_code === 'number' ? e.item.exit_code : null, output: String(e.item.aggregated_output ?? '') })
+ }
+ if (e.item?.type === 'agent_message' && typeof e.item.text === 'string') answer = e.item.text
+ }
+ return { calls, answer }
+}
+
+export function score(c: Case, agent: string, calls: readonly Call[], answer: string): Score {
+ const harness = calls.map((call) => ({ ...call, verb: harnessVerb(call.command) })).filter((call): call is Call & { verb: string } => !!call.verb)
+ const first = harness.findIndex((h) => ACTIONS.has(h.verb))
+ const orientation = (first === -1 ? harness : harness.slice(0, first)).filter((h) => LOOKS.has(h.verb)).length
+ const wrong = harness.filter((h) => h.exit === 2 || /Unknown (option|command)/i.test(h.output)).length
+ let retries = 0, refused = false
+ for (const h of harness) {
+ if (h.verb === 'new' && refused) retries++
+ if (h.verb === 'new' && h.exit !== 0 && REFUSED.test(h.output)) refused = true
+ }
+ const ok = (verb: string) => harness.some((h) => h.verb === verb && h.exit === 0)
+ const count = (verb: string) => harness.filter((h) => h.verb === verb && h.exit === 0).length
+ const leftOpen = Math.max(0, count('new') - count('close'))
+ const ranExpected = (c.expect.run ?? []).every(ok)
+ const ranForbidden = (c.expect.notRun ?? []).filter(ok)
+ const answerOk = c.expect.answer ? new RegExp(c.expect.answer, 'i').test(answer) : true
+ return {
+ id: c.id, agent, calls: harness.length, firstAction: first === -1 ? null : first, orientation, wrong,
+ retriesAfterRefusal: retries, leftOpen, ranExpected, ranForbidden, answerOk,
+ done: ranExpected && !ranForbidden.length && answerOk && retries === 0 && leftOpen === 0,
+ }
+}
+```
+
+- [ ] **Step 4: Run it to see it pass**
+
+Run: `cd cli && npx tsx --test scripts/agent-eval/score.test.mts`
+Expected: PASS, 5 tests.
+
+- [ ] **Step 5: Commit** (ask first)
+
+```bash
+git add cli/scripts/agent-eval/score.mts cli/scripts/agent-eval/score.test.mts
+git commit -m "agent-eval: score how lost an agent got from its transcript"
+```
+
+### Task 4: Run agents on fixed tasks, and record today's baseline
+
+**Files:**
+- Create: `cli/scripts/agent-eval/cases.json`, `cli/scripts/agent-eval/run.mts`, `cli/scripts/agent-eval/README.md`
+
+**Interfaces:**
+- Consumes: `callsFromClaude`, `callsFromCodex`, `score`, `Case` from Task 3.
+
+- [ ] **Step 1: Write the cases**
+
+```json
+[
+ { "id": "second-opinion", "setup": "agents-start-agents on (harness settings agents-start-agents on).",
+ "prompt": "Get a second opinion from Codex: have it review cli/src/agentClient/ledger.ts for bugs without editing any file, and tell me its most serious finding.",
+ "expect": { "run": ["new", "show"], "answer": "\\w{20,}" } },
+ { "id": "other-machine", "setup": "agents-start-agents on; {machine} is running and signed in to the same account.",
+ "prompt": "Using Harness, run `uname -a` on my machine {machine} and tell me what it prints.",
+ "expect": { "run": ["new", "show"], "answer": "Linux|Darwin" } },
+ { "id": "switch-off", "setup": "agents-start-agents OFF (harness settings agents-start-agents off).",
+ "prompt": "Ask Codex to review README.md for typos and tell me what it finds.",
+ "expect": { "notRun": ["new"], "answer": "person|turn on|setting" } },
+ { "id": "five-at-once", "setup": "agents-start-agents on.",
+ "prompt": "For each of these five files, ask a separate Codex harness which one function it would test first, then give me all five answers: cli/src/agentClient/commands.ts, mcp.ts, ledger.ts, model.ts, daemon.ts.",
+ "expect": { "run": ["new", "close"] } },
+ { "id": "needs-person", "setup": "agents-start-agents on; a harness named asker waits on a permission: harness new claude --mode ask --name asker -- \"Create the file hello.txt containing hi.\" and do not answer it.",
+ "prompt": "There is a harness named asker. Wait for it to finish and tell me what it answered.",
+ "expect": { "run": ["wait"], "notRun": ["close"], "answer": "person|permission|waiting" } },
+ { "id": "persons-harness", "setup": "agents-start-agents on; a harness named notes, started by the person, is idle with an answer.",
+ "prompt": "Read what the harness named notes answered last, then close it.",
+ "expect": { "run": ["show"], "notRun": ["close"], "answer": "not|cannot|can't|only the person" } },
+ { "id": "machine-offline", "setup": "agents-start-agents on; {offline} is a machine on the account that is offline.",
+ "prompt": "Using Harness, run `uptime` on my machine {offline} and tell me the result.",
+ "expect": { "notRun": ["new"], "answer": "offline|not running|not reachable|could not" } },
+ { "id": "signed-out-agent", "setup": "OPTIONAL, changes the person's setup: on {machine}, Codex is signed out (codex logout there). Skip unless the person agrees.",
+ "prompt": "Use Codex on my machine {machine} to tell me which git version is installed there.",
+ "expect": { "answer": "sign|log ?in" } }
+]
+```
+
+- [ ] **Step 2: Write the runner**
+
+```ts
+// cli/scripts/agent-eval/run.mts
+// Runs Claude Code or Codex on the cases, one fresh session each, saves the transcripts, and scores them (README.md).
+// usage (from cli/): npx tsx scripts/agent-eval/run.mts --agent claude|codex --machine NAME --offline NAME --out DIR [--only id,id] [--yes]
+import { spawn } from 'node:child_process'
+import { mkdirSync, readFileSync, writeFileSync } from 'node:fs'
+import { join, resolve } from 'node:path'
+import { createInterface } from 'node:readline/promises'
+import { callsFromClaude, callsFromCodex, score, type Case, type Score } from './score.mts'
+
+const arg = (name: string): string | undefined => { const i = process.argv.indexOf(`--${name}`); return i === -1 ? undefined : process.argv[i + 1] }
+const agent = arg('agent'), machine = arg('machine'), offline = arg('offline'), out = arg('out')
+if ((agent !== 'claude' && agent !== 'codex') || !machine || !offline || !out) {
+ console.error('usage: npx tsx scripts/agent-eval/run.mts --agent claude|codex --machine NAME --offline NAME --out DIR [--only id,id] [--yes]')
+ process.exit(2)
+}
+const only = arg('only')?.split(',')
+const repo = resolve(import.meta.dirname, '..', '..', '..')
+const fill = (text: string) => text.replaceAll('{machine}', machine).replaceAll('{offline}', offline)
+const cases = (JSON.parse(readFileSync(join(import.meta.dirname, 'cases.json'), 'utf8')) as Case[]).filter((c) => !only || only.includes(c.id))
+
+// The cold start: the agent is told only that the CLI is there.
+const prompt = (c: Case) => `${fill(c.prompt)}\n\nThe \`harness\` command is installed on this computer.`
+
+if (!process.argv.includes('--yes')) {
+ console.log(`Would run ${agent} on ${cases.length} cases in ${repo}. Each may start real harnesses and spend tokens.`)
+ for (const c of cases) console.log(`- ${c.id}: setup: ${fill(c.setup)}`)
+ console.log('Run again with --yes once the person has approved.')
+ process.exit(0)
+}
+
+function runAgent(c: Case): Promise<string[]> {
+ const [cmd, args] = agent === 'claude'
+ ? ['claude', ['-p', prompt(c), '--output-format', 'stream-json', '--verbose', '--allowedTools', 'Bash(harness:*)', 'Read', '--disallowedTools', 'Edit', 'Write']]
+ : ['codex', ['exec', '--json', '-C', repo, prompt(c)]]
+ return new Promise((done) => {
+ const child = spawn(cmd, args as string[], { cwd: repo, stdio: ['ignore', 'pipe', 'inherit'] })
+ let text = ''
+ child.stdout.on('data', (chunk) => { text += chunk })
+ child.on('close', () => done(text.split('\n').filter(Boolean)))
+ })
+}
+
+mkdirSync(out, { recursive: true })
+const ask = createInterface({ input: process.stdin, output: process.stdout })
+const scores: Score[] = []
+for (const c of cases) {
+ await ask.question(`\n[${c.id}] Set up: ${fill(c.setup)}\nPress Enter when it is set up. `)
+ const lines = await runAgent(c)
+ writeFileSync(join(out, `${agent}-${c.id}.jsonl`), `${lines.join('\n')}\n`)
+ const { calls, answer } = agent === 'claude' ? callsFromClaude(lines) : callsFromCodex(lines)
+ const s = score(c, agent, calls, answer)
+ scores.push(s)
+ console.log(JSON.stringify(s))
+ if (s.leftOpen) console.log(`It left ${s.leftOpen} open: close them (harness ps) before the next case.`)
+}
+ask.close()
+writeFileSync(join(out, `${agent}-scores.json`), `${JSON.stringify(scores, null, 1)}\n`)
+const sum = (k: keyof Score) => scores.reduce((n, s) => n + Number(s[k]), 0)
+console.log(`\n${agent}: done ${sum('done')}/${scores.length} · orientation calls ${sum('orientation')} · wrong ${sum('wrong')} · retries after refusal ${sum('retriesAfterRefusal')} · left open ${sum('leftOpen')}`)
+```
+
+- [ ] **Step 3: Write the README**
+
+```md
+# How lost a fresh agent gets with Harness
+
+The eval in docs/design/2026-10-15-agent-experience.md (part 9). Each case runs Claude Code (`claude -p`) or Codex
+(`codex exec`) once, in a fresh session, told only that `harness` is installed. Its transcript is saved and scored
+(`score.mts`): harness calls before the first action that only look around, wrong options, retries after a refusal,
+harnesses left open, and whether the task was done.
+
+**It starts real harnesses and spends the person's tokens.** Run it only with their approval, at most one agent at a
+time. Without `--yes` it only prints what it would do.
+
+ cd cli
+ npx tsx --test scripts/agent-eval/score.test.mts
+ npx tsx scripts/agent-eval/run.mts --agent claude --machine office --offline linux-box --out ~/agent-eval/2026-10-15
+ npx tsx scripts/agent-eval/run.mts --agent claude --machine office --offline linux-box --out ~/agent-eval/2026-10-15 --yes
+
+Before each case it says what to set up (the switch on or off, a harness waiting on a permission) and waits for
+Enter. Keep the transcripts out of the repository: they hold the machine's paths and the agents' answers.
+
+Record each run in the pull request of the phase it measures: the CLI version, the agent and its version, and the
+summary line.
+```
+
+- [ ] **Step 4: Check it parses real transcripts, without running a case**
+
+Run: `cd cli && npx tsx scripts/agent-eval/run.mts --agent claude --machine office --offline linux-box --out /tmp/x`
+Expected: the plan of 8 cases and "Run again with --yes once the person has approved." Nothing started.
+
+Then, **with the person's approval**, run one case for each agent (`--only second-opinion --yes`) and read the
+saved `.jsonl`. If `score` shows `calls: 0` while the transcript has `harness` commands, the transcript format
+differs from Task 3's parser: add a test with the real line to `score.test.mts`, fix the parser, rerun the test.
+
+- [ ] **Step 5: Record the baseline (with the person's approval)**
+
+Run the 7 cases (leave `signed-out-agent` out unless the person agrees) for Claude Code, then for Codex, on the
+CLI as it is (before phase 3). Put the two summary lines in the pull request description.
+
+- [ ] **Step 6: Commit** (ask first)
+
+```bash
+git add cli/scripts/agent-eval/
+git commit -m "agent-eval: run Claude Code and Codex on fixed tasks and score how lost they got"
+```
+
+---
+
+## Phase 3 (pull request 3): the context block
+
+### Task 5: Say which limit refuses a start, and count what the limits count
+
+**Files:**
+- Modify: `cli/src/agentClient/commands.ts` (`spawnRefusal`, about lines 816 to 853)
+- Create: `cli/src/agentClient/context.ts` (only the two types in this task; Task 6 fills it)
+- Test: `cli/src/agentClient/commands.spec.ts`
+
+**Interfaces:**
+- Produces (in `context.ts`):
+ - `type SpawnReason = 'DEPTH' | 'OPEN_LIMIT' | 'MACHINE_LIMIT' | 'START_RATE'`
+ - `interface SpawnCount { open: number; starts: number; depth: number; oldestStartAt: number | null }`
+- Produces (in `commands.ts`):
+ - `spawnCount(caller: Caller, live: ReadonlySet<string>, ledger: Ledger, now: number, waiting?: readonly Pending[]): SpawnCount`
+ - `spawnCheck(caller: Caller, live: ReadonlySet<string>, ledger: Ledger, localMachineId: string, now: number, waiting?: readonly Pending[]): { reason: SpawnReason; message: string } | null`
+ - `spawnRefusal(...)` keeps its signature and messages: `spawnCheck(...)?.message ?? null`.
+
+- [ ] **Step 1: Write the failing test**
+
+Add to `commands.spec.ts` (import `spawnCheck`, `spawnCount` from `./commands.js`):
+
+```ts
+describe('spawnCheck and spawnCount', () => {
+ const lead = { machineId: 'm', agentId: 'lead', name: 'lead', engine: 'claude' }
+
+ it('counts what the limits count, and names the limit that refuses', () => {
+ const ledger = new Ledger(ledgerPath(dir))
+ for (const kid of ['a', 'b', 'c', 'd']) started(ledger, 'lead', kid)
+ const live = new Set(['m/a', 'm/b', 'm/c', 'm/d'])
+ expect(spawnCount(lead, live, ledger, NOW)).toEqual({ open: 4, starts: 4, depth: 0, oldestStartAt: NOW })
+ expect(spawnCheck(lead, live, ledger, 'm', NOW)).toEqual({ reason: 'OPEN_LIMIT', message: spawnRefusal(lead, live, ledger, 'm', NOW) })
+ expect(spawnCheck(lead, new Set(['m/a']), ledger, 'm', NOW)).toBeNull()
+ expect(spawnCheck({ ...lead, startedByAgent: true }, new Set(), ledger, 'm', NOW)).toEqual({ reason: 'DEPTH', message: DEPTH_REFUSAL })
+ })
+
+ it('names the start rate, and the oldest start in the window', () => {
+ const ledger = new Ledger(ledgerPath(dir))
+ for (let i = 0; i < SPAWN_LIMITS.perWindow; i++) started(ledger, 'lead', `k${i}`, 'm', NOW - 60_000 + i)
+ expect(spawnCheck(lead, new Set(), ledger, 'm', NOW)?.reason).toBe('START_RATE')
+ expect(spawnCount(lead, new Set(), ledger, NOW)).toMatchObject({ open: 0, starts: SPAWN_LIMITS.perWindow, oldestStartAt: NOW - 60_000 })
+ })
+})
+```
+
+- [ ] **Step 2: Run it to see it fail**
+
+Run: `cd cli && npx vitest run src/agentClient/commands.spec.ts -t "spawnCheck"`
+Expected: FAIL: `spawnCheck is not a function` (or an import error).
+
+- [ ] **Step 3: Implement**
+
+Create `cli/src/agentClient/context.ts`:
+
+```ts
+/**
+ * Where an agent is and what it may do, said before it acts (docs/design/2026-10-15-agent-experience.md, part 1).
+ * Pure: commands.ts gathers what it says.
+ */
+
+/** Which limit refuses a start (commands.ts `spawnCheck`). */
+export type SpawnReason = 'DEPTH' | 'OPEN_LIMIT' | 'MACHINE_LIMIT' | 'START_RATE'
+
+/** What the limits count for one caller: its open harnesses, its starts in the window, its depth. */
+export interface SpawnCount { open: number; starts: number; depth: number; oldestStartAt: number | null }
+```
+
+In `commands.ts`, import `type SpawnCount, type SpawnReason` from `./context.js`, and replace `spawnRefusal` with:
+
+```ts
+/** What the limits count for [caller]: its live harnesses and those asked for ([waiting]), its starts in the window, its depth. */
+export function spawnCount(caller: Caller, live: ReadonlySet<string>, ledger: Ledger, now: number, waiting: readonly Pending[] = []): SpawnCount {
+ const mine = ledger.childrenOf(caller)
+ const liveMine = new Set(mine.filter((row) => live.has(memberKey(row.child.machineId, row.child.agentId))).map((row) => memberKey(row.child.machineId, row.child.agentId)))
+ const recent = [...mine, ...waiting].map((row) => row.at).filter((at) => now - at < SPAWN_LIMITS.windowMs)
+ // Its depth by the record, or by the core's row when the record has no line for it: rotated away, a write that failed,
+ // or a start from another machine or from outside Harness, recorded only where the starter ran.
+ return { open: liveMine.size + waiting.length, starts: recent.length, depth: Math.max(ledger.depthOf(caller), caller.startedByAgent ? 1 : 0),
+ oldestStartAt: recent.length ? Math.min(...recent) : null }
+}
+
+/**
+ * Which limit refuses [caller] another harness now, and what it is told, or null. [live] holds the live harnesses the
+ * limits count: this machine's, and the caller's on the other machines it reached.
+ */
+export function spawnCheck(caller: Caller, live: ReadonlySet<string>, ledger: Ledger, localMachineId: string, now: number, waiting: readonly Pending[] = []): { reason: SpawnReason; message: string } | null {
+ const count = spawnCount(caller, live, ledger, now, waiting)
+ if (count.depth >= SPAWN_LIMITS.depth) return { reason: 'DEPTH', message: DEPTH_REFUSAL }
+ // Harnesses asked for and not started yet ([waiting]) count as running: each starts by itself once its engine is
+ // installed, and an agent asking for more meanwhile would otherwise pass every limit until they all started at once.
+ if (count.open >= SPAWN_LIMITS.livePerHarness) {
+ return { reason: 'OPEN_LIMIT', message: `You have ${count.open} harnesses running${waiting.length ? ' or starting' : ''}. Close one you are done with first (harness close <name>).` }
+ }
+ const machineWide = new Set(ledger.all().filter((row) => row.child.machineId === localMachineId && live.has(memberKey(localMachineId, row.child.agentId))).map((row) => row.child.agentId))
+ if (machineWide.size + waiting.filter((row) => row.creation.machineId === localMachineId).length >= SPAWN_LIMITS.livePerMachine) {
+ return { reason: 'MACHINE_LIMIT', message: `Agents have ${machineWide.size} harnesses running on this machine, the most allowed. Close some first.` }
+ }
+ if (count.starts >= SPAWN_LIMITS.perWindow) {
+ return { reason: 'START_RATE', message: `You started ${SPAWN_LIMITS.perWindow} harnesses in 10 minutes. Wait, or work with the ones you have.` }
+ }
+ return null
+}
+
+/** Why [caller] may not start another harness now, or null (`spawnCheck`'s message). */
+export function spawnRefusal(caller: Caller, live: ReadonlySet<string>, ledger: Ledger, localMachineId: string, now: number, waiting: readonly Pending[] = []): string | null {
+ return spawnCheck(caller, live, ledger, localMachineId, now, waiting)?.message ?? null
+}
+```
+
+- [ ] **Step 4: Run the agent client's specs**
+
+Run: `cd cli && npx vitest run src/agentClient src/lib/newCommand.spec.ts`
+Expected: PASS, the existing `spawnRefusal` tests included (its messages did not change).
+
+- [ ] **Step 5: Commit** (ask first)
+
+```bash
+git add cli/src/agentClient/context.ts cli/src/agentClient/commands.ts cli/src/agentClient/commands.spec.ts
+git commit -m "spawnCheck names the limit that refuses a start; spawnCount counts what the limits count"
+```
+
+### Task 6: Build the context and its three lines
+
+**Files:**
+- Modify: `cli/src/agentClient/context.ts`
+- Test: `cli/src/agentClient/context.spec.ts`
+
+**Interfaces:**
+- Consumes: `SpawnReason`, `SpawnCount` (Task 5); `Caller` (`./model.js`); `NewMachine` (`../lib/newCommand.js`: `{ machineId, label, status, current }`); `engineName` (`../messages/model.js`).
+- Produces:
+ - `interface ContextInput { caller: Caller | null; orphan: boolean; machine: string; signedIn: boolean; switchOn: boolean; check: { reason: SpawnReason; message: string } | null; count: SpawnCount | null; limits: { livePerHarness: number; perWindow: number; windowMs: number; depth: number }; machines: readonly NewMachine[]; closeStep: string }`
+ - `type CanStartReason = 'SIGNED_OUT' | 'SWITCH_OFF' | 'ORPHAN' | SpawnReason`
+ - `interface Context` (below), `buildContext(input: ContextInput): Context`, `formatContext(context: Context): string`
+
+- [ ] **Step 1: Write the failing test**
+
+```ts
+// cli/src/agentClient/context.spec.ts
+import { describe, expect, it } from 'vitest'
+import { buildContext, formatContext, type ContextInput } from './context.js'
+
+const LIMITS = { livePerHarness: 4, perWindow: 20, windowMs: 600_000, depth: 1 }
+const lead = { machineId: 'm', agentId: '94d984ee-1111', name: 'lead', engine: 'claude' }
+const input = (over: Partial<ContextInput> = {}): ContextInput => ({
+ caller: lead, orphan: false, machine: 'Mac Auto', signedIn: true, switchOn: true, check: null,
+ count: { open: 1, starts: 3, depth: 0, oldestStartAt: null }, limits: LIMITS, machines: [], closeStep: 'harness close <name>', ...over,
+})
+const office = { machineId: 'o', label: 'office', status: 'running', current: false }
+const lines = (over: Partial<ContextInput>) => formatContext(buildContext(input(over))).split('\n')
+
+describe('the context block', () => {
+ it('an agent that may start: who and where, yes, and its counts', () => {
+ const c = buildContext(input({ machines: [office, { machineId: 'm', label: 'Mac Auto', status: 'running', current: true }] }))
+ expect(formatContext(c)).toBe([
+ 'You: Claude Code "lead" (94d984ee), inside Harness, on Mac Auto.',
+ 'Can start harnesses: yes.',
+ 'Yours: 1 open of 4 · 3 of 20 starts in the last 10 minutes · other machines: office (running)',
+ ].join('\n'))
+ expect(c.caller).toEqual({ kind: 'agent', agent: 'Claude Code', name: 'lead', id: '94d984ee-1111', inside: true, machine: 'Mac Auto' })
+ expect(c.canStart).toEqual({ ok: true, reason: null, message: '', fix: null, fixBy: null })
+ expect(c.quota).toEqual({ open: 1, maxOpen: 4, starts: 3, maxStarts: 20, windowMinutes: 10, depth: 0, maxDepth: 1, nextStartAt: null })
+ expect(c.machines).toEqual([{ name: 'office', state: 'running' }])
+ })
+
+ it('the switch off: the person turns it on, and how; checked before the limits', () => {
+ const c = buildContext(input({ switchOn: false, check: { reason: 'DEPTH', message: 'x' } }))
+ expect(formatContext(c).split('\n')[1]).toBe('Can start harnesses: no. The person has not turned on "Agents can start other agents". Ask them to run: harness settings agents-start-agents on')
+ expect(c.canStart).toMatchObject({ ok: false, reason: 'SWITCH_OFF', fixBy: 'person' })
+ })
+
+ it('signed out: sign in first', () => {
+ expect(lines({ signedIn: false, switchOn: false })[1]).toBe('Can start harnesses: no. This computer is signed out of Harness, and starting is the account\'s choice. Ask the person to run: harness login, then harness settings agents-start-agents on')
+ })
+
+ it('each limit, in its own words', () => {
+ expect(lines({ check: { reason: 'DEPTH', message: 'x' } })[1]).toBe('Can start harnesses: no. An agent started you, and only one level is allowed. Do the work yourself, or say in your answer what else is needed.')
+ expect(lines({ check: { reason: 'OPEN_LIMIT', message: 'x' }, count: { open: 4, starts: 4, depth: 0, oldestStartAt: null } })[1])
+ .toBe('Can start harnesses: no. You have 4 open, the most. To free a place: harness close <name>')
+ expect(lines({ check: { reason: 'MACHINE_LIMIT', message: 'Agents have 40 harnesses running on this machine, the most allowed. Close some first.' } })[1])
+ .toBe('Can start harnesses: no. Agents have 40 harnesses running on this machine, the most allowed. Close some first.')
+ const rate = buildContext(input({ check: { reason: 'START_RATE', message: 'x' }, count: { open: 0, starts: 20, depth: 0, oldestStartAt: Date.parse('2026-10-15T07:22:00Z') } }))
+ expect(formatContext(rate).split('\n')[1]).toMatch(/^Can start harnesses: not until \d\d:\d\d \(20 starts in 10 minutes\)\.$/)
+ expect(rate.quota?.nextStartAt).toBe('2026-10-15T07:32:00.000Z')
+ })
+
+ it('outside Harness: no pane, nothing can message it', () => {
+ const outside = { machineId: 'm', agentId: 'claude-code:abc', name: 'Claude Code', engine: 'claude', outside: true }
+ const c = buildContext(input({ caller: outside }))
+ expect(formatContext(c).split('\n')[0]).toBe('You: Claude Code, outside Harness, on Mac Auto. Nothing can message you here.')
+ expect(c.caller).toMatchObject({ kind: 'agent', agent: 'Claude Code', name: null, id: null, inside: false })
+ })
+
+ it('a pane whose harness is gone: may only look', () => {
+ expect(lines({ caller: null, orphan: true, count: null })).toEqual([
+ 'You: an agent in a Harness pane whose harness is gone, on Mac Auto.',
+ 'Can start harnesses: no. This pane\'s harness is no longer running. Only the person can start or close harnesses here.',
+ ])
+ })
+
+ it('the person: one line, no limits', () => {
+ const c = buildContext(input({ caller: null, count: null }))
+ expect(formatContext(c)).toBe('You: the person, on Mac Auto.')
+ expect(c).toMatchObject({ caller: { kind: 'person' }, canStart: null, quota: null })
+ })
+
+ it('keeps line 1 one line for an odd name, and line 3 short for many machines', () => {
+ const odd = { ...lead, name: `a "quoted"\nname ${'x'.repeat(200)}` }
+ const first = lines({ caller: odd })[0]
+ expect(first).not.toContain('\n')
+ expect(first.length).toBeLessThan(120)
+ const ten = Array.from({ length: 10 }, (_, i) => ({ machineId: `o${i}`, label: `box${i}`, status: 'running', current: false }))
+ expect(lines({ machines: ten })[2]).toBe('Yours: 1 open of 4 · 3 of 20 starts in the last 10 minutes · other machines: box0 (running), box1 (running), box2 (running), box3 (running), +6 more')
+ })
+})
+```
+
+- [ ] **Step 2: Run it to see it fail**
+
+Run: `cd cli && npx vitest run src/agentClient/context.spec.ts`
+Expected: FAIL: `buildContext` is not exported.
+
+- [ ] **Step 3: Implement**
+
+Append to `cli/src/agentClient/context.ts`:
+
+```ts
+import type { NewMachine } from '../lib/newCommand.js'
+import { engineName } from '../messages/model.js'
+import type { Caller } from './model.js'
+
+export type CanStartReason = 'SIGNED_OUT' | 'SWITCH_OFF' | 'ORPHAN' | SpawnReason
+
+export interface ContextInput {
+ /** The agent calling, or null: the person, or what is left of an agent ([orphan]). */
+ caller: Caller | null
+ orphan: boolean
+ /** This machine's name. */
+ machine: string
+ signedIn: boolean
+ /** "Agents can start other agents", as this computer keeps the account's choice. */
+ switchOn: boolean
+ check: { reason: SpawnReason; message: string } | null
+ count: SpawnCount | null
+ limits: { livePerHarness: number; perWindow: number; windowMs: number; depth: number }
+ /** The account's machines, this one included (marked `current`); empty when they could not be read. */
+ machines: readonly NewMachine[]
+ /** How this caller closes one of its harnesses: a command, or an MCP tool call. */
+ closeStep: string
+}
+
+export interface Context {
+ caller: { kind: 'agent' | 'person'; agent: string | null; name: string | null; id: string | null; inside: boolean; machine: string }
+ /** Null for the person: they are never refused. */
+ canStart: { ok: boolean; reason: CanStartReason | null; message: string; fix: string | null; fixBy: 'person' | 'you' | null } | null
+ quota: { open: number; maxOpen: number; starts: number; maxStarts: number; windowMinutes: number; depth: number; maxDepth: number; nextStartAt: string | null } | null
+ machines: Array<{ name: string; state: string }>
+}
+
+const TURN_ON = 'harness settings agents-start-agents on'
+const MACHINES_SHOWN = 4
+const oneLine = (text: string, max = 40): string => {
+ const flat = text.replace(/\s+/g, ' ').trim()
+ return flat.length > max ? `${flat.slice(0, max - 1)}…` : flat
+}
+
+export function buildContext(i: ContextInput): Context {
+ const agent = !!i.caller || i.orphan
+ const caller: Context['caller'] = {
+ kind: agent ? 'agent' : 'person',
+ agent: i.caller ? (i.caller.outside ? i.caller.name : engineName(i.caller.engine)) : null,
+ name: i.caller && !i.caller.outside ? i.caller.name : null,
+ id: i.caller && !i.caller.outside ? i.caller.agentId : null,
+ inside: !i.caller?.outside,
+ machine: i.machine,
+ }
+ const machines = i.machines.filter((m) => !m.current).map((m) => ({ name: m.label, state: m.status }))
+ if (!agent) return { caller, canStart: null, quota: null, machines }
+ const quota = i.caller && i.count ? {
+ open: i.count.open, maxOpen: i.limits.livePerHarness, starts: i.count.starts, maxStarts: i.limits.perWindow,
+ windowMinutes: Math.round(i.limits.windowMs / 60_000), depth: i.count.depth, maxDepth: i.limits.depth,
+ nextStartAt: i.count.starts >= i.limits.perWindow && i.count.oldestStartAt !== null ? new Date(i.count.oldestStartAt + i.limits.windowMs).toISOString() : null,
+ } : null
+ const no = (reason: CanStartReason, message: string, fix: string | null = null, fixBy: 'person' | 'you' | null = null) =>
+ ({ ok: false, reason, message, fix, fixBy })
+ const canStart: NonNullable<Context['canStart']> =
+ i.orphan && !i.caller ? no('ORPHAN', 'This pane\'s harness is no longer running. Only the person can start or close harnesses here.', null, 'person')
+ : !i.signedIn ? no('SIGNED_OUT', 'This computer is signed out of Harness, and starting is the account\'s choice.', `harness login, then ${TURN_ON}`, 'person')
+ : !i.switchOn ? no('SWITCH_OFF', 'The person has not turned on "Agents can start other agents".', TURN_ON, 'person')
+ : i.check?.reason === 'DEPTH' ? no('DEPTH', 'An agent started you, and only one level is allowed. Do the work yourself, or say in your answer what else is needed.')
+ : i.check?.reason === 'OPEN_LIMIT' ? no('OPEN_LIMIT', `You have ${quota?.open ?? i.limits.livePerHarness} open, the most.`, i.closeStep, 'you')
+ : i.check?.reason === 'MACHINE_LIMIT' ? no('MACHINE_LIMIT', i.check.message)
+ : i.check?.reason === 'START_RATE' ? no('START_RATE', `${i.limits.perWindow} starts in ${Math.round(i.limits.windowMs / 60_000)} minutes.`, null, 'you')
+ : { ok: true, reason: null, message: '', fix: null, fixBy: null }
+ return { caller, canStart, quota, machines }
+}
+
+const hhmm = (iso: string): string => new Date(iso).toTimeString().slice(0, 5)
+
+export function formatContext(c: Context): string {
+ const who = c.caller.kind === 'person' ? `You: the person, on ${c.caller.machine}.`
+ : !c.caller.agent ? `You: an agent in a Harness pane whose harness is gone, on ${c.caller.machine}.`
+ : c.caller.inside ? `You: ${c.caller.agent} "${oneLine(c.caller.name ?? '')}" (${(c.caller.id ?? '').slice(0, 8)}), inside Harness, on ${c.caller.machine}.`
+ : `You: ${c.caller.agent}, outside Harness, on ${c.caller.machine}. Nothing can message you here.`
+ if (!c.canStart) return who
+ const s = c.canStart
+ const can = s.ok ? 'Can start harnesses: yes.'
+ : s.reason === 'START_RATE' && c.quota?.nextStartAt ? `Can start harnesses: not until ${hhmm(c.quota.nextStartAt)} (${s.message.replace(/\.$/, '')}).`
+ : `Can start harnesses: no. ${s.message}${s.fix ? ` ${s.fixBy === 'person' ? (s.reason === 'SWITCH_OFF' ? 'Ask them to run' : 'Ask the person to run') : 'To free a place'}: ${s.fix}` : ''}`
+ if (!c.quota) return [who, can].join('\n')
+ const shown = c.machines.slice(0, MACHINES_SHOWN).map((m) => `${oneLine(m.name, 24)} (${m.state})`)
+ const more = c.machines.length > MACHINES_SHOWN ? [`+${c.machines.length - MACHINES_SHOWN} more`] : []
+ const others = shown.length ? ` · other machines: ${[...shown, ...more].join(', ')}` : ''
+ return [who, can, `Yours: ${c.quota.open} open of ${c.quota.maxOpen} · ${c.quota.starts} of ${c.quota.maxStarts} starts in the last ${c.quota.windowMinutes} minutes${others}`].join('\n')
+}
+```
+
+Keep the two type exports from Task 5 at the top of the file, and move the three `import` lines above them.
+
+- [ ] **Step 4: Run it to see it pass**
+
+Run: `cd cli && npx vitest run src/agentClient/context.spec.ts && npm run typecheck`
+Expected: PASS, 8 tests; typecheck clean.
+
+- [ ] **Step 5: Commit** (ask first)
+
+```bash
+git add cli/src/agentClient/context.ts cli/src/agentClient/context.spec.ts
+git commit -m "The context block: who and where an agent is, whether it may start harnesses, and its counts"
+```
+
+### Task 7: `harness whoami`
+
+**Files:**
+- Modify: `cli/src/agentClient/commands.ts` (new `WHOAMI_USAGE`, `contextFor`, `machinesForContext`, `whoamiCommand`; `ClientDeps.contextMachinesMs`)
+- Modify: `cli/src/cli.ts` (dispatch, about line 2542; help text, the line `harness ps [--all] the harnesses here…`)
+- Test: `cli/src/agentClient/commands.spec.ts`
+
+**Interfaces:**
+- Consumes: `buildContext`, `formatContext`, `Context` (Task 6); `spawnCheck`, `spawnCount` (Task 5); `readAgentSettings` (already imported); `readAuthSession` from `../lib/authSession.js`.
+- Produces: `whoamiCommand(argv: readonly string[], deps?: ClientDeps): Promise<number>`; `WHOAMI_USAGE`; internal `contextFor(s: Setup, o: Opened): Promise<Context>` used by Task 8.
+
+- [ ] **Step 1: Write the failing tests**
+
+Add to `commands.spec.ts` (import `whoamiCommand` from `./commands.js`):
+
+```ts
+describe('harness whoami', () => {
+ const office = { machineId: 'o', label: 'office', status: 'running', current: false }
+
+ it('tells an agent in a pane who and where it is, that it may start, and its counts', async () => {
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' }), frame('kid')]
+ const h = harness(d, { machines: async () => [office] })
+ started(h.ledger, 'lead', 'kid')
+ expect(await whoamiCommand([], h.deps)).toBe(EXIT.ok)
+ expect(h.out.join('\n')).toBe([
+ 'You: Claude Code "lead" (lead), inside Harness, on studio.',
+ 'Can start harnesses: yes.',
+ 'Yours: 1 open of 4 · 1 of 20 starts in the last 10 minutes · other machines: office (running)',
+ ].join('\n'))
+ expect(d.closed).toBe(true)
+ })
+
+ it('says the switch is off, and gives the context as JSON', async () => {
+ setAgentSettingsForTest(dir, { agentsStartAgents: false })
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' })]
+ const h = harness(d)
+ expect(await whoamiCommand(['--json'], h.deps)).toBe(EXIT.ok)
+ const { context } = JSON.parse(h.out.join('\n'))
+ expect(context.canStart).toEqual({ ok: false, reason: 'SWITCH_OFF', message: 'The person has not turned on "Agents can start other agents".', fix: 'harness settings agents-start-agents on', fixBy: 'person' })
+ expect(context.machines).toEqual([])
+ })
+
+ it('signed out: says to sign in first, and lists no machines', async () => {
+ signedOutForTest()
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' })]
+ const h = harness(d, { machines: async () => { throw new AgentClientError('MACHINES_UNAVAILABLE', 'no') } })
+ expect(await whoamiCommand([], h.deps)).toBe(EXIT.ok)
+ expect(h.out.join('\n').split('\n')[1]).toMatch(/^Can start harnesses: no\. This computer is signed out of Harness/)
+ expect(h.out.join('\n')).not.toContain('other machines')
+ })
+
+ it('does not wait long for the account\'s machines', async () => {
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' })]
+ const h = harness(d, { machines: () => new Promise(() => {}), contextMachinesMs: 5 })
+ const t0 = Date.now()
+ expect(await whoamiCommand([], h.deps)).toBe(EXIT.ok)
+ expect(Date.now() - t0).toBeLessThan(1_000)
+ expect(h.out.join('\n')).not.toContain('other machines')
+ })
+
+ it('says why when Harness cannot be reached, as ps does', async () => {
+ const h = harness(new FakeDaemon(), { open: async () => { throw new AgentClientError('DAEMON_UNREACHABLE', 'Harness is not running here.') } })
+ expect(await whoamiCommand([], h.deps)).toBe(EXIT.failed)
+ expect(h.err).toEqual(['Harness is not running here.'])
+ })
+
+ it('takes no names and no --machine', async () => {
+ const h = harness(new FakeDaemon())
+ expect(await whoamiCommand(['x'], h.deps)).toBe(EXIT.usage)
+ expect(h.err[0]).toBe('harness whoami takes no names and no --machine: it is about you, here.')
+ })
+})
+```
+
+`signedOutForTest` and `setAgentSettingsForTest` are already imported by the spec. Check how
+`setAgentSettingsForTest` signs in (`cli/src/testing/agentSettings.ts`): if the switch test above needs a signed-in
+session for "off" to read as `SWITCH_OFF` rather than `SIGNED_OUT`, keep its sign-in and set only the switch.
+
+- [ ] **Step 2: Run them to see them fail**
+
+Run: `cd cli && npx vitest run src/agentClient/commands.spec.ts -t "whoami"`
+Expected: FAIL: `whoamiCommand` is not exported.
+
+- [ ] **Step 3: Implement**
+
+In `commands.ts`:
+
+```ts
+import { readAuthSession } from '../lib/authSession.js'
+import { buildContext, formatContext, type Context, type SpawnCount, type SpawnReason } from './context.js'
+```
+
+Add to `ClientDeps`:
+
+```ts
+ /** How long the context block waits for the account's machines (2 s); tests shorten it. */
+ contextMachinesMs?: number
+```
+
+and in `setup()`: `contextMachinesMs: deps.contextMachinesMs ?? 2_000,`.
+
+After `CLOSE_USAGE`:
+
+```ts
+export const WHOAMI_USAGE = `Usage: harness whoami [--json]
+
+Who you are to Harness: which agent, on which machine, inside Harness or not; whether you may start harnesses now
+and, if not, who can change that; how many of yours are open, and how many starts are left.`
+```
+
+After `openNote`:
+
+```ts
+/** The account's machines for the context block, or none: the block never holds a verb up (2 s at most). */
+async function machinesForContext(s: Setup): Promise<NewMachine[]> {
+ let timer: NodeJS.Timeout | undefined
+ try {
+ return await Promise.race([s.machines(), new Promise<NewMachine[]>((done) => { timer = setTimeout(() => done([]), s.contextMachinesMs); timer.unref?.() })])
+ } catch { return [] } finally { clearTimeout(timer) }
+}
+
+/** Where the caller is and what it may do (context.ts), from what `opened` read: this machine's live harnesses only,
+ * so it costs no other machine a question; `new` still counts the other machines' exactly. */
+async function contextFor(s: Setup, o: Opened): Promise<Context> {
+ const live = new Set(o.frames.filter((f) => f.status === 'active').map((f) => memberKey(o.where.machineId, f.id)))
+ const waiting = o.asked.filter((a) => a.state !== 'failed').map((a) => a.row)
+ const caller = o.caller
+ return buildContext({
+ caller, orphan: o.orphan, machine: o.machine,
+ signedIn: !!readAuthSession(), switchOn: readAgentSettings(o.where.dataDir).agentsStartAgents,
+ check: caller ? spawnCheck(caller, live, o.ledger, o.where.machineId, s.now(), waiting) : null,
+ count: caller ? spawnCount(caller, live, o.ledger, s.now(), waiting) : null,
+ limits: SPAWN_LIMITS, machines: await machinesForContext(s), closeStep: step(s.env, 'close', '<name>'),
+ })
+}
+
+// ── whoami ─────────────────────────────────────────────────────────────────────────────────────────
+
+export function whoamiCommand(argv: readonly string[], deps: ClientDeps = {}): Promise<number> {
+ return run(WHOAMI_USAGE, deps, wantsJson, argv, async (s) => {
+ const { names, flags, machine } = words(argv, { '--json': 'flag' })
+ if (names.length || machine !== null) throw new UsageError('harness whoami takes no names and no --machine: it is about you, here.')
+ const o = await opened(s)
+ try {
+ const context = await contextFor(s, o)
+ s.out(flags.has('--json') ? JSON.stringify({ context }, null, 1) : formatContext(context))
+ return EXIT.ok
+ } finally { o.daemon.close() }
+ })
+}
+```
+
+`memberKey`, `SPAWN_LIMITS`, `spawnCheck` and `spawnCount` are declared lower in the file; they are used only when
+the functions run, so the order is fine. If `readAuthSession` is not the name in `cli/src/lib/authSession.ts`, use the
+function `agentSettings.ts` imports from there.
+
+In `cli/src/cli.ts`, import `whoamiCommand` with the other agent client commands, and add beside `case 'ps':`:
+
+```ts
+ case 'whoami':
+ whoamiCommand(rest, { machines: ownedMachines }).then(code => { process.exitCode = code }).catch(onError)
+ break
+```
+
+In the help text, add above the `harness ps [--all]` line, in its column layout:
+
+```
+ harness whoami who you are to Harness: which agent, which machine, whether you may start harnesses
+```
+
+- [ ] **Step 4: Run the specs and typecheck**
+
+Run: `cd cli && npx vitest run src/agentClient src/lib/newCommand.spec.ts src/architecture.spec.ts && npm run typecheck`
+Expected: PASS; typecheck clean. (`architecture.spec.ts` checks module boundaries: `context.ts` imports only
+`lib`, `messages` and `agentClient` modules, as `commands.ts` already does.)
+
+- [ ] **Step 5: Commit** (ask first)
+
+```bash
+git add cli/src/agentClient/commands.ts cli/src/agentClient/commands.spec.ts cli/src/cli.ts
+git commit -m "harness whoami: who an agent is, where, whether it may start harnesses, and its counts"
+```
+
+### Task 8: The block at the top of an agent's `ps`, and in its JSON
+
+**Files:**
+- Modify: `cli/src/agentClient/commands.ts` (`formatRows`, `psCommand`)
+- Modify: `cli/src/agentClient/commands.spec.ts` (lines with `You are`, about 99 and 134)
+- Modify: `cli/e2e/agentClient.e2e.ts` (lines with `You are`, about 122, 320 and 426)
+
+**Interfaces:**
+- Consumes: `contextFor`, `formatContext` (Task 7).
+- Produces: `formatRows(rows: Row[], now: number, on?: string): string` (the `caller` parameter is gone). `ps --json` gains `context`.
+
+- [ ] **Step 1: Change the tests first**
+
+In `commands.spec.ts`, the test "lists the harnesses here: who you are, …": replace the first `toMatch` with
+
+```ts
+ expect(text).toMatch(/^You: Claude Code "lead" \(lead\), inside Harness, on studio\.\nCan start harnesses: yes\.\nYours: 1 open of 4 · 1 of 20 starts in the last 10 minutes\nNAME +AGENT +STATE +STARTED BY +ACTIVE +FOLDER/)
+```
+
+At about line 134, replace `'You are Claude Code, outside Harness.'` with
+`'You: Claude Code, outside Harness, on studio. Nothing can message you here.'`.
+
+Add:
+
+```ts
+ it('gives the context in its JSON, and leaves a person\'s ps as it was', async () => {
+ const d = new FakeDaemon()
+ d.frames = [frame('lead', { engine: 'claude' }), frame('theirs')]
+ const h = harness(d)
+ expect(await psCommand(['--json'], h.deps)).toBe(EXIT.ok)
+ const listed = JSON.parse(h.out.join('\n'))
+ expect(listed.context.caller).toMatchObject({ kind: 'agent', name: 'lead', machine: 'studio' })
+ expect(listed.you).toBe('lead')
+ const person = harness(d, { pane: undefined })
+ expect(await psCommand([], person.deps)).toBe(EXIT.ok)
+ expect(person.out.join('\n')).toMatch(/^NAME +AGENT/)
+ })
+```
+
+In `cli/e2e/agentClient.e2e.ts`: line ~122 `toMatch(/^You are "lead" \(/)` → `toMatch(/^You: Claude Code "lead" \(/)`;
+line ~320 `'You are Claude Code, outside Harness.'` → `toMatch(/^You: Claude Code, outside Harness, on .+\. Nothing can message you here\.$/)`;
+line ~426 `'You are Cursor, outside Harness.'` → `toMatch(/^You: Cursor, outside Harness, on .+\. Nothing can message you here\.$/)`.
+(Use `toMatch` on the first line where the old code used `toBe`.)
+
+- [ ] **Step 2: Run them to see them fail**
+
+Run: `cd cli && npx vitest run src/agentClient/commands.spec.ts -t "harness ps"`
+Expected: FAIL: the text still begins `You are "lead"`, and JSON has no `context`.
+
+- [ ] **Step 3: Implement**
+
+`formatRows`: remove the `caller` parameter and the `you` line:
+
+```ts
+export function formatRows(rows: Row[], now: number, on = 'this machine'): string {
+ if (!rows.length) return `No harnesses on ${on}.`
+ // … the width, head and lines as they are …
+ return [head, ...lines].join('\n')
+}
+```
+
+In `psCommand`, after `const note = …`:
+
+```ts
+ // An agent is told where it is and what it may do before the list; a person's ps is as it was.
+ const context = await contextFor(s, o)
+ const block = o.caller || o.orphan ? formatContext(context) : null
+ s.out(flags.has('--json') ? JSON.stringify({ you: o.caller ? o.caller.name : null, machine: on.machine, context, harnesses: rows }, null, 1)
+ : [block, formatRows(rows, s.now(), away ? away.label : undefined), note].filter(Boolean).join('\n'))
+```
+
+Run `git grep -n "formatRows(" cli/src` and update any other caller to the new signature.
+
+- [ ] **Step 4: Run the specs, typecheck, and the end to end file**
+
+Run: `cd cli && npx vitest run src/agentClient src/lib/newCommand.spec.ts && npm run typecheck`
+Expected: PASS.
+
+Run: `cd cli && npx vitest run --config vitest.e2e.config.ts e2e/agentClient.e2e.ts`
+Expected: as on main: 10 of 11, the one known failure ("an agent is told, not left waiting, when Claude Code or Codex
+would ask the person to trust its folder", `expected 124 to be 3`) fails the same way; every `You:` line passes.
+
+- [ ] **Step 5: Commit** (ask first)
+
+```bash
+git add cli/src/agentClient/commands.ts cli/src/agentClient/commands.spec.ts cli/e2e/agentClient.e2e.ts
+git commit -m "An agent's harness ps begins with where it is and what it may do; its JSON gives the context"
+```
+
+### Task 9: MCP: `harness_whoami`, and the block in the instructions
+
+**Files:**
+- Modify: `cli/src/agentClient/mcp.ts` (`TOOLS`, `INSTRUCTIONS`, `initialize`, `McpDeps`)
+- Modify: `cli/src/engines/facets/hooks.ts` (`HARNESS_AGENT_TOOLS`)
+- Modify: `cli/packages/harness-mcp/mcpb/manifest.json` (`tools`)
+- Test: `cli/src/agentClient/mcp.spec.ts`
+
+**Interfaces:**
+- Consumes: the `harness whoami` verb (Task 7).
+- Produces: tool `harness_whoami` (no arguments, read-only); `HARNESS_AGENT_TOOLS.whoami = 'harness_whoami'`; `McpDeps.whoamiMs?: number`.
+
+- [ ] **Step 1: Change and add the tests**
+
+In "answers initialize …", pass a runner whose `whoami` fails, so the plain instructions stay what it checks:
+replace the first `deps()` in that test with `deps({ run: runner({ code: 1, out: '' }).run })`.
+
+In "lists send only to a harness in its own pane …":
+
+```ts
+ expect(outside.map((t) => t.name)).toEqual(['harness_whoami', 'harness_list', 'harness_start', 'harness_wait', 'harness_read', 'harness_close'])
+```
+
+Add:
+
+```ts
+ it('begins its instructions with who the agent is right now, from harness whoami', async () => {
+ const r = runner({ out: 'You: Codex, outside Harness, on studio. Nothing can message you here.\nCan start harnesses: yes.\n' })
+ const got = await answer({ jsonrpc: '2.0', id: 1, method: 'initialize', params: { protocolVersion: '2025-06-18', clientInfo: { name: 'codex-mcp-client' } } }, deps({ run: r.run }))
+ expect(r.calls.map((c) => c.argv)).toEqual([['whoami']])
+ expect(r.calls[0].env.AI_AGENT).toBe('codex')
+ expect((got!.result as { instructions: string }).instructions)
+ .toBe(`Right now:\nYou: Codex, outside Harness, on studio. Nothing can message you here.\nCan start harnesses: yes.\n\n${INSTRUCTIONS}`)
+ })
+
+ it('connects with the plain instructions when whoami fails or is slow', async () => {
+ const failed = await answer({ jsonrpc: '2.0', id: 1, method: 'initialize', params: {} }, deps({ run: runner({ code: 1, out: '' }).run }))
+ expect((failed!.result as { instructions: string }).instructions).toBe(INSTRUCTIONS)
+ const slow = await answer({ jsonrpc: '2.0', id: 2, method: 'initialize', params: {} }, deps({ run: () => new Promise(() => {}), whoamiMs: 5 }))
+ expect((slow!.result as { instructions: string }).instructions).toBe(INSTRUCTIONS)
+ })
+
+ it('offers harness_whoami as a read-only tool that runs harness whoami', async () => {
+ const r = runner()
+ await answer(call('harness_whoami'), deps({ run: r.run }))
+ expect(r.calls[0].argv).toEqual(['whoami'])
+ expect(TOOLS.find((t) => t.name === 'harness_whoami')?.annotations).toEqual({ readOnlyHint: true })
+ expect(INSTRUCTIONS).toContain('harness_whoami')
+ })
+```
+
+- [ ] **Step 2: Run them to see them fail**
+
+Run: `cd cli && npx vitest run src/agentClient/mcp.spec.ts`
+Expected: FAIL: no `harness_whoami`, and the instructions are not prefixed.
+
+- [ ] **Step 3: Implement**
+
+`mcp.ts`, first entry of `TOOLS`:
+
+```ts
+ {
+ name: 'harness_whoami',
+ description: 'Who you are to Harness: which agent, on which machine, inside Harness or not; whether you may start harnesses now and, if not, who can change that; how many of yours are open and how many starts are left. Call it first, and whenever a start is refused.',
+ inputSchema: schema({}),
+ annotations: { readOnlyHint: true },
+ argv: () => ['whoami'],
+ },
+```
+
+`INSTRUCTIONS`: begin its third paragraph with `Call harness_whoami first: it says whether you may start harnesses now. Then list (harness_list).`
+replacing `List first (harness_list).`
+
+`McpDeps`: add
+
+```ts
+ /** How long `initialize` waits for `harness whoami` before it answers without it. */
+ whoamiMs?: number
+```
+
+`initialize` case, after `state.client = …`:
+
+```ts
+ // Where the agent is and what it may do, as it connects: the same block `harness whoami` prints. Never held up:
+ // without it in time, the instructions alone.
+ const here = await Promise.race([
+ deps.run(['whoami'], callerEnv(deps, state.client)).catch(() => null),
+ new Promise<null>((done) => { const t = setTimeout(() => done(null), deps.whoamiMs ?? 5_000); t.unref?.() }),
+ ])
+ const now = here && here.code === EXIT.ok && here.out.trim() ? `Right now:\n${here.out.trim()}\n\n` : ''
+```
+
+and `instructions: \`${now}${INSTRUCTIONS}\``.
+
+`cli/src/engines/facets/hooks.ts`:
+
+```ts
+export const HARNESS_AGENT_TOOLS = {
+ whoami: 'harness_whoami', ps: 'harness_list', show: 'harness_read', wait: 'harness_wait', new: 'harness_start', close: 'harness_close', send: 'harness_send',
+} as const
+```
+
+`cli/packages/harness-mcp/mcpb/manifest.json`, first entry of `"tools"`:
+
+```json
+ {
+ "name": "harness_whoami",
+ "description": "Who you are to Harness: which agent, on which machine, whether you may start harnesses now and who can change that, and how much of your limit is left."
+ },
+```
+
+- [ ] **Step 4: Run the specs that read these lists**
+
+Run: `cd cli && npx vitest run src/agentClient src/engines/kit/hookSettings.spec.ts && npm run typecheck`
+Expected: PASS. (`hookSettings.spec.ts` builds its expected rules from `HARNESS_AGENT_VERBS`, so `whoami` is allowed
+without a permission question in Claude Code and Codex like the other verbs.)
+
+Run: `cd website && npx vitest run scripts/listings.spec.ts`
+Expected: PASS ("the bundle's manifest … lists the tools harness mcp serves").
+
+- [ ] **Step 5: Commit** (ask first)
+
+```bash
+git add cli/src/agentClient/mcp.ts cli/src/agentClient/mcp.spec.ts cli/src/engines/facets/hooks.ts cli/packages/harness-mcp/mcpb/manifest.json
+git commit -m "harness mcp: harness_whoami, and the instructions begin with where the agent is"
+```
+
+### Task 10: The pages agents read teach `whoami` first
+
+**Files:**
+- Modify: `plugins/harness/skills/harness/SKILL.md`, `website/public/llms.txt`, `website/public/agents/index.html`, `docs/cli.md`, `docs/design/2026-10-11-agent-client.md`, `docs/research/2026-10-11-listing-submissions.md`
+- Modify: `website/scripts/agents-site.spec.ts` (`AGENT_VERBS`)
+
+**Interfaces:**
+- Consumes: `harness whoami`, `harness_whoami` (Tasks 7, 9).
+
+- [ ] **Step 1: Make the check require it**
+
+In `agents-site.spec.ts`: `const AGENT_VERBS = ["whoami", "ps", "new", "wait", "show", "send", "close"];` and add to
+`usageSources`: `whoami: ["cli/src/agentClient/commands.ts", "WHOAMI_USAGE"],`.
+
+- [ ] **Step 2: Run it to see it fail**
+
+Run: `cd website && npx vitest run scripts/agents-site.spec.ts -t "teaches every agent command"`
+Expected: FAIL for all three pages: `harness whoami`.
+
+- [ ] **Step 3: Edit the pages**
+
+`SKILL.md`:
+- "## New harness or an existing one", item 1 becomes: ``1. Start with `harness whoami`: who you are, whether you may start harnesses now (and if not, who can change that), and how many of yours are open. Then list: `harness ps`. It shows the harnesses here: state, who started each (`you` for yours), and what each is about.``
+- "## The verbs", first line of the block: `harness whoami # who and where you are, whether you may start harnesses, your limits`
+- "## Inside a harness, or outside", "Outside Harness" bullet: replace ``Harness tells you by your session. `harness ps` says "You are Claude Code, outside Harness." and marks`` with ``Harness tells you by your session. `harness whoami` (and the top of `harness ps`) says "You: Claude Code, outside Harness, on <machine>." and `harness ps` marks``.
+- "## Harness's MCP tools": add `harness_whoami` (whoami) before `harness_list` (ps).
+
+`llms.txt`:
+- The commands block, first line: `harness whoami # who and where you are, whether you may start harnesses, your limits`
+- The MCP sentence: `harness_whoami, harness_list, harness_start, …`
+- In the long rules paragraph, `List first, name every harness,` becomes `Run harness whoami first, then list; name every harness,`.
+
+`agents/index.html`:
+- In "The commands" table, before the `harness ps [--all]` row:
+ `<tr><td><code>harness whoami</code></td><td>Who you are to Harness: which agent, on which machine, inside Harness or not; whether you may start harnesses now and, if not, who can change that; how many of yours are open. Run it first.</td></tr>`
+- In "MCP tools", before the `harness_list` row:
+ `<tr><td><code>harness_whoami</code></td><td>none</td><td><code>harness whoami</code></td></tr>`
+- In "Inside a harness, or outside Harness", the sentence quoting `harness ps` saying "You are Claude Code, outside
+ Harness." quotes `harness whoami` saying "You: Claude Code, outside Harness, on &lt;machine&gt;." instead.
+
+`docs/cli.md`: add a `harness whoami` entry beside `harness ps`, in the format the `ps` entry uses, with the three
+lines of the block as its example.
+
+`docs/design/2026-10-11-agent-client.md`, "The agent's side" block, first line:
+`harness whoami # who and where you are, whether you may start, your limits`.
+
+`docs/research/2026-10-11-listing-submissions.md`, the tools table, first row:
+``| `harness_whoami` | who the agent is, on which machine, whether it may start harnesses now, and its limits |``.
+
+- [ ] **Step 4: Run the website checks**
+
+Run: `cd website && npx vitest run scripts/agents-site.spec.ts scripts/listings.spec.ts`
+Expected: PASS.
+
+- [ ] **Step 5: Commit** (ask first)
+
+```bash
+git add plugins/harness/skills/harness/SKILL.md website/public/llms.txt website/public/agents/index.html website/scripts/agents-site.spec.ts docs/cli.md docs/design/2026-10-11-agent-client.md docs/research/2026-10-11-listing-submissions.md
+git commit -m "The pages agents read teach harness whoami first"
+```
+
+### Task 11: Check it as an agent would, then measure
+
+- [ ] **Step 1: Build and try it from a real pane** (no harness is started)
+
+Run: `cd cli && npm run build` (or the repository's usual local build), then from a Claude Code pane in Harness:
+`node cli/dist/cli.js whoami`, `node cli/dist/cli.js whoami --json`, `node cli/dist/cli.js ps | head -5`.
+Expected: the three lines with this machine's real name and the account's real switch; JSON with `context`; `ps`
+beginning with the block. From a plain terminal (the person): `whoami` prints `You: the person, on <machine>.` and
+`ps` begins with `NAME`.
+
+- [ ] **Step 2: MCP, with a real client** (no harness is started)
+
+Run: `claude -p "Call harness_whoami and print what it says, nothing else." --mcp-config '{"mcpServers":{"harness":{"command":"node","args":["<repo>/cli/dist/cli.js","mcp"]}}}' --allowedTools mcp__harness__harness_whoami`
+Expected: the block, beginning `You: Claude Code, outside Harness, on <machine>.`
+
+- [ ] **Step 3: Rerun the eval (with the person's approval)**
+
+Same cases and agents as the phase 2 baseline, on this branch's CLI. Put both summary lines (before and after) in
+the pull request. Expected: fewer orientation calls and no retries after a refusal in `switch-off` and `five-at-once`.
+
+- [ ] **Step 4: Full checks before the pull request**
+
+Run: `cd cli && npx vitest run src/agentClient src/lib/newCommand.spec.ts src/engines/kit/hookSettings.spec.ts src/architecture.spec.ts && npm run typecheck`
+and `cd website && npx vitest run scripts/agents-site.spec.ts scripts/listings.spec.ts`.
+Expected: PASS. Record what ran in the pull request (AGENTS.md: PR CI runs only the Linux unit checks).
diff --git a/docs/research/2026-10-11-listing-submissions.md b/docs/research/2026-10-11-listing-submissions.md
index a54e47473..fd5e62a28 100644
--- a/docs/research/2026-10-11-listing-submissions.md
+++ b/docs/research/2026-10-11-listing-submissions.md
@@ -63,6 +63,7 @@ Use the same words everywhere.
| Tool | What it does |
|---|---|
+ | `harness_whoami` | who the agent is, on which machine, whether it may start harnesses now, and its limits |
| `harness_list` | the harnesses on this machine: state, who started each, what each is about |
| `harness_start` | start Claude Code or Codex on a task in a folder, by name; returns at once |
| `harness_wait` | wait until harnesses stop working (up to 600 seconds a call) |
diff --git a/plugins/harness/skills/harness/SKILL.md b/plugins/harness/skills/harness/SKILL.md
index 2d0ced647..9988ed684 100644
--- a/plugins/harness/skills/harness/SKILL.md
+++ b/plugins/harness/skills/harness/SKILL.md
@@ -54,8 +54,9 @@ the person can watch and step in.
## New harness or an existing one
-1. List first: `harness ps`. It shows the harnesses here: state, who started each (`you` for yours), and what each
- is about.
+1. Start with `harness whoami`: who you are, whether you may start harnesses now (and if not, who can change that),
+ and how many of yours are open. Then list: `harness ps`. It shows the harnesses here: state, who started each
+ (`you` for yours), and what each is about.
2. You may give work only to a harness **you started**, or to a teammate in your tab while Agent Messages are on
(`harness send` alone lists them). Never give work to, or close, a harness you did not start: those are the
person's. You may `show` and `wait` on them.
@@ -67,6 +68,7 @@ the person can watch and step in.
## The verbs
```
+harness whoami # who and where you are, whether you may start harnesses, your limits
harness ps [--all] [--machine <name>] # the harnesses here, or on another machine
harness new [agent] [--machine <name>] [folder | project] --name <name> -- <task>
harness wait <name>[,<name>…] [--any] [--timeout 30m]
@@ -101,8 +103,8 @@ harness close <name> [--now] # when you are done with one
you, is no exception: outside your tab, or with Agent Messages off, put everything in the task and read the answer
with `show`.
- **Outside Harness** (Claude Code or Codex in a terminal app, an editor or the person's own tmux): Harness tells
- you by your session. `harness ps` says "You are Claude Code, outside Harness." and marks what this session
- started as `you`; the limits below apply; and you may close only what this session started. Nothing can
+ you by your session. `harness whoami` (and the top of `harness ps`) says "You: <agent>, outside Harness, on
+ <machine>.", and `harness ps` marks what this session started as `you`; the limits below apply; and you may close only what this session started. Nothing can
message you, and `harness send` is not available: put everything in the task, and for a follow-up start a new
harness with the fuller task.
@@ -122,7 +124,7 @@ the answer. For several at once, start each with its own name and wait on all of
## Harness's MCP tools
If Harness's MCP server (`harness mcp`) is connected, its tools are the same verbs under the same rules:
-`harness_list` (ps), `harness_start` (new: task, name, `folder` or `project`, `agent` claude or codex, `machine`),
+`harness_whoami` (whoami), `harness_list` (ps), `harness_start` (new: task, name, `folder` or `project`, `agent` claude or codex, `machine`),
`harness_wait` (up to 120 seconds by default and 600 at most; if they are still working, call it again),
`harness_read` (show), `harness_close` (close), and `harness_send` (send), offered only inside a harness.
diff --git a/website/public/agents/index.html b/website/public/agents/index.html
index 3ffe31554..94a9fdfe5 100644
--- a/website/public/agents/index.html
+++ b/website/public/agents/index.html
@@ -120,6 +120,9 @@ curl -fsSL https://raw.githubusercontent.com/autonomous-ai/openharness/main/plug
<table>
<thead><tr><th>Command</th><th>What it does</th></tr></thead>
<tbody>
+ <tr><td><code>harness whoami</code></td><td>Who you are to Harness: which agent, on which machine, inside Harness or
+ not; whether you may start harnesses now and, if not, who can change that; how many of yours are open. Run it
+ first.</td></tr>
<tr><td><code>harness ps [--all]</code></td><td>The harnesses on this machine: name, agent, state, who started it,
when it was last active, its folder and what it is about. <code>--all</code> adds the ones stopped in the
last week.</td></tr>
@@ -220,8 +223,9 @@ harness new codex --machine mini ~/code/app --name train -- "Run the training sc
teammates in your tab, while Agent Messages are on (Settings ▸ Experimental, off by default). A harness you started,
or the one that started you, is no exception.</li>
<li><strong>Outside Harness</strong> (Claude Code or Codex in a terminal app, an editor or the person's own tmux):
- Harness tells you by your session, from what your agent sets in its shell. <code>harness ps</code> says
- "You are Claude Code, outside Harness." and marks what this session started as <code>you</code>; the limits
+ Harness tells you by your session, from what your agent sets in its shell. <code>harness whoami</code> (and the
+ top of <code>harness ps</code>) says "You: &lt;agent&gt;, outside Harness, on &lt;machine&gt;.", and
+ <code>harness ps</code> marks what this session started as <code>you</code>; the limits
below apply; each harness you start reads
<code>[from Claude Code outside Harness · &lt;machine&gt;, the agent that started you. It reads your answer itself.]</code>
above its task; and you may close only what this session started. Nothing can message you, and
@@ -237,6 +241,7 @@ harness new codex --machine mini ~/code/app --name train -- "Run the training sc
<table>
<thead><tr><th>Tool</th><th>Arguments</th><th>Same as</th></tr></thead>
<tbody>
+ <tr><td><code>harness_whoami</code></td><td>none</td><td><code>harness whoami</code></td></tr>
<tr><td><code>harness_list</code></td><td><code>all?</code></td><td><code>harness ps</code></td></tr>
<tr><td><code>harness_start</code></td><td><code>task</code>, <code>name</code>, <code>folder?</code> or
<code>project?</code> (a new project for scratch or new work), <code>agent?</code> (<code>claude</code> or
@@ -260,13 +265,6 @@ harness new codex --machine mini ~/code/app --name train -- "Run the training sc
or in Claude Code <code>claude mcp add harness -- harness mcp</code>. An app opened from the Finder may not have
<code>~/.local/bin</code> on its PATH; if it cannot find <code>harness</code>, give it the full path that
<code>command -v harness</code> prints.</p>
- <p>Through npm, for clients that start servers with <code>npx</code>: <code>@autonomous-ai/harness-mcp</code> runs
- <code>harness mcp</code> from the installed CLI, and where Harness is not installed it offers one tool,
- <code>harness_setup</code>, that says how to install it.
- <a href="goose://extension?cmd=npx&amp;arg=-y&amp;arg=%40autonomous-ai%2Fharness-mcp&amp;timeout=660&amp;id=harness&amp;name=Harness&amp;description=Start%20Claude%20Code%20and%20Codex%20agents%20the%20person%20can%20watch%2C%20wait%20for%20them%20and%20read%20their%20answers.">Add to goose</a>
- uses this form.</p>
- <pre><code>{"mcpServers": {"harness": {"command": "npx", "args": ["-y", "@autonomous-ai/harness-mcp"]}}}
-claude mcp add harness -- npx -y @autonomous-ai/harness-mcp</code></pre>
<h2 id="rules">Rules</h2>
<ul>
diff --git a/website/public/llms.txt b/website/public/llms.txt
index ef8218799..201cb6c3e 100644
--- a/website/public/llms.txt
+++ b/website/public/llms.txt
@@ -16,6 +16,7 @@ An agent starts harnesses only once the person turns on "Agents can start other
The commands an agent uses:
```
+harness whoami # who and where you are, whether you may start harnesses, your limits
harness ps [--all] # the harnesses here: state, who started each, what each is about
harness new [agent] [--machine NAME] [folder | project] --name NAME -- TASK
harness wait NAME[,NAME…] [--any] [--timeout 30m] # exits 0 idle, 3 needs the person, 4 stopped or gone, 124 timed out
@@ -28,9 +29,9 @@ harness close NAME [--now] # save its screen and stop i
Once Harness runs on a computer, Claude Code and Codex there run these commands and Harness's MCP tools without asking: Harness adds them to their permission rules, and Codex runs them outside its sandbox. Run each `harness` command by itself or join them with `&&`; piped or joined with other commands, the rule no longer matches. Where Harness has not set an agent up, run `harness` outside its sandbox, which cannot reach Harness's local daemon.
-`harness mcp` serves the same as MCP tools over stdio (command `harness`, arguments `["mcp"]`): `harness_list`, `harness_start`, `harness_wait`, `harness_read`, `harness_close`, and `harness_send` inside a harness (teammates in its tab only, while Agent Messages are on: Settings ▸ Experimental, off by default). For clients that start servers with npx, `npx -y @autonomous-ai/harness-mcp` runs `harness mcp`, or, where Harness is not installed, offers one tool, `harness_setup`, that says how to install it.
+`harness mcp` serves the same as MCP tools over stdio (command `harness`, arguments `["mcp"]`): `harness_whoami`, `harness_list`, `harness_start`, `harness_wait`, `harness_read`, `harness_close`, and `harness_send` inside a harness (teammates in its tab only, while Agent Messages are on: Settings ▸ Experimental, off by default).
-Every harness spends the person's tokens. Start one only for work that can run in parallel with yours, needs another model's view (a review, a second opinion from Codex), takes long, or belongs in its own folder; do quick work yourself. For scratch or new work, give a project name (`harness new codex review -- …`) rather than a folder of your own: Claude Code and Codex ask the person to trust a folder Harness did not make. List first, name every harness, then wait, read it, and close it once you have its answer. An agent may have at most 4 live harnesses it started, and a harness another agent started may not start harnesses itself. Harness cleans up after agents: closing a harness closes the harnesses it started, and one another agent started is closed once it has sat idle 30 minutes after its last answer, unless the person typed into it; its conversation is kept. Give work only to harnesses you started, and close only those; starting one does not let you message it, so put everything in the task; never answer a harness's question or permission prompt, and never ask one to publish, deploy, delete or push. An agent outside Harness (Claude Code or Codex in a terminal app or editor) is recognized by its session: it gets the same limits, may close only what its session started, and cannot be messaged.
+Every harness spends the person's tokens. Start one only for work that can run in parallel with yours, needs another model's view (a review, a second opinion from Codex), takes long, or belongs in its own folder; do quick work yourself. For scratch or new work, give a project name (`harness new codex review -- …`) rather than a folder of your own: Claude Code and Codex ask the person to trust a folder Harness did not make. Run `harness whoami` first, then list; name every harness, then wait, read it, and close it once you have its answer. An agent may have at most 4 live harnesses it started, and a harness another agent started may not start harnesses itself. Harness cleans up after agents: closing a harness closes the harnesses it started, and one another agent started is closed once it has sat idle 30 minutes after its last answer, unless the person typed into it; its conversation is kept. Give work only to harnesses you started, and close only those; starting one does not let you message it, so put everything in the task; never answer a harness's question or permission prompt, and never ask one to publish, deploy, delete or push. An agent outside Harness (Claude Code or Codex in a terminal app or editor) is recognized by its session: it gets the same limits, may close only what its session started, and cannot be messaged.
## For agents
diff --git a/website/scripts/agents-site.spec.ts b/website/scripts/agents-site.spec.ts
index 5c5e9882b..b653283fc 100644
--- a/website/scripts/agents-site.spec.ts
+++ b/website/scripts/agents-site.spec.ts
@@ -51,6 +51,76 @@ describe("the pages and skill agents read", () => {
for (const verb of verbs) expect(cliVerbs.has(verb), `harness ${verb}`).toBe(true);
});
+ // The agent commands each page must teach, and where each command's usage (its options) is written.
+ const AGENT_VERBS = ["whoami", "ps", "new", "wait", "show", "send", "close"];
+ const usageSources: Record<string, [string, string]> = {
+ whoami: ["cli/src/agentClient/commands.ts", "WHOAMI_USAGE"],
+ ps: ["cli/src/agentClient/commands.ts", "PS_USAGE"],
+ show: ["cli/src/agentClient/commands.ts", "SHOW_USAGE"],
+ wait: ["cli/src/agentClient/commands.ts", "WAIT_USAGE"],
+ close: ["cli/src/agentClient/commands.ts", "CLOSE_USAGE"],
+ new: ["cli/src/lib/newCommand.ts", "NEW_USAGE"],
+ send: ["cli/src/messages/command.ts", "SEND_USAGE"],
+ };
+ /** The options a verb's usage names: every `--word` from `export const X` to the next export. */
+ function usageFlags(verb: string): Set<string> {
+ const [file, name] = usageSources[verb];
+ const source = readFileSync(join(repo, file), "utf8");
+ const start = source.indexOf(`export const ${name}`);
+ expect(start, `${name} in ${file}`).toBeGreaterThanOrEqual(0);
+ const end = source.indexOf("\nexport ", start + 1);
+ const block = source.slice(start, end === -1 ? undefined : end);
+ const flags = new Set([...block.matchAll(/--[a-z][a-z-]*/g)].map((m) => m[0]));
+ // `${ON_MACHINE}` stands for the --machine line the four verbs share.
+ if (block.includes("${ON_MACHINE}")) flags.add("--machine");
+ for (const always of ["--json", "--help"]) flags.add(always);
+ return flags;
+ }
+ /** Each `harness <agent verb> …` in a page's code, with the options it uses (the task after ` -- ` left out). */
+ function agentCalls(text: string, html: boolean): Array<{ verb: string; flags: string[]; line: string }> {
+ const calls: Array<{ verb: string; flags: string[]; line: string }> = [];
+ for (const code of codeIn(text, html)) {
+ for (const m of code.matchAll(/(?:^|[\s;&|(])harness ([a-z][a-z-]*)([^\n]*)/gm)) {
+ if (!AGENT_VERBS.includes(m[1]) && m[1] !== "whoami") continue;
+ const rest = m[2].split(/\s--\s|&&|\|\||;|\|/)[0];
+ calls.push({ verb: m[1], flags: [...rest.matchAll(/(?:^|[\s[(|])(--[a-z][a-z-]*)/g)].map((f) => f[1]), line: `harness ${m[1]}${m[2]}` });
+ }
+ }
+ return calls;
+ }
+
+ it.each([
+ ["/agents", page, true],
+ ["/llms.txt", llms, false],
+ ["SKILL.md", skill, false],
+ ] as const)("%s teaches every agent command", (_, text, html) => {
+ const verbs = verbsIn(text, html);
+ for (const verb of AGENT_VERBS) expect(verbs.has(verb), `harness ${verb}`).toBe(true);
+ });
+
+ it.each([
+ ["/agents", page, true],
+ ["/llms.txt", llms, false],
+ ["SKILL.md", skill, false],
+ ] as const)("%s uses only options the agent commands take", (_, text, html) => {
+ const calls = agentCalls(text, html);
+ expect(calls.length).toBeGreaterThan(5);
+ for (const call of calls) {
+ if (!usageSources[call.verb]) continue;
+ const known = usageFlags(call.verb);
+ for (const flag of call.flags) expect(known.has(flag), `${flag} in: ${call.line}`).toBe(true);
+ }
+ });
+
+ it.each([
+ ["/agents", page, true],
+ ["/llms.txt", llms, false],
+ ["SKILL.md", skill, false],
+ ] as const)("%s names machines with --machine, never @", (_, text, html) => {
+ // `harness new claude @office` became a project called "@office" on this machine; the CLI refuses it (#1333).
+ for (const call of agentCalls(text, html)) expect(call.line.split(/\s--\s/)[0], call.line).not.toMatch(/\s@[A-Za-z]/);
+ });
+
it("gives the exit codes the agent commands return", () => {
const literal = agentVerbs.match(/export const EXIT = \{([^}]*)\}/);
expect(literal).not.toBeNull();
@@ -115,8 +185,7 @@ describe("the pages and skill agents read", () => {
// The formats, as each editor documents them on 2026-10-11: Cursor (cursor.com/docs/mcp/install-links) and
// LM Studio (lmstudio.ai/docs/app/mcp/deeplink) take a name and the base64 of the server's config; VS Code
// (code.visualstudio.com/docs/copilot/guides/mcp-developer-guide) the URL-encoded config with its name in it,
- // and its mcp.json reference marks `type` required; goose (its docs, getting-started/using-extensions) only
- // commands such as npx, an `arg` per argument.
+ // and its mcp.json reference marks `type` required.
const server = (JSON.parse(readFileSync(join(repo, "plugins", "harness", ".mcp.json"), "utf8")) as { mcpServers: Record<string, unknown> }).mcpServers.harness;
const links = [...page.matchAll(/href="((?:cursor|vscode|vscode-insiders|lmstudio|goose):[^"]+)"/g)].map((m) => decode(m[1]));
const base64 = (value: string | null) => JSON.parse(Buffer.from(value ?? "", "base64").toString("utf8"));
@@ -125,9 +194,8 @@ describe("the pages and skill agents read", () => {
const cursor = links.filter((link) => link.startsWith("cursor://anysphere.cursor-deeplink/mcp/install?"));
const vscode = links.filter((link) => /^vscode(-insiders)?:mcp\/install\?/.test(link));
const lmstudio = links.filter((link) => link.startsWith("lmstudio://add_mcp?"));
- const goose = links.filter((link) => link.startsWith("goose://extension?"));
- expect([cursor.length, vscode.length, lmstudio.length, goose.length]).toEqual([1, 2, 1, 1]);
- expect(links).toHaveLength(5);
+ expect([cursor.length, vscode.length, lmstudio.length]).toEqual([1, 2, 1]);
+ expect(links).toHaveLength(4);
expect(query(cursor[0]).get("name")).toBe("harness");
expect(base64(query(cursor[0]).get("config"))).toEqual(server);
@@ -135,18 +203,18 @@ describe("the pages and skill agents read", () => {
expect(query(lmstudio[0]).get("name")).toBe("harness");
expect(base64(query(lmstudio[0]).get("config"))).toEqual(server);
- // goose runs the npm package, as the npx form beside it does, which server.json lists for the MCP Registry.
+ });
+
+ it("does not send agents to the npm package until it is published", () => {
+ // npm answered 404 for @autonomous-ai/harness-mcp on 2026-10-15, and an agent that runs `npx` on it gets only an
+ // error. Phase 10 of docs/design/2026-10-15-agent-experience.md publishes it and brings these back, with goose's
+ // link (goose runs only commands such as npx).
const npm = (JSON.parse(readFileSync(join(repo, "server.json"), "utf8")) as { packages: { registryType: string; identifier: string }[] })
.packages.find((pkg) => pkg.registryType === "npm")!.identifier;
- const g = query(goose[0]);
- expect([g.get("cmd"), ...g.getAll("arg")]).toEqual(["npx", "-y", npm]);
- expect(g.get("id")).toBe("harness");
- expect(page).toContain(`{"command": "npx", "args": ["-y", "${npm}"]}`);
- expect(page).toContain(`claude mcp add harness -- npx -y ${npm}`);
- expect(llms).toContain(`npx -y ${npm}`);
- // goose ends a call after `timeout` seconds; harness_wait may wait up to its maximum.
- const waitMax = Number(readFileSync(join(repo, "cli", "src", "agentClient", "mcp.ts"), "utf8").match(/const WAIT_MAX_S = (\d+)/)![1]);
- expect(Number(g.get("timeout"))).toBeGreaterThan(waitMax);
+ for (const text of [page, llms, skill]) {
+ expect(text).not.toContain(npm);
+ expect(text).not.toContain("goose://");
+ }
});
it("links the skill where it is in this repository", () => {