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.

Move package launch preparation behind the Store port (#1073)

Dee0ed5636d4e6c
diff --git a/cli/e2e/storeProcess.e2e.ts b/cli/e2e/storeProcess.e2e.ts
index 911ab0d3b..11abe5a08 100644
--- a/cli/e2e/storeProcess.e2e.ts
+++ b/cli/e2e/storeProcess.e2e.ts
@@ -8,7 +8,7 @@
* on, and the master brings it back.
*/
import { execFileSync } from 'node:child_process'
-import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs'
+import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs'
import { join } from 'node:path'
import { afterEach, describe, expect, it, onTestFailed } from 'vitest'
import { LocalClient, type Frame } from './harness/client.js'
@@ -18,10 +18,10 @@ const HARNESS = 'e2e/installed-here'
const FIRST = 'e2e/installed-first'
/** A harness in a git repository of its own, whose setup says a line: what `dsh_install` clones and sets up. */
-function repository(d: IsolatedDaemon, id = HARNESS, name = 'Installed Here', gate?: { ready: string; release: string }): string {
+function repository(d: IsolatedDaemon, id = HARNESS, name = 'Installed Here', gate?: { ready: string; release: string }, initialization?: string): string {
const dir = join(d.root, `repo-${id.replace('/', '-')}`)
mkdirSync(dir, { recursive: true })
- writeFileSync(join(dir, 'harness.json'), JSON.stringify({ spec: 1, id, name, engine: 'claude', toolchain: { setup: './setup.sh' } }))
+ writeFileSync(join(dir, 'harness.json'), JSON.stringify({ spec: 1, id, name, engine: 'claude', toolchain: { setup: './setup.sh' }, ...(initialization ? { workspace: { init: './init.mjs' } } : {}) }))
const quote = (value: string) => `'${value.replaceAll("'", "'\\''")}'`
// Found by QA on a quiet machine: hold setup while the core reads the uninstalled index. A
// warming loop can cross the install's completion and mistake a successful create for a failure.
@@ -32,6 +32,7 @@ function repository(d: IsolatedDaemon, id = HARNESS, name = 'Installed Here', ga
setTimeout(() => { console.error('test did not release the install setup'); process.exit(1); }, 30000);
`)}\n` : ''
writeFileSync(join(dir, 'setup.sh'), `#!/bin/sh\necho setting up\n${wait}`, { mode: 0o755 })
+ if (initialization) writeFileSync(join(dir, 'init.mjs'), `#!/usr/bin/env node\n${initialization}`, { mode: 0o755 })
const git = (...args: string[]) => execFileSync('git', ['-C', dir, ...args], { env: { ...process.env, HOME: d.env.HOME, GIT_CONFIG_NOSYSTEM: '1' } })
git('init', '-q', '-b', 'main')
git('add', '.')
@@ -48,10 +49,10 @@ const connected = (d: IsolatedDaemon) => d.log().split('[services] store connect
const row = async (client: LocalClient, agentId: string) =>
((await client.request<{ agents: Array<Record<string, any>> }>('agents_list', { includeStopped: true }, 30_000)).agents)
.find((agent) => agent.id === agentId)
-async function create(d: IsolatedDaemon, client: LocalClient, folder: string, dsh?: string): Promise<Record<string, any>> {
+async function create(d: IsolatedDaemon, client: LocalClient, folder: string, dsh?: string, engine: 'claude' | 'codex' = 'claude'): Promise<Record<string, any>> {
const cwd = join(d.projectsDir, folder)
mkdirSync(cwd, { recursive: true })
- const created = await client.request('agent_create', { engine: 'claude', cwd, bypassPermission: true, ...(dsh ? { dsh } : {}) }, 90_000)
+ const created = await client.request('agent_create', { engine, cwd, bypassPermission: true, ...(dsh ? { dsh } : {}) }, 90_000)
expect(created.error, JSON.stringify(created)).toBeUndefined()
return until(`${folder} to bind`, async () => {
const found = await row(client, created.agent.id)
@@ -67,8 +68,8 @@ async function turn(client: LocalClient, agentId: string, content: string): Prom
describe('the Store in its own process, beside the viewers', () => {
let daemon: IsolatedDaemon | undefined
afterEach(async () => { await daemon?.close(); daemon = undefined })
- const fresh = async () => {
- const d = await IsolatedDaemon.create({ env: { HARNESSD_SERVICE_INITIAL_BACKOFF_MS: '200', HARNESSD_SERVICE_MAX_BACKOFF_MS: '1000' } })
+ const fresh = async (env: Record<string, string> = {}) => {
+ const d = await IsolatedDaemon.create({ env: { HARNESSD_SERVICE_INITIAL_BACKOFF_MS: '200', HARNESSD_SERVICE_MAX_BACKOFF_MS: '1000', ...env } })
daemon = d
onTestFailed(() => { console.log(`---- daemon log\n${d.log().split('\n').slice(-150).join('\n')}`) })
await d.start()
@@ -137,4 +138,85 @@ describe('the Store in its own process, beside the viewers', () => {
expect(d.coresStarted()).toBe(1)
client.close()
})
+ it.each(['killed', 'hung'] as const)('Store %s at boot: readiness and plain launches proceed, package agents wait prepared', async how => {
+ const d = await fresh({ HARNESSD_SERVICE_HEARTBEAT_TIMEOUT_MS: '3000', HARNESSD_SERVICE_STOP_GRACE_MS: '100' })
+ let client = await LocalClient.connect(d)
+ expect(await client.request('dsh_install', { url: repository(d) }, 180_000)).toMatchObject({ ok: true })
+ const agents = [await create(d, client, 'held-claude', HARNESS), await create(d, client, 'held-codex', HARNESS, 'codex')]
+ const stopped = await create(d, client, 'stop-while-store-is-held', HARNESS)
+ for (const agent of [...agents, stopped]) await turn(client, agent.id, 'before the reboot')
+ const hold = join(d.root, 'hold-store')
+ writeFileSync(hold, '')
+ d.env.HARNESSD_TEST_HOLD_CONNECT = `store:${hold}`
+ client.close()
+ await d.stop()
+ await d.tmux.run('kill-server')
+ const started = Date.now()
+ await d.start()
+ expect(Date.now() - started).toBeLessThan(15_000)
+ client = await LocalClient.connect(d)
+ for (const agent of agents) {
+ await until('a package launch held for Store', async () => (await row(client, agent.id))?.launch?.state === 'held' || null, 10_000, 100)
+ expect(await row(client, agent.id)).toMatchObject({ status: 'offline', launch: { state: 'held', service: 'store' } })
+ }
+ const stopReply = await client.request('agent_delete', { agentId: stopped.id }, 10_000)
+ expect(stopReply.error, JSON.stringify(stopReply)).toBeUndefined()
+ await until('Stop completes while Store is unavailable', async () => (await row(client, stopped.id))?.status === 'stopped' || null, 10_000, 100)
+ const pid = viewersPid(d)!
+ process.kill(pid, how === 'killed' ? 'SIGKILL' : 'SIGSTOP')
+ await until('Store supervised back', () => viewersPid(d) !== pid || null, 30_000, 100)
+ const plain = await create(d, client, 'plain-during-store-outage')
+ await turn(client, plain.id, 'ready without the Store')
+ const cwd = join(d.projectsDir, 'refused-package')
+ mkdirSync(cwd)
+ const refused = await client.request('agent_create', { engine: 'claude', cwd, dsh: HARNESS, bypassPermission: true }, 10_000)
+ expect(refused).toMatchObject({ error: 'DSH_UNAVAILABLE' })
+ expect(readdirSync(cwd)).toEqual([])
+ for (const agent of agents) expect(await row(client, agent.id)).toMatchObject({ launch: { state: 'held' } })
+ rmSync(hold)
+ for (const agent of agents) {
+ await until('the prepared package resumes its conversation', async () => {
+ const now = await row(client, agent.id)
+ return now?.status === 'active' && now.sessionId === agent.sessionId && now.launch?.state === 'ready' || null
+ }, 90_000, 250)
+ await turn(client, agent.id, 'after Store recovery')
+ }
+ expect(await row(client, stopped.id)).toMatchObject({ status: 'stopped', sessionId: stopped.sessionId })
+ expect(d.log()).not.toContain('could not build its launch')
+ expect(d.coresStarted()).toBe(2)
+ client.close()
+ })
+
+ it('a Store killed during init preserves uncertain work and never repeats it under a new create label', async () => {
+ const d = await fresh()
+ const client = await LocalClient.connect(d)
+ const release = join(d.root, 'release-init')
+ const cwd = join(d.projectsDir, 'interrupted-init')
+ mkdirSync(cwd)
+ const script = `import fs from 'node:fs';
+ fs.appendFileSync('attempts', 'once\\n'); fs.writeFileSync('init-ready', 'ready');
+ const timer = setInterval(() => { if (fs.existsSync(${JSON.stringify(release)})) { fs.writeFileSync('init-done', 'done'); clearInterval(timer); } }, 20);
+ setTimeout(() => { clearInterval(timer); process.exit(2); }, 30000).unref();`
+ expect(await client.request('dsh_install', { url: repository(d, HARNESS, 'Interrupted Init', undefined, script) }, 180_000)).toMatchObject({ ok: true })
+ const request = { engine: 'claude', cwd, dsh: HARNESS, bypassPermission: true }
+ const creating = client.request('agent_create', request, 45_000)
+ try {
+ await until('init writes its first part', () => existsSync(join(cwd, 'init-ready')) || null, 20_000, 50)
+ process.kill(viewersPid(d)!, 'SIGKILL')
+ expect(await creating).toMatchObject({ error: 'DSH_UNAVAILABLE' })
+ await until('the replacement Store connects', () => connected(d) >= 2 || null, 20_000, 100)
+ const retry = await client.request('agent_create', request, 10_000)
+ expect(retry).toMatchObject({ error: 'DSH_UNAVAILABLE', detail: expect.stringContaining('unconfirmed') })
+ expect(readFileSync(join(cwd, 'attempts'), 'utf8')).toBe('once\n')
+ expect(existsSync(join(cwd, '.harness', 'runtime'))).toBe(false)
+ const plain = await create(d, client, 'plain-after-interrupted-init')
+ await turn(client, plain.id, 'workspace uncertainty is isolated')
+ expect(d.coresStarted()).toBe(1)
+ } finally {
+ writeFileSync(release, 'finish')
+ await until('the isolated orphaned init finishes', () => existsSync(join(cwd, 'init-done')) || null, 10_000, 50)
+ client.close()
+ }
+ })
+
})
diff --git a/cli/scripts/handoff-2026-10-08/mutate-dsh-launch.py b/cli/scripts/handoff-2026-10-08/mutate-dsh-launch.py
new file mode 100644
index 000000000..8785500b2
--- /dev/null
+++ b/cli/scripts/handoff-2026-10-08/mutate-dsh-launch.py
@@ -0,0 +1,31 @@
+"""Break one Store launch contribution at a time; an assertion must reject each mutation."""
+import os
+from pathlib import Path
+import subprocess
+import sys
+
+cli = Path(sys.argv[1]).resolve()
+path = cli / 'src/services/storeLaunch.ts'
+original = path.read_text()
+mutations = [
+ ('drop the account at create', 'materializeWorkspace(installed, workspace, account, engine)', 'materializeWorkspace(installed, workspace, {}, engine)'),
+ ('drop the account at relaunch', 'prepareHarnessLaunch(installed, workspace, engine, key, account, sourceKey)', 'prepareHarnessLaunch(installed, workspace, engine, key, {}, sourceKey)'),
+ ('drop the fork source', 'prepareHarnessLaunch(installed, workspace, engine, key, account, sourceKey)', 'prepareHarnessLaunch(installed, workspace, engine, key, account, null)'),
+ ('drop package argv', 'launch: prepareHarnessLaunch(installed, workspace, engine, key, account, sourceKey)', 'launch: { ...prepareHarnessLaunch(installed, workspace, engine, key, account, sourceKey), args: [] }'),
+]
+env = {**os.environ, 'TZ': 'UTC', 'TMPDIR': '/tmp'}
+env.pop('RECORD_DSH_LAUNCH_SHAPES_GOLDEN', None)
+for name, before, after in mutations[int(sys.argv[2]) if len(sys.argv) > 2 else 0:]:
+ assert original.count(before) == 1, name
+ path.write_text(original.replace(before, after))
+ try:
+ result = subprocess.run(['node', 'node_modules/vitest/vitest.mjs', 'run', 'src/engines/dshLaunchShapes.golden.spec.ts', '--maxWorkers=1'],
+ cwd=cli, env=env, text=True, capture_output=True, timeout=90)
+ output = result.stdout + result.stderr
+ # A compile/import/setup failure is not proof that the golden detects broken wiring.
+ if result.returncode == 0 or 'AssertionError:' not in output or 'dshLaunchShapes.golden.spec.ts:' not in output:
+ print(output[-6000:])
+ raise SystemExit(f'{name}: not rejected by the golden assertion')
+ print(f'{name}: caught by unchanged golden', flush=True)
+ finally:
+ path.write_text(original)
diff --git a/cli/src/architecture.spec.ts b/cli/src/architecture.spec.ts
index afe00791c..efd8a404d 100644
--- a/cli/src/architecture.spec.ts
+++ b/cli/src/architecture.spec.ts
@@ -207,8 +207,8 @@ const EDGE: RegExp[] = [
// The recaps' own parts: the mirror that cuts each turn's recap and card, and the notification policy it
// shares with the questions the core tells it of (services/recaps.ts).
/^lib\/(commander|agentNotifications)\.ts$/,
- // The Store's and the viewers' parts of dsh; the launch path (installed, manifest, launch, runtime, …) is the core's.
- /^dsh\/(catalog|install|update|updates|registry|wire|service|lock|builtins|viewer|viewerLedger|verdict|artifacts)\.ts$/,
+ // Package execution belongs to the Store; core retains the installed index and launch contracts.
+ /^dsh\/(catalog|install|update|updates|registry|wire|service|lock|builtins|viewer|viewerLedger|verdict|artifacts|runtime|materialize|shell|preparation)\.ts$/,
// Search's index; the readers of other engines' sessions (external.ts, externals/) are the core's, for adoption.
/^lib\/sessionSearch\/(?!external\.ts$|externals\/)/,
// Downloading builds: the updater's, in a process the master runs (services/updaterProcess.ts). The core
diff --git a/cli/src/backendSocket.dsh.spec.ts b/cli/src/backendSocket.dsh.spec.ts
index f2ab74b90..846a6d275 100644
--- a/cli/src/backendSocket.dsh.spec.ts
+++ b/cli/src/backendSocket.dsh.spec.ts
@@ -9,7 +9,7 @@ import { BackendSocket } from './backendSocket.js'
import { relaySocket } from './testing/relaySocket.js'
import { bindLaunchRequests } from './testing/socketCore.js'
import { env } from './config/env.js'
-import { emptyPorts } from './core/api.js'
+import { emptyPorts, STORE_OFF, STORE_FALLBACKS } from './core/api.js'
import { createServiceHost } from './core/serviceHost.js'
import { refreshDshRegistry } from './dsh/catalog.js'
import { dshInstallDir, invalidateInstalledDsh, upsertInstalledRecord } from './dsh/installed.js'
@@ -30,7 +30,10 @@ describe('the DSH requests on the local socket', () => {
const host = createServiceHost(emptyPorts(), { log: () => {}, faults })
const deps: StoreDeps = { prepare: () => true, refresh: refreshDshRegistry, rows: dshListRows, mutate: (input, progress) => mutate(input, progress), remove: (id) => remove(id) }
const core = fakeCore({ clients: { dshInstallStatus: (status) => socket.send({ type: 'dsh_install_status', payload: status }) } })
- host.serve('store', (api) => startStore(api, deps), core, STORE_REQUESTS)
+ host.start('store', (api, ports) => {
+ ports.store = STORE_OFF
+ return startStore(api, deps)
+ }, core, STORE_FALLBACKS, STORE_REQUESTS)
socket.serviceRouter = (type, payload, asker, reply) => host.route(type, payload, asker, reply)
}
beforeEach(() => {
diff --git a/cli/src/core/agents/create.spec.ts b/cli/src/core/agents/create.spec.ts
index cfd17cbf7..e70315718 100644
--- a/cli/src/core/agents/create.spec.ts
+++ b/cli/src/core/agents/create.spec.ts
@@ -4,8 +4,7 @@ import { join } from 'node:path'
import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { installedDsh } from '../../dsh/installed.js'
import { dshPinnedPermissionMode } from '../../dsh/manifest.js'
-import { materializeWorkspace } from '../../dsh/materialize.js'
-import { harnessLaunchOrRefusal, incompatibleHarnessEngine } from '../../dsh/runtime.js'
+import { incompatibleHarnessEngine } from '../../dsh/compatibility.js'
import { createAndRegisterPane } from '../../lib/createAgentPane.js'
import { enginePathOverride } from '../../lib/engineBin.js'
import { buildEngineLaunchArgv, namedAgentArgs, permissionModeFlags, refusePermissionFlagIfUnsupported, supportsFirstPrompt } from '../../lib/engineLaunch.js'
@@ -22,13 +21,9 @@ import { createAgentCreator, type CreateAgentDeps } from './create.js'
vi.mock('../../dsh/installed.js', () => ({ installedDsh: vi.fn(() => undefined) }))
vi.mock('../../dsh/manifest.js', async (real) => ({ ...await real<object>(), dshPinnedPermissionMode: vi.fn(() => null) }))
-vi.mock('../../dsh/materialize.js', () => ({ materializeWorkspace: vi.fn(async () => ({ warnings: [], created: [], kept: [] })) }))
-vi.mock('../../dsh/runtime.js', async (real) => ({
- ...await real<object>(),
- harnessLaunchOrRefusal: vi.fn((prepare: () => unknown) => { prepare(); return { ok: true, launch: { env: { HARNESS_DSH: 'blender' }, args: ['--dsh'] } } }),
- incompatibleHarnessEngine: vi.fn(() => null),
- prepareHarnessLaunch: vi.fn(),
-}))
+vi.mock('../../dsh/compatibility.js', () => ({ incompatibleHarnessEngine: vi.fn(() => null) }))
+const materializeWorkspace = vi.fn(async () => ({ warnings: [], created: [], kept: [] }))
+
vi.mock('../../dsh/launch.js', async (real) => ({ ...await real<object>(), harnessEnvToClear: vi.fn(() => ['HARNESS_OLD']) }))
// OpenCode's version probe is its own code, loaded for an OpenCode launch alone; a test may say it could not be.
vi.mock('../../engines/inProcess.js', async (real) => {
@@ -77,6 +72,8 @@ vi.mock('../../lib/sessionSearch/external.js', async (real) => ({ ...await real<
vi.mock('../../lib/tmux.js', async (real) => ({ ...await real<object>(), clearPaneRemainOnExit: vi.fn(async () => {}) }))
vi.mock('../../lib/tmuxVersion.js', async (real) => ({ ...await real<object>(), tmuxSupportsSessionEnv: vi.fn(async () => true) }))
+const launchDsh = vi.fn<CreateAgentDeps['dshLaunch']['launch']>(async () => ({ ok: true, launch: { env: { HARNESS_DSH: 'blender' }, args: ['--dsh'] } }))
+
const root = mkdtempSync(join(tmpdir(), 'core-create-'))
afterAll(() => rmSync(root, { recursive: true, force: true }))
let folders = 0
@@ -115,6 +112,7 @@ function setup(over: Partial<CreateAgentDeps> = {}) {
blocksFolder: vi.fn(() => false),
gridSetup: vi.fn(() => vi.fn(async () => ({}))) as never,
privateGridName: vi.fn(async () => 'grid-me'),
+ dshLaunch: { launch: launchDsh, materialize: async () => ({ ok: true, ...await materializeWorkspace() }) },
...over,
}
return { deps, create: createAgentCreator(deps) }
@@ -165,7 +163,7 @@ describe('creating an agent', () => {
vi.mocked(materializeWorkspace).mockRejectedValueOnce(new Error('disk full')).mockRejectedValueOnce('worse')
expect(await create(request({ dsh: 'blender' }))).toMatchObject({ error: 'DSH_MATERIALIZE_FAILED', detail: 'could not prepare the workspace for blender · disk full' })
expect(await create(request({ dsh: 'blender' }))).toMatchObject({ detail: 'could not prepare the workspace for blender · worse' })
- vi.mocked(harnessLaunchOrRefusal).mockReturnValueOnce({ ok: false, error: 'DSH_RUNTIME', detail: 'no runtime' } as never)
+ launchDsh.mockResolvedValueOnce({ ok: false, error: 'DSH_RUNTIME', detail: 'no runtime' } as never)
expect(await create(request({ dsh: 'blender' }))).toEqual({ ok: false, error: 'DSH_RUNTIME', detail: 'no runtime' })
vi.mocked(installedDsh).mockReset().mockReturnValue(undefined)
})
@@ -241,6 +239,20 @@ describe('creating an agent', () => {
expect(await create(request({ engine: 'terminal' }))).toMatchObject({ ok: true, session: { engine: 'terminal' } })
})
+ it('does not trust, configure or launch a workspace when the Store cannot prepare it', async () => {
+ vi.mocked(installedDsh).mockReturnValue(installed() as never)
+ const refused = { ok: false as const, error: 'DSH_UNAVAILABLE', detail: 'Store unavailable', unavailable: 'store' as const }
+ const materialize = vi.fn(async () => refused)
+ const { create } = setup({ dshLaunch: { materialize, launch: launchDsh } })
+ expect(await create(request({ dsh: 'blender' }))).toEqual({ ok: false, error: refused.error, detail: refused.detail })
+ expect(launchDsh).not.toHaveBeenCalled()
+ expect(createAndRegisterPane).not.toHaveBeenCalled()
+ expect(preTrustClaudeProject).not.toHaveBeenCalled()
+ materialize.mockResolvedValueOnce({ ok: false, error: 'DSH_MATERIALIZE_FAILED', detail: 'disk full' } as never)
+ expect(await create(request({ dsh: 'blender' }))).toMatchObject({ error: 'DSH_MATERIALIZE_FAILED', detail: 'could not prepare the workspace for blender · disk full' })
+ vi.mocked(installedDsh).mockReset().mockReturnValue(undefined)
+ })
+
it('as a DSH: its workspace prepared, trusted when it went into an empty folder, and its launch layered on', async () => {
vi.mocked(installedDsh).mockReturnValue(installed() as never)
vi.mocked(materializeWorkspace).mockResolvedValue({ warnings: ['kept AGENTS.md'], created: ['template/scene.blend'], kept: [] } as never)
diff --git a/cli/src/core/agents/create.ts b/cli/src/core/agents/create.ts
index 8c4b7be8f..b84a1a9c3 100644
--- a/cli/src/core/agents/create.ts
+++ b/cli/src/core/agents/create.ts
@@ -15,8 +15,8 @@ import { MODEL_MANAGER_ID } from '../../dsh/builtinIds.js'
import { installedDsh } from '../../dsh/installed.js'
import { harnessEnvToClear, type DshAccount } from '../../dsh/launch.js'
import { dshPinnedPermissionMode } from '../../dsh/manifest.js'
-import { materializeWorkspace } from '../../dsh/materialize.js'
-import { harnessLaunchOrRefusal, incompatibleHarnessEngine, prepareHarnessLaunch } from '../../dsh/runtime.js'
+import { incompatibleHarnessEngine } from '../../dsh/compatibility.js'
+import type { DshThrough } from './dshThrough.js'
import { loadEngine } from '../../engines/inProcess.js'
import { isTerminalEngine, type AgentEngine } from '../../engines/types.js'
import { engineLabel } from '../../lib/agentNames.js'
@@ -83,12 +83,13 @@ export interface CreateAgentDeps {
* while it is off. */
gridSetup: () => ModelsPort['ensure'] | null
privateGridName: () => Promise<string | null>
+ dshLaunch: Pick<DshThrough, 'materialize' | 'launch'>
}
export function createAgentCreator({
tmuxBackend, registry, adoptableSession, heldBy, takeOverWhenIdle, watchNewPane, announceSession, attachDsh,
prepareApiTools, hookPort, hooksDisabled, installOpencodePlugin, gridLaunchMachine, buildGridLaunch, terminalHintMachineName, blocksFolder,
- gridSetup, privateGridName,
+ gridSetup, privateGridName, dshLaunch,
}: CreateAgentDeps) {
const createAgent: CreateAgent = async ({ engine, cwd, bypassPermission, permissionMode, grid, codexHome, dsh, prompt, name, agent, resumeSessionId, takeOver, scmLaunchRecord }) => {
if (!tmuxBackend) return { ok: false, error: 'TMUX_UNAVAILABLE' }
@@ -198,7 +199,11 @@ export function createAgentCreator({
// Not there yet is empty; unreadable is not — trust is only ever granted on evidence.
const emptyBefore = await readdir(cwd).then((names) => names.length === 0,
(error: NodeJS.ErrnoException) => error.code === 'ENOENT')
- const materialized = await materializeWorkspace(harness, cwd, dshAccount, engine)
+ const materialized = await dshLaunch.materialize({ dsh, workspace: cwd, account: dshAccount, engine, key: label })
+ if (!materialized.ok) {
+ if (materialized.unavailable) return { ok: false, error: materialized.error, detail: materialized.detail }
+ throw new Error(materialized.detail)
+ }
for (const warning of materialized.warnings) console.warn(`[dsh] ${dsh} materialize · ${warning}`)
console.log(`[dsh] ${dsh} materialized ${cwd} · created ${materialized.created.length} · kept ${materialized.kept.length}`)
// The template just went into an EMPTY folder: everything in it is the harness's, and Claude Code
@@ -215,8 +220,8 @@ export function createAgentCreator({
console.warn(`[agent] create ${dsh} refused · ${detail}`)
return { ok: false, error: 'DSH_MATERIALIZE_FAILED', detail }
}
- const prepared = harnessLaunchOrRefusal(() => prepareHarnessLaunch(harness, cwd, engine, label, dshAccount, null))
- if (!prepared.ok) return prepared
+ const prepared = await dshLaunch.launch({ dsh, workspace: cwd, engine, key: label, account: dshAccount })
+ if (!prepared.ok) return { ok: false, error: prepared.error, detail: prepared.detail }
dshEnv = prepared.launch.env
dshArgs = prepared.launch.args
dshLabel = harness.manifest.name
diff --git a/cli/src/core/agents/discovery.spec.ts b/cli/src/core/agents/discovery.spec.ts
index 77c86f6bf..66a85820b 100644
--- a/cli/src/core/agents/discovery.spec.ts
+++ b/cli/src/core/agents/discovery.spec.ts
@@ -271,6 +271,17 @@ describe('discovery', () => {
expect(run.deps.registry.setActive).toHaveBeenCalledWith('a2', false)
})
+ it('never archives a held conversation when its waiting shell or engine is absent', async () => {
+ const run = setup()
+ const held = row({ launch: { state: 'held', service: 'store', detail: 'Waiting for preparation.' } })
+ await run.handlers.onDormant(held, 'two engine misses')
+ run.handlers.onRemoved(held, 'two missing-pane scans')
+ expect(run.deps.retainExitedSession).not.toHaveBeenCalled()
+ expect(run.deps.forgetSession).not.toHaveBeenCalled()
+ expect(run.deps.registry.setActive).toHaveBeenCalledWith('a1', false)
+ expect(run.deps.announceSession).toHaveBeenCalledWith(held)
+ })
+
it('records whether a row\'s terminal is available, announcing it when it becomes so', () => {
const run = setup()
run.handlers.onTerminalAvailability(row(), true)
diff --git a/cli/src/core/agents/discovery.ts b/cli/src/core/agents/discovery.ts
index 3e957f663..bd50f4a2d 100644
--- a/cli/src/core/agents/discovery.ts
+++ b/cli/src/core/agents/discovery.ts
@@ -175,7 +175,7 @@ export function createDiscoveryHandlers({
if (refreshed) announceSession(refreshed)
}
const onDormant = async (agent: RegisteredSession, reason: string): Promise<void> => {
- if (!agent.active) return
+ if (!agent.active || agent.launch?.state === 'held') return
invalidateTerminalControl(agent.agentId)
teams.forget(agent.agentId)
input.forget(agent.agentId)
@@ -204,6 +204,12 @@ export function createDiscoveryHandlers({
announceSession(agent)
}
const onRemoved = (agent: RegisteredSession, reason: string): void => {
+ // A missing waiting shell does not end the conversation held for preparation/recovery.
+ if (agent.launch?.state === 'held') {
+ registry.setActive(agent.agentId, false)
+ announceSession(agent)
+ return
+ }
// A pane absent because RESTORE never ran is not a pane the person closed. Retiring it here
// would archive a row whose tmux pane was simply never rebuilt, and the person would have to
// Open each one by hand; keeping it dormant leaves the next daemon — the fixed one — something
diff --git a/cli/src/core/agents/dshThrough.spec.ts b/cli/src/core/agents/dshThrough.spec.ts
new file mode 100644
index 000000000..bf898fd5f
--- /dev/null
+++ b/cli/src/core/agents/dshThrough.spec.ts
@@ -0,0 +1,46 @@
+import { afterEach, describe, expect, it, vi } from 'vitest'
+import { dshUnavailable, type DshLaunchRequest } from '../../dsh/launchWire.js'
+import { STORE_OFF, type StorePort } from '../api.js'
+import { dshThrough } from './dshThrough.js'
+
+const request: DshLaunchRequest = { dsh: 'test/draw', workspace: '/workspace', engine: 'claude', key: 'agent', account: {} }
+const launch = { env: { HARNESS_DSH: request.dsh }, args: ['--context', 'context'] }
+const materialized = { ok: true as const, created: ['template/a'], kept: [], warnings: [] }
+
+describe('package preparation through the Store', () => {
+ afterEach(() => vi.restoreAllMocks())
+ const setup = (store: StorePort = STORE_OFF, name: string | undefined = 'Draw') => dshThrough({
+ store: () => store, nameOf: () => name, account: () => ({ privateGrid: 'private' }),
+ })
+ it('passes create and fork context through and never fabricates a launch', async () => {
+ const store = { dshMaterialize: vi.fn(async () => materialized), dshLaunch: vi.fn(async () => ({ ok: true as const, launch })) }
+ const through = setup(store)
+ expect(await through.materialize(request)).toEqual(materialized)
+ const fork = { ...request, forkOf: { agentId: 'source', dshRuntime: null } }
+ expect(await through.launch(fork)).toEqual({ ok: true, launch })
+ expect(store.dshMaterialize).toHaveBeenCalledWith(request)
+ expect(store.dshLaunch).toHaveBeenCalledWith(fork)
+ expect(await through.relaunch(request.dsh, request.workspace, request.engine, request.key)).toEqual({ ok: true, launch })
+ expect(store.dshLaunch).toHaveBeenLastCalledWith({ ...request, account: { privateGrid: 'private' } })
+ })
+ it('holds missing or malformed service replies, including an unprepared installed index', async () => {
+ for (const store of [STORE_OFF, { dshMaterialize: async () => null, dshLaunch: async () => ({}) } as unknown as StorePort]) {
+ expect(await setup(store).materialize(request)).toEqual(dshUnavailable('Draw'))
+ expect(await setup(store, undefined).launch(request)).toEqual(dshUnavailable('Draw'))
+ const unnamed = dshThrough({ store: () => store, nameOf: () => undefined, account: () => ({}) })
+ expect(await unnamed.relaunch(request.dsh, request.workspace, request.engine, request.key)).toEqual(dshUnavailable(request.dsh))
+ }
+ })
+ it('preserves real refusals and the former relaunch error text', async () => {
+ const warn = vi.spyOn(console, 'warn').mockImplementation(() => {})
+ const missing = { ok: false as const, error: 'DSH_NOT_INSTALLED', detail: 'missing' }
+ const failed = { ok: false as const, error: 'DSH_RUNTIME_FAILED', detail: 'disk full', thrown: 'Error: disk full' }
+ const store = { dshMaterialize: vi.fn(async () => missing), dshLaunch: vi.fn().mockResolvedValueOnce(missing).mockResolvedValue(failed) }
+ const through = setup(store)
+ expect(await through.materialize(request)).toEqual(missing)
+ expect(await through.relaunch(request.dsh, request.workspace, request.engine, request.key)).toEqual(missing)
+ expect(warn).toHaveBeenCalledWith('[dsh] test/draw is not installed on this machine · cannot restore its harness context')
+ expect(await through.relaunch(request.dsh, request.workspace, request.engine, request.key)).toEqual({ ...failed, detail: failed.thrown })
+ expect(await through.launch(request)).toEqual(failed)
+ })
+})
diff --git a/cli/src/core/agents/dshThrough.ts b/cli/src/core/agents/dshThrough.ts
new file mode 100644
index 000000000..54c89be48
--- /dev/null
+++ b/cli/src/core/agents/dshThrough.ts
@@ -0,0 +1,32 @@
+/** The launch port's Store contribution, including the reason a restore must remain held. */
+import type { DshAccount } from '../../dsh/launch.js'
+import { dshUnavailable, type DshLaunchRequest, type DshMaterializeRequest } from '../../dsh/launchWire.js'
+import type { AgentEngine } from '../../engines/types.js'
+import type { StorePort } from '../api.js'
+import { dshLaunchAnswerIn, dshMaterializeAnswerIn } from '../storeLink.js'
+
+export function dshThrough({ store, nameOf, account }: {
+ store: () => StorePort
+ nameOf: (id: string) => string | undefined
+ account: () => DshAccount
+}) {
+ const unavailable = (id: string) => dshUnavailable(nameOf(id) ?? id)
+ const materialize = async (request: DshMaterializeRequest) => {
+ try { return dshMaterializeAnswerIn(await store().dshMaterialize(request)) ?? unavailable(request.dsh) }
+ catch { return unavailable(request.dsh) }
+ }
+ const launch = async (request: DshLaunchRequest) => {
+ try { return dshLaunchAnswerIn(await store().dshLaunch(request)) ?? unavailable(request.dsh) }
+ catch { return unavailable(request.dsh) }
+ }
+ const relaunch = async (dsh: string, workspace: string, engine: AgentEngine, key: string) => {
+ // Ask the Store before declaring a saved package missing: it may still be preparing its index.
+ const answer = await launch({ dsh, workspace, engine, key, account: account() })
+ if (answer.ok) return answer
+ if (answer.error === 'DSH_NOT_INSTALLED') console.warn(`[dsh] ${dsh} is not installed on this machine · cannot restore its harness context`)
+ return { ...answer, detail: answer.thrown ?? answer.detail }
+ }
+ return { materialize, launch, relaunch }
+}
+
+export type DshThrough = ReturnType<typeof dshThrough>
diff --git a/cli/src/core/agents/forget.spec.ts b/cli/src/core/agents/forget.spec.ts
index b49908ae1..03bdf7c7a 100644
--- a/cli/src/core/agents/forget.spec.ts
+++ b/cli/src/core/agents/forget.spec.ts
@@ -71,6 +71,16 @@ describe('forgetting a session', () => {
expect(marks.size).toBe(0)
})
+ it('forgets lifecycle epochs only when the agent is removed', () => {
+ const { deps } = setup()
+ const onRemoved = vi.fn()
+ const forget = createForgetSession({ ...deps, onRemoved })
+ forget('a1', { keepAgent: true })
+ expect(onRemoved).not.toHaveBeenCalled()
+ forget('a1')
+ expect(onRemoved).toHaveBeenCalledWith('a1')
+ })
+
it('releases a session and keeps its agent: everything per-session goes, the agent and its tiles stay', () => {
const log = vi.spyOn(console, 'log').mockImplementation(() => {})
const { deps, forgetSession } = setup()
diff --git a/cli/src/core/agents/forget.ts b/cli/src/core/agents/forget.ts
index d3ea4d650..e8ca38713 100644
--- a/cli/src/core/agents/forget.ts
+++ b/cli/src/core/agents/forget.ts
@@ -23,6 +23,7 @@ import type { RelaunchMarks } from '../transcripts/relaunch.js'
type Frame = { type: string; payload: Record<string, unknown> }
export interface ForgetDeps {
+ onRemoved?: (agentId: string) => void
registry: Pick<typeof registry, 'resolve' | 'unbindSession' | 'removeAgent' | 'remove'>
stoppedAgents: Pick<StoppedAgentStore, 'save'>
syncRecapPool: () => void
@@ -51,7 +52,7 @@ export interface ForgetDeps {
export function createForgetSession({
registry, stoppedAgents, syncRecapPool, normalizers, turnStartedAt, neverFoldedHistory, replayedFirstTurn, relaunchMarks,
clearAgyIdleWatch, cursorDiscovery, cursorSubagents, runtimeProfiles, watcher, stopHeartbeat, teams, input,
- deviceInput, detachDsh, mirror, clients, dataDir,
+ deviceInput, detachDsh, mirror, clients, dataDir, onRemoved,
}: ForgetDeps) {
/** Release a mutable session binding, or remove the process-owned agent everywhere. */
const forgetSession = (
@@ -94,7 +95,7 @@ export function createForgetSession({
teams.forget(doomed?.agentId ?? sessionId)
input.forget(doomed?.agentId ?? sessionId)
deviceInput.forget(doomed?.agentId ?? sessionId)
- if (!opts.keepAgent) detachDsh(announceId)
+ if (!opts.keepAgent) { detachDsh(announceId); onRemoved?.(announceId) }
mirror.forget(sessionId) // aborts any in-flight recap + clears busy; KEEPS the persisted summary
if (opts.keepAgent) return
clients.send({ type: 'agent_deleted', payload: { agentId: announceId, retained: !!doomed } }) // web tab
diff --git a/cli/src/core/agents/fork.spec.ts b/cli/src/core/agents/fork.spec.ts
index dd27d3baa..ecf37f989 100644
--- a/cli/src/core/agents/fork.spec.ts
+++ b/cli/src/core/agents/fork.spec.ts
@@ -3,7 +3,6 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { installedDsh } from '../../dsh/installed.js'
-import { harnessLaunchOrRefusal } from '../../dsh/runtime.js'
import { createAndRegisterPane } from '../../lib/createAgentPane.js'
import { enginePathOverride } from '../../lib/engineBin.js'
import { buildEngineLaunchArgv, refusePermissionFlagIfUnsupported, supportsNamedAgent } from '../../lib/engineLaunch.js'
@@ -13,12 +12,7 @@ import type { RegisteredSession } from '../../lib/registry.js'
import { createAgentForker, type ForkAgentDeps } from './fork.js'
vi.mock('../../dsh/installed.js', () => ({ installedDsh: vi.fn(() => undefined) }))
-vi.mock('../../dsh/runtime.js', async (real) => ({
- ...await real<object>(),
- forkRuntimeKey: vi.fn(() => 'source-key'),
- harnessLaunchOrRefusal: vi.fn((prepare: () => unknown) => { prepare(); return { ok: true, launch: { env: { HARNESS_DSH: 'blender' }, args: ['--dsh'] } } }),
- prepareHarnessLaunch: vi.fn(),
-}))
+
// OpenCode's version probe is its own code, loaded for an OpenCode launch alone; a test may say it could not be.
vi.mock('../../engines/inProcess.js', async (real) => {
const actual = await real<typeof import('../../engines/inProcess.js')>()
@@ -42,6 +36,8 @@ vi.mock('../../scm/scmProjects.js', async (real) => {
})
vi.mock('../../lib/forkAgent.js', async (real) => ({ ...await real<object>(), planFork: vi.fn(() => ({ ok: true, level: 'native', forkSessionId: 's1' })) }))
+const launchDsh = vi.fn<ForkAgentDeps['dshLaunch']['launch']>(async () => ({ ok: true, launch: { env: { HARNESS_DSH: 'blender' }, args: ['--dsh'] } }))
+
const root = mkdtempSync(join(tmpdir(), 'core-fork-'))
afterAll(() => rmSync(root, { recursive: true, force: true }))
const work = join(root, 'work')
@@ -72,6 +68,7 @@ function setup(row: RegisteredSession | null = source(), over: Partial<ForkAgent
ok: true as const, overrides: { env: (session.codexHome ? { CODEX_HOME: session.codexHome } : {}) as Record<string, string>, extraArgs: [] as string[], clearEnv: [] as string[] },
})),
gridName: () => 'grid-me',
+ dshLaunch: { launch: launchDsh },
...over,
}
return { deps, fork: createAgentForker(deps) }
@@ -104,7 +101,7 @@ describe('forking an agent', () => {
expect(await setup().fork({ agentId: 'a1', name: null, prompt: null })).toEqual({ ok: false, error: 'FORK_UNSUPPORTED', detail: 'amp cannot fork' })
expect(await setup(source({ dsh: 'blender' } as Partial<RegisteredSession>)).fork({ agentId: 'a1', name: null, prompt: null })).toMatchObject({ error: 'INVALID_DSH' })
vi.mocked(installedDsh).mockReturnValue({ manifest: { name: 'Blender' } } as never)
- vi.mocked(harnessLaunchOrRefusal).mockReturnValueOnce({ ok: false, error: 'DSH_RUNTIME', detail: 'no runtime' } as never)
+ launchDsh.mockResolvedValueOnce({ ok: false, error: 'DSH_RUNTIME', detail: 'no runtime' } as never)
expect(await setup(source({ dsh: 'blender' } as Partial<RegisteredSession>)).fork({ agentId: 'a1', name: null, prompt: null })).toEqual({ ok: false, error: 'DSH_RUNTIME', detail: 'no runtime' })
vi.mocked(installedDsh).mockReset().mockReturnValue(undefined)
vi.mocked(refusePermissionFlagIfUnsupported).mockResolvedValueOnce({ error: 'PERMISSION_MODE_UNSUPPORTED', detail: 'no --auto' } as never)
@@ -187,7 +184,7 @@ describe('forking an agent', () => {
.toEqual({ ok: false, error: 'ENGINE_UNAVAILABLE', detail: 'OpenCode\'s code could not be loaded' })
// No instruction files prepared, no harness runtime folder, no relaunch overrides, no pane.
expect(prepareInstructionWrites).not.toHaveBeenCalled()
- expect(harnessLaunchOrRefusal).not.toHaveBeenCalled()
+ expect(launchDsh).not.toHaveBeenCalled()
expect(refused.deps.relaunchOverrides).not.toHaveBeenCalled()
expect(createAndRegisterPane).not.toHaveBeenCalled()
vi.mocked(installedDsh).mockReset().mockReturnValue(undefined)
diff --git a/cli/src/core/agents/fork.ts b/cli/src/core/agents/fork.ts
index b2eace1e9..dcbe9d009 100644
--- a/cli/src/core/agents/fork.ts
+++ b/cli/src/core/agents/fork.ts
@@ -12,7 +12,7 @@ import { statSync } from 'node:fs'
import type { BackendSocket } from '../../backendSocket.js'
import { installedDsh } from '../../dsh/installed.js'
import { harnessEnvToClear } from '../../dsh/launch.js'
-import { forkRuntimeKey, harnessLaunchOrRefusal, prepareHarnessLaunch } from '../../dsh/runtime.js'
+import type { DshThrough } from './dshThrough.js'
import { loadEngine } from '../../engines/inProcess.js'
import type { TurnRecaps } from '../turns/recaps.js'
import { createAndRegisterPane } from '../../lib/createAgentPane.js'
@@ -44,10 +44,11 @@ export interface ForkAgentDeps {
relaunchOverrides: ReturnType<typeof createLaunchHelpers>['relaunchOverrides']
/** This account's private grid, as the socket knows it (BackendSocket.gridName). */
gridName: () => string | null
+ dshLaunch: Pick<DshThrough, 'launch'>
}
export function createAgentForker({
- tmuxBackend, registry, mirror, pendingForkInherit, watchNewPane, announceSession, attachDsh, prepareApiTools, relaunchOverrides, gridName,
+ tmuxBackend, registry, mirror, pendingForkInherit, watchNewPane, announceSession, attachDsh, prepareApiTools, relaunchOverrides, gridName, dshLaunch,
}: ForkAgentDeps) {
const forkAgent: ForkAgent = async ({ agentId, name, prompt }) => {
if (!tmuxBackend) return { ok: false, error: 'TMUX_UNAVAILABLE' }
@@ -90,10 +91,9 @@ export function createAgentForker({
if (!installed) return { ok: false, error: 'INVALID_DSH', detail: `${source.dsh} is no longer installed on this machine` }
// Narrowed above; a closure would lose that, so the checked values are named here.
const cwd = source.cwd
- const sourceKey = forkRuntimeKey({ cwd, agentId: source.agentId, dshRuntime: source.dshRuntime })
- const prepared = harnessLaunchOrRefusal(() => prepareHarnessLaunch(installed, cwd, engine, label,
- { privateGrid: gridName() }, sourceKey))
- if (!prepared.ok) return prepared
+ const prepared = await dshLaunch.launch({ dsh: source.dsh, workspace: cwd, engine, key: label,
+ account: { privateGrid: gridName() }, forkOf: { agentId: source.agentId, dshRuntime: source.dshRuntime ?? null } })
+ if (!prepared.ok) return { ok: false, error: prepared.error, detail: prepared.detail }
dshEnv = prepared.launch.env
dshArgs = prepared.launch.args
dshLabel = installed.manifest.name
diff --git a/cli/src/core/agents/heldLaunches.spec.ts b/cli/src/core/agents/heldLaunches.spec.ts
index 637df6cae..c8d1c7ecd 100644
--- a/cli/src/core/agents/heldLaunches.spec.ts
+++ b/cli/src/core/agents/heldLaunches.spec.ts
@@ -77,6 +77,35 @@ describe('agents held until a service is ready', () => {
expect(log).toHaveBeenLastCalledWith('[restore] held · models · launched 0 of 2 · 2 still waiting')
})
+ it.each(['prepared', 'restart'] as const)('retries transient core contention after the only %s notice, coalescing retries', async trigger => {
+ vi.useFakeTimers()
+ try {
+ const h = setup([row('a', HELD)])
+ h.restore.mockResolvedValueOnce(summary({ retry: true, held: ['a'] }))
+ .mockResolvedValueOnce(summary({ retry: true, held: ['a'] }))
+ await h.held.boot(async () => {})
+ if (trigger === 'prepared') await h.held.restoreHeld('models')
+ else await h.held.restartHeld('a')
+ await h.held.restoreHeld('models')
+ expect(h.restore).toHaveBeenCalledTimes(2)
+ await vi.advanceTimersByTimeAsync(500)
+ expect(h.restore).toHaveBeenCalledTimes(3)
+ expect(h.registry.get('a')?.launch?.state).toBe('starting')
+ } finally { vi.useRealTimers() }
+ })
+
+ it('logs a failed core-contention retry without an unhandled rejection', async () => {
+ vi.useFakeTimers()
+ try {
+ const h = setup([row('a', HELD)])
+ h.restore.mockResolvedValueOnce(summary({ retry: true })).mockRejectedValueOnce(new Error('test retry failure'))
+ await h.held.boot(async () => {})
+ await h.held.restoreHeld()
+ await vi.advanceTimersByTimeAsync(500)
+ expect(h.log).toHaveBeenLastCalledWith(expect.stringContaining('test retry failure'))
+ } finally { vi.useRealTimers() }
+ })
+
it('runs one pass at a time, and a pass that fails does not stop the next', async () => {
let release!: () => void
const order: string[] = []
diff --git a/cli/src/core/agents/heldLaunches.ts b/cli/src/core/agents/heldLaunches.ts
index f3c82d5ae..0ccb10582 100644
--- a/cli/src/core/agents/heldLaunches.ts
+++ b/cli/src/core/agents/heldLaunches.ts
@@ -45,6 +45,16 @@ export function createHeldLaunches({ registry, restore, log }: HeldLaunchesDeps)
return next
}
+ let retryTimer: ReturnType<typeof setTimeout> | undefined
+ const retryContention = (summary: RestoreSummary): void => {
+ if (!summary.retry || retryTimer) return
+ retryTimer = setTimeout(() => {
+ retryTimer = undefined
+ void restoreHeld().catch(error => log(`[restore] core contention retry failed: ${String(error)}`))
+ }, 500)
+ retryTimer.unref?.()
+ }
+
/** The agents held (for `service`, or for any), launched now. */
const restoreHeld = (service?: string): Promise<RestoreSummary | null> => serial(async () => {
const held = new Set(registry.list().filter((row) => {
@@ -53,6 +63,7 @@ export function createHeldLaunches({ registry, restore, log }: HeldLaunchesDeps)
}).map((row) => row.agentId))
if (!held.size) return null
const summary = await restore(held)
+ retryContention(summary)
log(`[restore] held · ${service ?? 'every service'} · launched ${summary.restored.length} of ${held.size}`
+ (summary.held.length ? ` · ${summary.held.length} still waiting` : ''))
return summary
@@ -68,6 +79,7 @@ export function createHeldLaunches({ registry, restore, log }: HeldLaunchesDeps)
if (!before) return { ok: false, error: 'AGENT_NOT_FOUND' }
if (!heldFor(before)) return { ok: true, session: before, resumed: !!before.sessionId }
const summary = await restore(new Set([agentId]))
+ retryContention(summary)
const now = registry.byAgent(agentId)
if (!now) return { ok: false, error: 'AGENT_NOT_FOUND' }
if (summary.restored.includes(agentId)) {
diff --git a/cli/src/core/agents/lifecycle.ts b/cli/src/core/agents/lifecycle.ts
index 55624b54d..1a7349542 100644
--- a/cli/src/core/agents/lifecycle.ts
+++ b/cli/src/core/agents/lifecycle.ts
@@ -15,6 +15,7 @@ import { AgentStopError, createStopAgentService, type StopAgentServiceDeps } fro
import type { ResumeAgent } from './launches.js'
export interface LifecycleDeps {
+ settlePane?: StopAgentServiceDeps['settlePane']
registry: typeof registry
stoppedAgents: StoppedAgentStore
restartJobs: StopAgentServiceDeps['restartJobs']
@@ -42,7 +43,7 @@ export interface LifecycleDeps {
}
export function createAgentLifecycle({
- registry, stoppedAgents, restartJobs, tmuxBackend, agentReconciler, forgetSession, markDeleted, clearDeleted, stopNative,
+ registry, stoppedAgents, restartJobs, tmuxBackend, agentReconciler, forgetSession, markDeleted, clearDeleted, stopNative, settlePane,
sessionCheckpoints, mirror, sessionSearch, send, pinnedControls, retainExitedSession, announceSession,
relaunchOverrides, prepareSessionResume, refreshGridWebSearch, attachDsh, attachSession, relaunchMarks,
}: LifecycleDeps) {
@@ -54,7 +55,7 @@ export function createAgentLifecycle({
const stopJobs = new Map<string, Promise<void>>()
const stopAgent = createStopAgentService({
registry, stoppedAgents, restartJobs, stopJobs, tmuxBackend, agentReconciler,
- forgetSession, markDeleted, clearDeleted, stopNative,
+ forgetSession, markDeleted, clearDeleted, stopNative, settlePane,
})
const purgeAgentService = new PurgeAgentService({
live: id => registry.byAgent(id), sessions: () => [...registry.list(), ...stoppedAgents.list()],
diff --git a/cli/src/core/agents/paneOperations.spec.ts b/cli/src/core/agents/paneOperations.spec.ts
new file mode 100644
index 000000000..69f550290
--- /dev/null
+++ b/cli/src/core/agents/paneOperations.spec.ts
@@ -0,0 +1,49 @@
+import { describe, expect, it, vi } from 'vitest'
+import { createPaneOperations } from './paneOperations.js'
+
+describe('core pane operations', () => {
+ it('makes Stop join the dispatched pane commit, while other agents remain independent', async () => {
+ const operations = createPaneOperations()
+ expect(operations.pending('absent')).toBeUndefined()
+ await operations.settle('absent')
+ let reply!: () => void
+ const committed: string[] = []
+ const running = operations.run('a', async () => {
+ await new Promise<void>(done => { reply = done })
+ committed.push('new pane')
+ return 'done'
+ })
+ const stopped = vi.fn()
+ const stopping = operations.settle('a').then(() => { expect(committed).toEqual(['new pane']); stopped() })
+ expect(operations.busy('a')).toBe(true)
+ expect(operations.pending('a')).toBeInstanceOf(Promise)
+ await expect(operations.run('a', async () => 'overlap')).rejects.toThrow('already changing')
+ expect(await operations.run('b', async () => 'independent')).toBe('independent')
+ expect(stopped).not.toHaveBeenCalled()
+ reply()
+ expect(await running).toBe('done')
+ await stopping
+ expect(stopped).toHaveBeenCalledOnce()
+ expect(operations.busy('a')).toBe(false)
+ })
+ it('reserves a whole allocation group synchronously and rejects overlaps without partially reserving', async () => {
+ const operations = createPaneOperations()
+ let finish!: () => void
+ const running = operations.runMany(['a', 'b'], () => new Promise<void>(done => { finish = done }))
+ expect(operations.busy('a')).toBe(true)
+ expect(operations.pending('a')).toBe(operations.pending('b'))
+ await expect(operations.runMany(['c', 'b'], async () => {})).rejects.toThrow('already changing')
+ expect(operations.busy('c')).toBe(false)
+ finish()
+ await running
+ expect(operations.busy('b')).toBe(false)
+ })
+ it('reports an uncertain dispatch to the joining Stop and releases the operation', async () => {
+ const operations = createPaneOperations()
+ const running = operations.run('a', async () => { throw new Error('unconfirmed') })
+ const joining = operations.settle('a')
+ await expect(running).rejects.toThrow('unconfirmed')
+ await expect(joining).rejects.toThrow('unconfirmed')
+ expect(operations.busy('a')).toBe(false)
+ })
+})
diff --git a/cli/src/core/agents/paneOperations.ts b/cli/src/core/agents/paneOperations.ts
new file mode 100644
index 000000000..b1d5fec5c
--- /dev/null
+++ b/cli/src/core/agents/paneOperations.ts
@@ -0,0 +1,19 @@
+/** The short pane dispatch and registry commit belong to core, never to a service preparation. */
+export function createPaneOperations() {
+ const pending = new Map<string, Promise<unknown>>()
+ const runMany = async <T>(agentIds: readonly string[], operation: () => Promise<T>): Promise<T> => {
+ if (agentIds.some(id => pending.has(id))) throw new Error('A pane operation is already changing this harness')
+ const work = Promise.resolve().then(operation)
+ for (const id of agentIds) pending.set(id, work)
+ try { return await work } finally { for (const id of agentIds) pending.delete(id) }
+ }
+ return {
+ busy: (agentId: string): boolean => pending.has(agentId),
+ pending: (agentId: string): Promise<unknown> | undefined => pending.get(agentId),
+ runMany,
+ run: <T>(agentId: string, operation: () => Promise<T>): Promise<T> => runMany([agentId], operation),
+ // Stop sets its cancellation flag first, then joins only a dispatched pane's commit before
+ // capturing the pane it must close. It never joins Store/models preparation or an engine watch.
+ settle: async (agentId: string): Promise<void> => { await pending.get(agentId) },
+ }
+}
diff --git a/cli/src/core/agents/restoreLaunch.spec.ts b/cli/src/core/agents/restoreLaunch.spec.ts
new file mode 100644
index 000000000..15f0a5cba
--- /dev/null
+++ b/cli/src/core/agents/restoreLaunch.spec.ts
@@ -0,0 +1,72 @@
+import { describe, expect, it, vi } from 'vitest'
+import type { RegisteredSession } from '../../lib/registry.js'
+import type { LaunchOverridesResult } from '../../lib/launchOverrides.js'
+import { createRestoreLaunch } from './restoreLaunch.js'
+
+const entry = { agentId: 'agent', sessionId: 'conversation', cwd: '/workspace' } as RegisteredSession
+const built: Extract<LaunchOverridesResult, { ok: true }> = { ok: true, overrides: { env: {}, extraArgs: [], clearEnv: [] } }
+const setup = () => {
+ const deps = {
+ workspaceMissing: vi.fn((): { error: string; detail: string } | null => null),
+ relaunchOverrides: vi.fn(async (): Promise<LaunchOverridesResult> => built),
+ downgradedPermission: vi.fn(async () => ({ bypassPermission: false })),
+ prepareSessionResume: vi.fn(), refreshGridWebSearch: vi.fn(),
+ launch: vi.fn(() => ({ argv: ['engine'] })),
+ }
+ return { deps, build: createRestoreLaunch(deps) }
+}
+
+describe('restore preparation keeps session authority in core', () => {
+ it.each([undefined, 'conversation'])('applies confirmed preparation only to the current owner: resume %s', async resumeSessionId => {
+ const { deps, build } = setup()
+ expect(await build(entry, { resumeSessionId, current: () => true })).toEqual({ argv: ['engine'] })
+ expect(deps.prepareSessionResume).toHaveBeenCalledTimes(resumeSessionId ? 1 : 0)
+ expect(deps.refreshGridWebSearch).toHaveBeenCalledWith('agent', built.overrides)
+ expect(deps.launch).toHaveBeenCalledWith(entry, { resumeSessionId }, built.overrides, { bypassPermission: false })
+ })
+
+ it.each(['Store', 'permission'] as const)('a replacement arriving during %s leaves its transcript, tail and grid untouched', async stage => {
+ const { deps, build } = setup()
+ let answer!: () => void
+ const pending = new Promise<void>(resolve => { answer = resolve })
+ if (stage === 'Store') deps.relaunchOverrides.mockImplementation(async () => { await pending; return built })
+ else deps.downgradedPermission.mockImplementation(async () => { await pending; return { bypassPermission: false } })
+ let current = true
+ const replacement = { transcript: 'new turn', tail: 42, grid: 'new grid' }
+ deps.prepareSessionResume.mockImplementation(() => { replacement.transcript = 'repaired old turn'; replacement.tail = 0 })
+ deps.refreshGridWebSearch.mockImplementation(() => { replacement.grid = 'old grid' })
+ const result = build(entry, { resumeSessionId: 'conversation', current: () => current })
+ await vi.waitFor(() => expect(stage === 'Store' ? deps.relaunchOverrides : deps.downgradedPermission).toHaveBeenCalled())
+ current = false
+ answer()
+ expect(await result).toEqual({ cancelled: true })
+ expect(replacement).toEqual({ transcript: 'new turn', tail: 42, grid: 'new grid' })
+ expect(deps.launch).not.toHaveBeenCalled()
+ })
+
+ it('refuses a missing workspace before asking any service', async () => {
+ const { deps, build } = setup()
+ deps.workspaceMissing.mockReturnValue({ error: 'WORKSPACE_MISSING', detail: 'folder gone' })
+ expect(await build(entry, { current: () => true })).toEqual({ error: 'WORKSPACE_MISSING', detail: 'folder gone' })
+ expect(deps.relaunchOverrides).not.toHaveBeenCalled()
+ })
+
+ it.each([false, true])('preserves refusal or the specific held reason: held %s', async held => {
+ const { deps, build } = setup()
+ deps.relaunchOverrides.mockResolvedValue({ ok: false, error: 'PREPARATION', detail: 'review required',
+ ...(held ? { unavailable: 'store', holdScope: 'workspace' as const } : {}) })
+ expect(await build(entry, { current: () => true })).toEqual(held
+ ? { held: 'store', detail: 'review required', holdScope: 'workspace' }
+ : { error: 'PREPARATION', detail: 'review required' })
+ expect(deps.prepareSessionResume).not.toHaveBeenCalled()
+ expect(deps.downgradedPermission).not.toHaveBeenCalled()
+ })
+
+ it.each([new Error('unreadable'), 'unreadable'])('reports resume repair errors without applying grid changes', async error => {
+ const { deps, build } = setup()
+ deps.prepareSessionResume.mockImplementation(() => { throw error })
+ expect(await build(entry, { resumeSessionId: 'conversation', current: () => true }))
+ .toEqual({ error: 'RESUME_PREPARATION_FAILED', detail: 'unreadable' })
+ expect(deps.refreshGridWebSearch).not.toHaveBeenCalled()
+ })
+})
diff --git a/cli/src/core/agents/restoreLaunch.ts b/cli/src/core/agents/restoreLaunch.ts
new file mode 100644
index 000000000..e51a6b67e
--- /dev/null
+++ b/cli/src/core/agents/restoreLaunch.ts
@@ -0,0 +1,37 @@
+/** Restore may wait for preparation; session ownership must survive that wait before core writes. */
+import type { RegisteredSession } from '../../lib/registry.js'
+import type { LaunchOverrides, LaunchOverridesResult } from '../../lib/launchOverrides.js'
+import type { RestoreAgentsDeps, RestoreLaunch } from '../../lib/restoreAgents.js'
+
+interface RestoreLaunchDeps {
+ workspaceMissing(cwd: string | null | undefined): { error: string; detail: string } | null
+ relaunchOverrides(entry: RegisteredSession): Promise<LaunchOverridesResult>
+ downgradedPermission(entry: RegisteredSession): Promise<{ permissionMode?: string | null; bypassPermission?: boolean }>
+ prepareSessionResume(entry: RegisteredSession): void
+ refreshGridWebSearch(agentId: string, overrides: LaunchOverrides): void
+ launch(entry: RegisteredSession, opts: { resumeSessionId?: string }, overrides: LaunchOverrides,
+ permission: { permissionMode?: string | null; bypassPermission?: boolean }): RestoreLaunch
+}
+
+export function createRestoreLaunch(deps: RestoreLaunchDeps): RestoreAgentsDeps['buildLaunch'] {
+ return async (entry, { current, ...opts }) => {
+ const missing = deps.workspaceMissing(entry.cwd)
+ if (missing) return missing
+ const built = await deps.relaunchOverrides(entry)
+ if (!current()) return { cancelled: true }
+ if (!built.ok) return built.unavailable
+ ? { held: built.unavailable, detail: built.detail, holdScope: built.holdScope }
+ : { error: built.error, detail: built.detail }
+ const permission = await deps.downgradedPermission(entry)
+ if (!current()) return { cancelled: true }
+ // These writes are synchronous and belong to the core. Neither a stopped conversation's
+ // transcript/tail nor a replacement binding's grid may be changed by an old Store answer.
+ if (opts.resumeSessionId) {
+ try { deps.prepareSessionResume(entry) } catch (error) {
+ return { error: 'RESUME_PREPARATION_FAILED', detail: error instanceof Error ? error.message : String(error) }
+ }
+ }
+ deps.refreshGridWebSearch(entry.agentId, built.overrides)
+ return deps.launch(entry, opts, built.overrides, permission)
+ }
+}
diff --git a/cli/src/core/agents/retarget.spec.ts b/cli/src/core/agents/retarget.spec.ts
index fcaab558c..df7ccf13d 100644
--- a/cli/src/core/agents/retarget.spec.ts
+++ b/cli/src/core/agents/retarget.spec.ts
@@ -68,7 +68,7 @@ function setup(row: RegisteredSession | null = agent(), over: Partial<RetargetDe
relaunchOverrides: vi.fn(async () => ({ ok: true, overrides: { gridLaunchRecord: { override: grid, webSearch: 'off' } } })) as never,
downgradedPermission: vi.fn(async (_s, bypass: boolean) => ({ bypassPermission: bypass, permissionMode: null })) as never,
agentReconciler: { holdRoute: vi.fn(), releaseRoute: vi.fn() },
- restartJobs: { busy: vi.fn(() => false) } as never,
+ restartJobs: { busy: vi.fn(() => false), cancel: vi.fn() } as never,
paneSwapDeps: vi.fn(() => ({})) as never,
liveBypassPermission: vi.fn(async () => true),
announceSession: vi.fn(),
@@ -86,6 +86,20 @@ describe('retargeting an agent', () => {
afterEach(() => { vi.restoreAllMocks(); vi.clearAllMocks() })
describe('refusals before anything is touched', () => {
+ it('invalidates an older restore as soon as retarget takes control', async () => {
+ const { deps, retarget, release } = setup()
+ await retarget({ agentId: 'a1', grid })
+ expect(deps.restartJobs.cancel).toHaveBeenCalledExactlyOnceWith('a1')
+ expect(vi.mocked(deps.restartJobs.cancel).mock.invocationCallOrder[0]).toBeLessThan(vi.mocked(deps.relaunchOverrides).mock.invocationCallOrder[0])
+ expect(release).toHaveBeenCalledOnce()
+ })
+ it('rechecks a pane operation that began while the screen was being read', async () => {
+ const purgeBusy = vi.fn().mockReturnValueOnce(false).mockReturnValue(true)
+ const { retarget, deps } = setup(agent(), { purgeBusy })
+ expect(await retarget({ agentId: 'a1', grid })).toEqual({ ok: false, error: 'AGENT_BUSY' })
+ expect(deps.acquireTerminalControl).not.toHaveBeenCalled()
+ expect(deps.relaunchOverrides).not.toHaveBeenCalled()
+ })
it('for an agent being purged, no tmux, no agent, no tmux pane or no process to validate', async () => {
expect(await setup(agent(), { purgeBusy: () => true }).retarget({ agentId: 'a1', grid })).toEqual({ ok: false, error: 'AGENT_BUSY' })
expect(await setup(agent(), { tmuxBackend: null }).retarget({ agentId: 'a1', grid })).toEqual({ ok: false, error: 'TMUX_UNAVAILABLE' })
diff --git a/cli/src/core/agents/retarget.ts b/cli/src/core/agents/retarget.ts
index ff67daf7c..1d8f40eb2 100644
--- a/cli/src/core/agents/retarget.ts
+++ b/cli/src/core/agents/retarget.ts
@@ -150,9 +150,11 @@ export function createAgentRetargeter({
if (!capture) return { ok: false, error: 'TMUX_FAILED' }
if (!(await readScreen(session, capture))?.pane.idle) return { ok: false, error: 'AGENT_BUSY' }
// Nothing may type into the pane while it is being replaced.
- if (restartJobs.busy(session.agentId)) return { ok: false, error: 'AGENT_BUSY' }
+ if (purgeBusy(session.agentId) || restartJobs.busy(session.agentId)) return { ok: false, error: 'AGENT_BUSY' }
const release = acquireTerminalControl(session.agentId)
if (!release) return { ok: false, error: 'AGENT_BUSY' }
+ // The old restore watcher stays cancelled after this control pin is released.
+ restartJobs.cancel(session.agentId)
// The grid's env and argv, config directory written (keyed on the agent, so moving it between
// grids rewrites one directory) — or nothing at all for a move back to the engine's own login
// (clearing uses set-environment, which every supported tmux has). Built from the override the
diff --git a/cli/src/core/agents/swap.spec.ts b/cli/src/core/agents/swap.spec.ts
index 456fbe0fc..ff6c0817d 100644
--- a/cli/src/core/agents/swap.spec.ts
+++ b/cli/src/core/agents/swap.spec.ts
@@ -5,6 +5,7 @@ import { buildEngineLaunchArgv } from '../../lib/engineLaunch.js'
import type { RegisteredSession } from '../../lib/registry.js'
import { processRows } from '../../lib/terminalAgentDiscovery.js'
import { bypassPermissionActive, resolvePaneEngineProcess } from '../../lib/tmux.js'
+import { AgentRestartCoordinator } from '../../lib/restartAgent.js'
import { createPaneSwap, SWAP_SETTLE_MS, type PaneSwapDeps } from './swap.js'
vi.mock('../../lib/deleteAgentFallback.js', async (real) => ({ ...await real<object>(), terminateDeletedAgent: vi.fn(async () => ({ ok: true })) }))
@@ -42,6 +43,14 @@ describe('the pane-process swap', () => {
})
afterEach(() => { vi.restoreAllMocks(); vi.useRealTimers() })
+ it('uses the coordinator that already owns boot restore revisions', () => {
+ const restartJobs = new AgentRestartCoordinator()
+ const boot = restartJobs.revision('a1')
+ const swap = createPaneSwap({ ...setup().deps, restartJobs })
+ expect(swap.restartJobs).toBe(restartJobs)
+ expect(swap.restartJobs.revision('a1')).toBe(boot)
+ })
+
it('restarts only the agent it was asked about: same registration, same pane, same engine', () => {
expect(setup().swap.sameRestartTarget(session())).toBe(true)
expect(setup(null).swap.sameRestartTarget(session())).toBe(false)
diff --git a/cli/src/core/agents/swap.ts b/cli/src/core/agents/swap.ts
index 52cc2338b..b2980c99b 100644
--- a/cli/src/core/agents/swap.ts
+++ b/cli/src/core/agents/swap.ts
@@ -17,6 +17,7 @@ import { sameProcessIdentity } from '../../lib/terminalRuntime.js'
import type { TmuxBackend } from '../../lib/tmuxBackend.js'
export interface PaneSwapDeps {
+ restartJobs?: AgentRestartCoordinator
byAgent: (agentId: string) => RegisteredSession | undefined
/** The tmux backend; a swap only ever runs where there is one. */
tmuxBackend: TmuxBackend | null
@@ -28,7 +29,7 @@ export interface PaneSwapDeps {
/** How long a relaunched engine must stay running before a restart counts it as come up (`waitForProcess`). */
export const SWAP_SETTLE_MS = 500
-export function createPaneSwap({ byAgent, tmuxBackend, prepareSessionResume, keepAbandonedConversation }: PaneSwapDeps) {
+export function createPaneSwap({ byAgent, tmuxBackend, prepareSessionResume, keepAbandonedConversation, restartJobs = new AgentRestartCoordinator() }: PaneSwapDeps) {
/**
* The dependencies a pane-process swap needs, for both callers that do one.
*
@@ -38,7 +39,6 @@ export function createPaneSwap({ byAgent, tmuxBackend, prepareSessionResume, kee
* is the only thing this takes. Written once because two copies of a kill sequence drift, and the
* half that drifts is the half nobody ran today.
*/
- const restartJobs = new AgentRestartCoordinator()
const sameRestartTarget = (session: RegisteredSession): boolean => {
const current = byAgent(session.agentId)
return !!current && current.registeredAt === session.registeredAt
diff --git a/cli/src/core/api.spec.ts b/cli/src/core/api.spec.ts
index dbd616942..67fed8bc2 100644
--- a/cli/src/core/api.spec.ts
+++ b/cli/src/core/api.spec.ts
@@ -1,6 +1,6 @@
import { describe, expect, it, vi } from 'vitest'
import { projectDisplayName, type RegisteredSession } from '../lib/registry.js'
-import { CONVERSATIONS_OFF, ACCOUNT_BACKEND_OFF, AGENT_ACTIONS_OFF, createCoreApi, DAEMON_UNKNOWN, DELIVERIES_OFF, DEVICES_FALLBACKS, emptyPorts, LANE_OFF, LONG_ANSWERS, MODELS_OFF, MODELS_REQUESTS, MONITOR_OFF, OBSERVER_KEY_OFF, ORCHESTRATOR_FALLBACKS, RECAPS_FALLBACKS, resolveAgent, SHARING_FALLBACKS, TEAMS_FALLBACKS, TERMINALS_OFF, WIFI_FALLBACKS, WIFI_OFF, type CoreApiDeps } from './api.js'
+import { CONVERSATIONS_OFF, ACCOUNT_BACKEND_OFF, AGENT_ACTIONS_OFF, createCoreApi, DAEMON_UNKNOWN, DELIVERIES_OFF, DEVICES_FALLBACKS, emptyPorts, LANE_OFF, LONG_ANSWERS, MODELS_OFF, STORE_OFF, MODELS_REQUESTS, MONITOR_OFF, OBSERVER_KEY_OFF, ORCHESTRATOR_FALLBACKS, RECAPS_FALLBACKS, resolveAgent, SHARING_FALLBACKS, TEAMS_FALLBACKS, TERMINALS_OFF, WIFI_FALLBACKS, WIFI_OFF, type CoreApiDeps } from './api.js'
import { FAIL, readFallback } from './serviceHost.js'
const row = (agentId: string) => ({ agentId, sessionId: `s-${agentId}`, engine: 'claude', cwd: '/work/app' }) as RegisteredSession
@@ -252,13 +252,16 @@ describe('the core API services stand on', () => {
})
it('starts with every port empty: a service fills its own when it starts', () => {
- expect(emptyPorts()).toEqual({ search: null, viewers: null, models: null, workspaces: null, teams: null, devices: null, wifi: null, monitor: null, orchestrator: null, sharing: null, recaps: null })
+ expect(emptyPorts()).toEqual({ store: null, search: null, viewers: null, models: null, workspaces: null, teams: null, devices: null, wifi: null, monitor: null, orchestrator: null, sharing: null, recaps: null })
expect(emptyPorts()).not.toBe(emptyPorts())
})
it('answers models\' fallbacks while it is off: no set-up and no target, no note and no prewarm, no name of its own', async () => {
const grid = { baseUrl: 'https://fixture.invalid/g/n1/relay/v1', model: 'm' }
const launch = { networkId: 'n1', networkName: 'mine', baseUrl: grid.baseUrl, apiKey: 'k' }
+ const dsh = { dsh: 'test/draw', workspace: '/workspace', engine: 'claude' as const, account: {}, key: 'agent' }
+ await expect(STORE_OFF.dshMaterialize(dsh)).rejects.toThrow('the store service is unavailable')
+ await expect(STORE_OFF.dshLaunch(dsh)).rejects.toThrow('the store service is unavailable')
await expect(MODELS_OFF.ensure()).rejects.toThrow('the models service is unavailable')
await expect(MODELS_OFF.launchTarget({ model: 'm', grid: 'mine' })).rejects.toThrow('the models service is unavailable')
await expect(MODELS_OFF.moveTarget({ gridName: null, model: 'm' })).rejects.toThrow('the models service is unavailable')
diff --git a/cli/src/core/api.ts b/cli/src/core/api.ts
index bf367c914..72f61f232 100644
--- a/cli/src/core/api.ts
+++ b/cli/src/core/api.ts
@@ -17,6 +17,7 @@ import type { AppSwarms } from '../cable/cableSession.js'
import type { UnreadNotification } from '../lib/notificationRead.js'
import type { AutonomousDeviceAgent, AutonomousDeviceDelivery, AutonomousDeviceReceipt } from '../lib/autonomous-device/service.js'
import type { StoreAgent } from '../lib/autonomous-device/store.js'
+import type { DshLaunchAnswer, DshLaunchRequest, DshMaterializeAnswer, DshMaterializeRequest } from '../dsh/launchWire.js'
import type { AgentDshContext } from '../lib/agentFrame.js'
import type { GridAccess } from '../lib/gridAttach.js'
import type { createHarnessResourcesReader } from '../lib/harnessResources.js'
@@ -508,7 +509,7 @@ export const LONG_ANSWERS: Readonly<Record<string, Readonly<Record<string, numbe
ensure: 15 * MINUTE, moveTarget: 15 * MINUTE,
launchTarget: 3 * MINUTE, privateGridName: 2 * MINUTE, lists: 2 * MINUTE,
},
- store: { dsh_install: 30 * MINUTE, dsh_update: 30 * MINUTE },
+ store: { dsh_install: 30 * MINUTE, dsh_update: 30 * MINUTE, dshMaterialize: 6 * MINUTE },
}
/** The orchestrator (services/orchestrator.ts): its projects, for the apps and for the agents it runs. */
@@ -1282,9 +1283,21 @@ export interface WindowRelay {
onClosed: (code: number, reason: string) => void): Promise<WindowRelaySession>
}
+export interface StorePort {
+ dshMaterialize(request: DshMaterializeRequest): Promise<DshMaterializeAnswer>
+ dshLaunch(request: DshLaunchRequest): Promise<DshLaunchAnswer>
+}
+
+export const STORE_FALLBACKS: PortFallbacks<StorePort> = { dshMaterialize: later(FAIL), dshLaunch: later(FAIL) }
+export const STORE_OFF: StorePort = {
+ dshMaterialize: () => Promise.reject(new ServiceUnavailableError('store')),
+ dshLaunch: () => Promise.reject(new ServiceUnavailableError('store')),
+}
+
/** Each port is filled by the service that owns it when that service starts, and is null while the
* service is off: the core never waits on one. */
export interface CorePorts {
+ store: StorePort | null
search: SearchPort | null
viewers: ViewersPort | null
models: ModelsPort | null
@@ -1299,7 +1312,7 @@ export interface CorePorts {
}
export function emptyPorts(): CorePorts {
- return { search: null, viewers: null, models: null, workspaces: null, teams: null, devices: null, wifi: null, monitor: null, orchestrator: null, sharing: null, recaps: null }
+ return { store: null, search: null, viewers: null, models: null, workspaces: null, teams: null, devices: null, wifi: null, monitor: null, orchestrator: null, sharing: null, recaps: null }
}
export interface CoreApiDeps {
diff --git a/cli/src/core/engines/hooks.spec.ts b/cli/src/core/engines/hooks.spec.ts
index 2efb667a2..63d273b64 100644
--- a/cli/src/core/engines/hooks.spec.ts
+++ b/cli/src/core/engines/hooks.spec.ts
@@ -6,6 +6,7 @@ import { processRows } from '../../lib/terminalAgentDiscovery.js'
import { adoptHomes, movedHomes } from '../../lib/engineHomes.js'
import { createEngineHooks, installEngineHooks, installOpencodePluginBeforeSpawn, PROCESS_RECORD_WAIT_MS, type EngineHookDeps } from './hooks.js'
import { loadEngine } from '../../engines/inProcess.js'
+import { createPaneOperations } from '../agents/paneOperations.js'
vi.mock('../../engines/hooks.js', async (real) => {
const actual = await real<typeof import('../../engines/hooks.js')>()
@@ -106,6 +107,36 @@ describe('which agent a hook belongs to', () => {
expect(console.log).toHaveBeenCalledWith('[hooks] cursor hook accepted on runtime evidence alone · agent=cursor-1 · caller=300 is outside that engine\'s process tree')
})
+ it.each(['committed', 'removed', 'failed', 'unreadable', 'no acknowledgement'] as const)(
+ 'Cursor admission waits only for the pane commit, then rechecks the current row: %s', async outcome => {
+ const operations = createPaneOperations()
+ const c1 = { ...agent('cursor-1'), engine: 'cursor' } as RegisteredSession
+ const onPane: Record<string, RegisteredSession> = { '%1': c1 }
+ let commit!: () => void
+ const work = operations.run(c1.agentId, async () => {
+ await new Promise<void>(done => { commit = done })
+ if (outcome === 'failed') throw new Error('pane uncertain')
+ if (outcome === 'removed') delete onPane['%1']
+ if (outcome === 'unreadable') vi.mocked(processRows).mockResolvedValue(null)
+ })
+ const finished = work.catch(() => {})
+ vi.mocked(processRows).mockResolvedValue(tree([300, 1]) as never)
+ const { hooks } = setup(onPane, { panePending: operations.pending })
+ const onWait = vi.fn()
+ const admitted = vi.fn()
+ const resolution = hooks.resolveHookAgent({ engine: 'cursor', runtimeHints: [hint('%1')], callerPid: 300,
+ ...(outcome === 'no acknowledgement' ? {} : { onWait }) }).then(result => { admitted(result); return result })
+ await vi.waitFor(() => expect(processRows).toHaveBeenCalled())
+ if (outcome !== 'no acknowledgement') await vi.waitFor(() => expect(onWait).toHaveBeenCalledOnce())
+ else await new Promise(resolve => setImmediate(resolve))
+ expect(admitted).not.toHaveBeenCalled()
+ commit()
+ await finished
+ expect(await resolution).toBe(['committed', 'no acknowledgement'].includes(outcome) ? c1 : null)
+ vi.mocked(processRows).mockReset().mockResolvedValue([])
+ },
+ )
+
it('none for any other engine on the pane alone, saying the caller is not its descendant', async () => {
// 300's parent 200 is not in the table; the walk stops there.
vi.mocked(processRows).mockResolvedValueOnce(tree([300, 200], [100, 1]) as never)
diff --git a/cli/src/core/engines/hooks.ts b/cli/src/core/engines/hooks.ts
index b1e76144d..9168f407d 100644
--- a/cli/src/core/engines/hooks.ts
+++ b/cli/src/core/engines/hooks.ts
@@ -20,6 +20,8 @@ import type { TerminalRuntimeRef } from '../../lib/terminalTypes.js'
type ResolveHookAgent = NonNullable<HookServerHandlers['resolveHookAgent']>
export interface EngineHookDeps {
+ /** Only the core's short pane dispatch/commit, never service preparation or an engine watch. */
+ panePending?: (agentId: string) => Promise<unknown> | undefined
/** Hints name tmux panes; without tmux there is nothing they can point at. */
tmuxBackend: unknown
agentReconciler: Pick<TerminalAgentReconciler, 'triggerHint' | 'trigger'>
@@ -44,7 +46,7 @@ type HookQuery = Parameters<ResolveHookAgent>[0]
const recordKey = (session: RegisteredSession | undefined): string =>
session ? `${session.agentId}\u0000${session.processIdentity?.pid ?? ''}\u0000${session.processIdentity?.startMarker ?? ''}` : ''
-export function createEngineHooks({ tmuxBackend, agentReconciler, registry }: EngineHookDeps) {
+export function createEngineHooks({ tmuxBackend, agentReconciler, registry, panePending }: EngineHookDeps) {
/**
* The agents on the hinted panes: those whose recorded process the caller descends from, the rest,
* and of the rest those with no live process recorded at all (none yet, or one that has exited).
@@ -143,6 +145,19 @@ export function createEngineHooks({ tmuxBackend, agentReconciler, registry }: En
found = again
choice = chooseHookAgent([...found.candidates.values()], [...found.onHintedRuntime.values()], engine)
}
+ // Cursor may admit a unique runtime without recorded ancestry. A hook from the engine just
+ // dispatched there must not rewrite its row before that pane operation has committed its route.
+ // Acknowledge now so the hook client never falls back to writing the registry itself.
+ for (;;) {
+ const pending = choice.agent && panePending?.(choice.agent.agentId)
+ if (!pending) break
+ onWait?.()
+ try { await pending } catch { return null }
+ const again = await matchCaller(resolved, engine, ancestry)
+ if (!again) return null
+ found = again
+ choice = chooseHookAgent([...found.candidates.values()], [...found.onHintedRuntime.values()], engine)
+ }
const { candidates } = found
if (choice.agent) {
if (choice.reason === 'runtime') {
diff --git a/cli/src/core/main.ts b/cli/src/core/main.ts
index 1eb66b5d9..28003a633 100644
--- a/cli/src/core/main.ts
+++ b/cli/src/core/main.ts
@@ -75,7 +75,7 @@ import { type LaunchOverridesDeps } from '../lib/launchOverrides.js'
import { buildHarnessSessionLabel } from '../lib/harnessSessionLabel.js'
import { adoptLegacyHarnessSessions, listTmuxPanes } from '../lib/tmuxAgentDiscovery.js'
import { installedDsh, invalidateInstalledDsh } from '../dsh/installed.js'
-import { prepareHarnessLaunch } from '../dsh/runtime.js'
+import { dshThrough } from './agents/dshThrough.js'
import { ApiConnections } from '../lib/apiConnections.js'
import { rememberSavedApis } from '../lib/gridAssignment.js'
import { prepareApiInstructions } from '../lib/apiInstructions.js'
@@ -124,6 +124,9 @@ import { createForgetSession } from './agents/forget.js'
import { createBinding } from './agents/bind.js'
import { createDiscoveryHandlers } from './agents/discovery.js'
import { createLaunchHelpers, gridLaunchThrough } from './agents/launch.js'
+import { AgentRestartCoordinator } from '../lib/restartAgent.js'
+import { createPaneOperations } from './agents/paneOperations.js'
+import { createRestoreLaunch } from './agents/restoreLaunch.js'
import { createHeldLaunches, heldPaneArgv } from './agents/heldLaunches.js'
import { createCancel, createCancelRequest } from './turns/cancel.js'
import { createPaneWatcher } from './agents/newPane.js'
@@ -143,7 +146,7 @@ import { createEngineHooks, installEngineHooks, installOpencodePluginBeforeSpawn
import { createCursorDiscovery } from './engines/cursorDiscovery.js'
import { createCursorTaskHooks, loadPendingCursorTasks } from './engines/cursorTasks.js'
import { databaseHistory, hermesDb } from './transcripts/databaseHistory.js'
-import { COMMAND_BAR_REQUESTS, createCoreApi, DEVICES_FALLBACKS, DEVICES_REQUESTS, emptyPorts, HANDOFF_REQUESTS, EXPERIMENTS, LONG_ANSWERS, MODELS_FALLBACKS, MODELS_OFF, MODELS_REQUESTS, MONITOR_FALLBACKS, MONITOR_OFF, MONITOR_REQUESTS, ORCHESTRATOR_FALLBACKS, ORCHESTRATOR_REQUESTS, SHARE_REQUESTS, SHARING_FALLBACKS, PROJECTS_REQUESTS, SEARCH_FALLBACKS, SEARCH_REQUESTS, STORE_REQUESTS, TEAMS_FALLBACKS, TEAMS_REQUESTS, USAGE_REQUESTS, VIEWERS_FALLBACKS, WIFI_FALLBACKS, WINDOW_NAMES_REQUESTS, WORKSPACES_FALLBACKS, type GatewayAccount, type GatewayOps, type GatewayStatus, type RouteAnswer, type TeamsPort, type WindowFocus } from './api.js'
+import { COMMAND_BAR_REQUESTS, createCoreApi, DEVICES_FALLBACKS, DEVICES_REQUESTS, emptyPorts, HANDOFF_REQUESTS, EXPERIMENTS, LONG_ANSWERS, MODELS_FALLBACKS, MODELS_OFF, MODELS_REQUESTS, MONITOR_FALLBACKS, MONITOR_OFF, MONITOR_REQUESTS, ORCHESTRATOR_FALLBACKS, ORCHESTRATOR_REQUESTS, SHARE_REQUESTS, SHARING_FALLBACKS, PROJECTS_REQUESTS, SEARCH_FALLBACKS, SEARCH_REQUESTS, STORE_FALLBACKS, STORE_OFF, STORE_REQUESTS, TEAMS_FALLBACKS, TEAMS_REQUESTS, USAGE_REQUESTS, VIEWERS_FALLBACKS, WIFI_FALLBACKS, WINDOW_NAMES_REQUESTS, WORKSPACES_FALLBACKS, type GatewayAccount, type GatewayOps, type GatewayStatus, type RouteAnswer, type TeamsPort, type WindowFocus } from './api.js'
import { createServiceHost, testFaults } from './serviceHost.js'
import { startStalls } from './stall.js'
import { createServiceLinks, type ServiceLinks } from './serviceLinks.js'
@@ -408,6 +411,11 @@ async function runForeground(session: AuthSession | null): Promise<void> {
coreLink.onUpdate((version) => { void daemonBoot.applyStagedUpdate(version) })
// Agents held until the service their launch asks is ready, and the passes that launch them
// (core/agents/heldLaunches.ts): the boot's restore of only those agents, set where tmux is there to restore into.
+ const restorePanes = createPaneOperations()
+ const restartJobs = new AgentRestartCoordinator()
+ const forgetRestartRevision = (agentId: string): void => restartJobs.forget(agentId)
+ const restoreRevision = (agentId: string): number => restartJobs.revision(agentId)
+ let restoreCancelled = (_agentId: string): boolean => false
let restoreOnly: ((only: ReadonlySet<string>) => Promise<RestoreSummary>) | null = null
const heldLaunches = createHeldLaunches({
registry,
@@ -547,6 +555,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// Reading and writing panes through control leases (core/terminals/control.ts).
const terminalControl = createTerminalControl({ resolve: (target) => registry.resolve(target), terminals })
const pinnedControls = terminalControl.pinnedControls
+ restoreCancelled = (agentId) => pinnedControls.has(agentId)
const invalidateTerminalControl = terminalControl.invalidateTerminalControl
const captureTerminal = terminalControl.captureTerminal
const submitTerminal = terminalControl.submitTerminal
@@ -1215,7 +1224,8 @@ async function runForeground(session: AuthSession | null): Promise<void> {
outOfProcess, experiments, onWant: { collaboration: () => teamsLink.on() } })
backend.onAccountNotice = (notice) => experimentHooks.notice(notice)
// What the Store in its own process tells the core: an install's progress, and that what is installed changed (core/storeLink.ts).
- const storeLink = createStoreLink(coreApi, invalidateInstalledDsh)
+ const storeLink = createStoreLink(coreApi, invalidateInstalledDsh, (type, payload) => serviceLinks.call('store', type, payload))
+ storeLink.onReady(() => { void heldLaunches.restoreHeld('store') })
// What the core keeps of models in its own process for frames and keystrokes, and how it asks it the rest (core/modelsLink.ts).
const modelsLink = createModelsLink(coreApi, (type, payload) => serviceLinks.call('models', type, payload), (frame) => serviceLinks.notify('models', frame))
// The devices in their own process (core/devicesLink.ts): told what the windows say, asked ⌘K, and told it
@@ -1345,7 +1355,8 @@ async function runForeground(session: AuthSession | null): Promise<void> {
else serviceHost.start('teams', inline!.startTeamsInCore, coreApi, TEAMS_FALLBACKS, TEAMS_REQUESTS)
// The harnesses installed here, and installing, updating and removing one (services/store.ts): in this
// process, or beside the viewers in theirs (services/storeProcess.ts).
- if (!outOfProcess.has('store')) serviceHost.serve('store', inline!.startStore, coreApi, STORE_REQUESTS)
+ if (outOfProcess.has('store')) ports.store = storeLink.port
+ else serviceHost.start('store', (core, installedPorts) => inline!.startStoreInCore(core, installedPorts, () => { void heldLaunches.restoreHeld('store') }), coreApi, STORE_FALLBACKS, STORE_REQUESTS)
// This machine's Claude and Codex rate limits, read with its own credentials (services/usage.ts): in this
// process, or in the edge host (services/usageProcess.ts).
if (!outOfProcess.has('usage')) serviceHost.serve('usage', inline!.startUsage, coreApi, USAGE_REQUESTS)
@@ -1450,6 +1461,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// Release a session's binding, or remove a process-owned agent everywhere (core/agents/forget.ts).
const forgetSession = createForgetSession({
+ onRemoved: (agentId) => forgetRestartRevision(agentId),
relaunchMarks,
registry,
stoppedAgents,
@@ -1482,7 +1494,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// A terminal is never the dial's business, and `syncSession` forces that for it anyway.
announceSession: session => announceSession(session, { device: false }),
invalidateTerminalControl,
- forgetInput: agentId => { teams.forget(agentId); input.forget(agentId); deviceInput.forget(agentId) },
+ forgetInput: agentId => { forgetRestartRevision(agentId); teams.forget(agentId); input.forget(agentId); deviceInput.forget(agentId) },
detachDsh,
syncRecapPool,
warn: (message, error) => console.warn(message, error),
@@ -1506,6 +1518,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
deviceInput,
homes: { copilot: env.COPILOT_HOME, grok: env.GROK_HOME, agy: env.AGY_HOME },
})
+ binding.whileChanging((agentId) => restorePanes.busy(agentId))
const pendingForkInherit = binding.pendingForkInherit
const handleRegistered = binding.handleRegistered
const bindObservedAgent = binding.bindObservedAgent
@@ -1655,7 +1668,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
dataDir: env.ADAPTER_DATA_DIR,
})
// Which agent a hook belongs to, and what a SessionEnd means (core/engines/hooks.ts).
- const engineHooks = createEngineHooks({ tmuxBackend, agentReconciler, registry })
+ const engineHooks = createEngineHooks({ tmuxBackend, agentReconciler, registry, panePending: restorePanes.pending })
const { server: hookServer, port: hookPort, localSocket } = await startHookServer(daemonPort(), {
onCommandBar: routedCommandBar(backend),
onAutonomousDeviceRequest: async (method, target, body) => {
@@ -1923,20 +1936,15 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// Grid and saved-API launches are built by the models service (core/agents/launch.ts `gridLaunchThrough`): a
// launch on one while models is down is refused, and one on the engine's own login never asks it.
const gridLaunch = gridLaunchThrough(() => ports.models ?? MODELS_OFF)
+ const dshLaunch = dshThrough({ store: () => ports.store ?? STORE_OFF,
+ nameOf: id => installedDsh(id)?.manifest.name, account: () => ({ privateGrid: backend.gridName() }) })
const launchOverridesDeps: LaunchOverridesDeps = {
machine: gridLaunchMachine,
gridLaunch,
writeGridConfigDir,
tmuxSupportsSessionEnv,
installCodexHooks: (codexHome) => { if (!env.DISABLE_HOOK_INSTALL) engineHookFacets.codex.installIn(hookPort, codexHome) },
- dshLaunch: (id, workspace, engine, runtimeKey) => {
- const installed = installedDsh(id)
- if (!installed) {
- console.warn(`[dsh] ${id} is not installed on this machine · cannot restore its harness context`)
- return null
- }
- return prepareHarnessLaunch(installed, workspace, engine, runtimeKey, { privateGrid: backend.gridName() }, null)
- },
+ dshLaunch: dshLaunch.relaunch,
}
// What a relaunch needs to bring a pane back (core/agents/launch.ts). Declared before the restore
// pass below, which calls these for every pane it rebuilds.
@@ -1962,9 +1970,6 @@ async function runForeground(session: AuthSession | null): Promise<void> {
} catch (error) {
console.warn(`[repair] cwd repair skipped · ${error instanceof Error ? error.message : error}`)
}
- // Bundled harness installation is the Store's. Wait for its first preparation before restore reads
- // the index, with a deadline so a broken Store never prevents ordinary agents from coming back.
- if (outOfProcess.has('store') && !await storeLink.ready()) console.warn('[store] preparation unavailable · restoring with the installed harnesses')
watcher.start()
await cursorDiscovery.start()
// What a restored agent's engine writes from here on is live: the first attach of each folds its
@@ -1993,6 +1998,11 @@ async function runForeground(session: AuthSession | null): Promise<void> {
try {
const backend = tmuxBackend
const restoreDeps: RestoreAgentsDeps = {
+ cancelled: (agentId) => restoreCancelled(agentId),
+ revision: (agentId) => restoreRevision(agentId),
+ paneOperation: restorePanes.run,
+ paneAllocations: restorePanes.runMany,
+ paneBusy: restorePanes.busy,
retainStopped: retainExitedSession,
keepAbandoned: keepAbandonedConversation,
registry,
@@ -2001,56 +2011,42 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// A new tmux server hands out `%N` from zero again, so a stale id can name someone's shell;
// and a pane that outlived the daemon in a session discovery no longer lists still has its
// engine, which a second pane resuming the same session would collide with.
- ...tmuxSurvey(() => listTmuxPanes(), lookupPaneEngineProcess),
- buildLaunch: async (entry, opts) => {
- // A folder that went away with the reboot (an unmounted volume, a workspace deleted while the
- // daemon was down) is a named failure on the tile, not a pane that prints an error and exits.
- const missing = workspaceMissing(entry.cwd)
- if (missing) return { error: missing.error, detail: missing.detail }
- // Mirrors `agent_create`: the same grid env/argv (and the same vendor variables cleared), or
- // the same Codex profile with its hooks installed; the install check runs inside the pane's
- // own shell.
- const built = await relaunchOverrides(entry)
- // Models could not be asked: the agent waits for it, held, never failed (core/agents/heldLaunches.ts).
- if (!built.ok) return built.unavailable ? { held: built.unavailable } : { error: built.error, detail: built.detail }
- if (opts.resumeSessionId) {
- try { prepareSessionResume(entry) } catch (error) {
- return { error: 'RESUME_PREPARATION_FAILED', detail: error instanceof Error ? error.message : String(error) }
- }
- }
- // Before the pane comes up rather than after: restore has no later hook per agent, and a
- // pane that fails to come up is reported failed by the frame regardless of this field.
- refreshGridWebSearch(entry.agentId, built.overrides)
- const { env: launchEnv, extraArgs, clearEnv } = built.overrides
- // The engine may have been downgraded while the daemon was down. Coming back in Ask beats
- // coming back as a pane of help text, and beats not coming back at all.
- const permission = await downgradedPermission(entry, entry.bypassPermission === true, 'restore')
- const argv = buildEngineLaunchArgv(entry.engine, {
- ...opts,
- bypassPermission: permission.bypassPermission === true,
- ...(permission.permissionMode ? { permissionMode: permission.permissionMode } : {}),
- installIfMissing: enginePathOverride(entry.engine) ? undefined : engineInstallRecipe(entry.engine),
- ...(entry.cwd ? { cwd: entry.cwd } : {}),
- ...(extraArgs.length ? { extraArgs } : {}),
- ...(clearEnv.length ? { clearEnv } : {}),
- ...(launchEnv.HARNESS_DSH ? { harnessNode: true } : {}),
- })
- return { argv, ...(Object.keys(launchEnv).length ? { env: launchEnv } : {}) }
- },
- createPane: async (entry, launch) => {
+ survey: () => tmuxSurvey(() => listTmuxPanes(), lookupPaneEngineProcess),
+ liveProcess: (entry, runtime) => tmuxSurvey(() => listTmuxPanes(), lookupPaneEngineProcess).liveProcess(entry, runtime),
+ buildLaunch: createRestoreLaunch({
+ workspaceMissing, relaunchOverrides, prepareSessionResume, refreshGridWebSearch,
+ downgradedPermission: (entry) => downgradedPermission(entry, entry.bypassPermission === true, 'restore'),
+ launch: (entry, opts, overrides, permission) => {
+ const { env: launchEnv, extraArgs, clearEnv } = overrides
+ const argv = buildEngineLaunchArgv(entry.engine, {
+ ...opts,
+ bypassPermission: permission.bypassPermission === true,
+ ...(permission.permissionMode ? { permissionMode: permission.permissionMode } : {}),
+ installIfMissing: enginePathOverride(entry.engine) ? undefined : engineInstallRecipe(entry.engine),
+ ...(entry.cwd ? { cwd: entry.cwd } : {}),
+ ...(extraArgs.length ? { extraArgs } : {}),
+ ...(clearEnv.length ? { clearEnv } : {}),
+ ...(launchEnv.HARNESS_DSH ? { harnessNode: true } : {}),
+ })
+ return { argv, ...(Object.keys(launchEnv).length ? { env: launchEnv } : {}) }
+ },
+ }),
+ createPane: async (entry, launch, control) => {
const created = await backend.create({
cwd: homedir(),
label: buildHarnessSessionLabel(entry.engine),
command: launch.argv,
+ ...control,
...(launch.env ? { env: launch.env } : {}),
})
return created.state === 'succeeded'
? { ok: true, runtime: created.runtime }
: { ok: false, reason: created.reason }
},
- respawn: async (runtime, launch) => {
+ respawn: async (runtime, launch, control) => {
const result = await backend.respawn(runtime, {
command: launch.argv,
+ ...control,
cwd: homedir(),
...(launch.env ? { env: launch.env } : {}),
})
@@ -2064,7 +2060,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
triggerHint: async (runtime, engine) => { await agentReconciler.triggerHint(runtime, engine) },
log: (message) => console.log(message),
// A grid's or a saved API's launch asks models: not before the core is ready (core/agents/heldLaunches.ts).
- needs: (entry) => entry.gridLaunch ? 'models' : null,
+ needs: (entry) => [...(entry.gridLaunch ? ['models'] : []), ...(entry.dsh ? ['store'] : [])],
waitingLaunch: (_entry, held) => ({ argv: heldPaneArgv(held.detail) }),
killPane: async (runtime) => { await backend.kill(runtime) },
}
@@ -2237,6 +2233,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// Creating an agent (core/agents/create.ts).
backend.onCreateAgent = createAgentCreator({
+ dshLaunch,
tmuxBackend,
registry,
adoptableSession,
@@ -2263,6 +2260,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// Forking an agent (core/agents/fork.ts).
backend.onForkAgent = createAgentForker({
+ dshLaunch,
tmuxBackend,
registry,
mirror,
@@ -2277,14 +2275,14 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// Swapping a pane's engine process, for restart and retarget (core/agents/swap.ts).
const paneSwap = createPaneSwap({
+ restartJobs,
byAgent: (agentId) => registry.byAgent(agentId),
tmuxBackend,
prepareSessionResume,
keepAbandonedConversation,
})
- const restartJobs = paneSwap.restartJobs
// A message sent while an engine is being replaced waits for the new one instead of being refused.
- terminals.whileChanging((agentId) => restartJobs.busy(agentId))
+ terminals.whileChanging((agentId) => restorePanes.busy(agentId) || restartJobs.busy(agentId))
const sameRestartTarget = paneSwap.sameRestartTarget
const paneSwapDeps = paneSwap.paneSwapDeps
const liveBypassPermission = paneSwap.liveBypassPermission
@@ -2292,7 +2290,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// Moving a running agent onto a grid, or back to its own login (core/agents/retarget.ts).
backend.onRetargetAgent = createAgentRetargeter({
readScreen: screens.read,
- purgeBusy: (agentId) => backend.purgeAgentService?.busy(agentId),
+ purgeBusy: (agentId) => restorePanes.busy(agentId) || backend.purgeAgentService?.busy(agentId),
tmuxBackend,
registry,
runtimeProfiles,
@@ -2311,6 +2309,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
// Stopping, purging and resuming an agent (core/agents/lifecycle.ts).
const lifecycle = createAgentLifecycle({
+ settlePane: restorePanes.settle,
registry,
stoppedAgents,
restartJobs,
@@ -2335,7 +2334,8 @@ async function runForeground(session: AuthSession | null): Promise<void> {
relaunchMarks,
})
const stopJobs = lifecycle.stopJobs
- binding.whileChanging((agentId) => restartJobs.busy(agentId) || stopJobs.has(agentId))
+ restoreCancelled = (agentId) => stopJobs.has(agentId) || pinnedControls.has(agentId) || (restartJobs.operation(agentId) !== undefined && restartJobs.operation(agentId) !== 'restart')
+ binding.whileChanging((agentId) => restorePanes.busy(agentId) || restartJobs.busy(agentId) || stopJobs.has(agentId))
const stopAgent = lifecycle.stopAgent
backend.stopProvider = createStopRequest({ byAgent: (id) => registry.byAgent(id), stop: stopAgent })
backend.purgeAgentService = lifecycle.purgeAgentService
@@ -2365,7 +2365,7 @@ async function runForeground(session: AuthSession | null): Promise<void> {
const restartAgent = createAgentRestarter({
restartJobs,
registry,
- purgeBusy: (agentId) => backend.purgeAgentService?.busy(agentId),
+ purgeBusy: (agentId) => restorePanes.busy(agentId) || backend.purgeAgentService?.busy(agentId),
stopJobs,
pinnedControls,
tmuxBackend,
diff --git a/cli/src/core/serviceHost.spec.ts b/cli/src/core/serviceHost.spec.ts
index 4e3b6a785..87f990df0 100644
--- a/cli/src/core/serviceHost.spec.ts
+++ b/cli/src/core/serviceHost.spec.ts
@@ -97,13 +97,13 @@ describe('hosting services so one that fails cannot take the core down', () => {
const h = host()
const port = startSearch(h, {
...new FakeSearch(),
- touch: () => { throw new Error('store closed') },
+ touch: () => { throw new Error('catalog closed') },
session: () => { throw 'bad row' },
})
expect(testPort(h).touch('s1')).toBeUndefined()
expect(testPort(h).session('s1')).toBeUndefined()
expect(port).toBeDefined()
- expect(h.lines).toEqual(['[services] search.touch failed · store closed', '[services] search.session failed · bad row'])
+ expect(h.lines).toEqual(['[services] search.touch failed · catalog closed', '[services] search.session failed · bad row'])
})
it('goes back to the one request when its fallback is FAIL, sync or async', async () => {
@@ -143,7 +143,7 @@ describe('hosting services so one that fails cannot take the core down', () => {
it('after five failures within the window: stopped, unbound, and its calls answered without reaching it', async () => {
const h = host()
const real = new FakeSearch()
- real.touch = () => { throw new Error('store closed') }
+ real.touch = () => { throw new Error('catalog closed') }
startSearch(h, real)
const captured = testPort(h)
const unbind = vi.fn()
@@ -269,7 +269,7 @@ describe('hosting services so one that fails cannot take the core down', () => {
it('returns at once, and replies when a promised answer comes', async () => {
const h = host()
let answer!: (value: Record<string, unknown>) => void
- h.services.serve('store', () => ({ dsh_list: () => new Promise((resolve) => { answer = resolve }) }), fakeCore(), ['dsh_list'])
+ h.services.serve('catalog', () => ({ dsh_list: () => new Promise((resolve) => { answer = resolve }) }), fakeCore(), ['dsh_list'])
const { got, reply } = collect()
expect(h.services.route('dsh_list', {}, ASKER, reply)).toBe(true)
expect(got).toEqual([])
@@ -282,8 +282,8 @@ describe('hosting services so one that fails cannot take the core down', () => {
h.services.start('search', () => { throw new Error('index locked') }, fakeCore(), SEARCH, ['session_search'])
h.services.start('viewers', () => {}, fakeCore(), VIEWERS, ['viewer_list'])
const switchedOff = vi.fn()
- h.services.serve('store', () => ({ dsh_list: () => { throw new Error('catalog corrupt') } }), fakeCore(), ['dsh_list'])
- h.services.onOff('store', switchedOff)
+ h.services.serve('catalog', () => ({ dsh_list: () => { throw new Error('catalog corrupt') } }), fakeCore(), ['dsh_list'])
+ h.services.onOff('catalog', switchedOff)
const { got, reply } = collect()
h.services.route('session_search', {}, ASKER, reply)
h.services.route('viewer_list', {}, ASKER, reply)
@@ -292,17 +292,17 @@ describe('hosting services so one that fails cannot take the core down', () => {
expect(got).toEqual([
{ error: 'SERVICE_UNAVAILABLE', service: 'search', retryable: false },
{ error: 'SERVICE_UNAVAILABLE', service: 'viewers', retryable: false },
- { error: 'SERVICE_FAILED', service: 'store' },
- { error: 'SERVICE_UNAVAILABLE', service: 'store', retryable: false },
+ { error: 'SERVICE_FAILED', service: 'catalog' },
+ { error: 'SERVICE_UNAVAILABLE', service: 'catalog', retryable: false },
])
- expect(h.services.isOff('store')).toBe(true)
+ expect(h.services.isOff('catalog')).toBe(true)
expect(switchedOff).toHaveBeenCalledOnce()
- expect(h.lines.at(-1)).toBe('[services] store switched off after 1 failures in 60s · it stays off until the daemon restarts')
+ expect(h.lines.at(-1)).toBe('[services] catalog switched off after 1 failures in 60s · it stays off until the daemon restarts')
})
it('answers a handler that throws, rejects or replies with nothing SERVICE_FAILED, and counts each against its service', async () => {
const h = host({ maxFailures: 3 })
- h.services.serve('store', () => ({
+ h.services.serve('catalog', () => ({
a: () => { throw new Error('bad row') },
b: async () => { throw 'closed' },
c: () => undefined as unknown as Record<string, unknown>,
@@ -310,33 +310,33 @@ describe('hosting services so one that fails cannot take the core down', () => {
const { got, reply } = collect()
for (const type of ['a', 'b', 'c']) h.services.route(type, {}, ASKER, reply)
await vi.waitFor(() => expect(got).toHaveLength(3))
- expect(got).toEqual([{ error: 'SERVICE_FAILED', service: 'store' }, { error: 'SERVICE_FAILED', service: 'store' }, { error: 'SERVICE_FAILED', service: 'store' }])
+ expect(got).toEqual([{ error: 'SERVICE_FAILED', service: 'catalog' }, { error: 'SERVICE_FAILED', service: 'catalog' }, { error: 'SERVICE_FAILED', service: 'catalog' }])
expect(h.lines).toEqual([
- '[services] store.a failed · bad row',
- '[services] store.b failed · closed',
- '[services] store.c failed · c was answered with no reply',
- '[services] store switched off after 3 failures in 60s · it stays off until the daemon restarts',
+ '[services] catalog.a failed · bad row',
+ '[services] catalog.b failed · closed',
+ '[services] catalog.c failed · c was answered with no reply',
+ '[services] catalog switched off after 3 failures in 60s · it stays off until the daemon restarts',
])
})
it('leaves off a service that claims a request another answers, or that answers other than it declared', () => {
const h = host()
- h.services.serve('store', () => ({ dsh_list: () => ({ dsh: [] }) }), fakeCore(), ['dsh_list'])
+ h.services.serve('catalog', () => ({ dsh_list: () => ({ dsh: [] }) }), fakeCore(), ['dsh_list'])
h.services.serve('rival', () => ({ dsh_list: () => ({}) }), fakeCore(), ['dsh_list'])
h.services.serve('loose', () => ({ a: () => ({}), b: () => ({}), c: () => ({}) }), fakeCore(), ['a'])
h.services.serve('looser', () => ({ d: () => ({}), e: () => ({}) }), fakeCore(), ['d'])
h.services.serve('short', () => ({}), fakeCore(), ['x', 'y'])
h.services.serve('shorter', () => ({}), fakeCore(), ['z'])
expect(['rival', 'loose', 'looser', 'short', 'shorter'].every((name) => h.services.isOff(name))).toBe(true)
- expect(h.services.isOff('store')).toBe(false)
+ expect(h.services.isOff('catalog')).toBe(false)
expect(h.lines).toEqual([
- '[services] rival did not start · dsh_list is answered by store · the core runs without it',
+ '[services] rival did not start · dsh_list is answered by catalog · the core runs without it',
'[services] loose did not start · it answers b, c without declaring them · the core runs without it',
'[services] looser did not start · it answers e without declaring it · the core runs without it',
'[services] short did not start · it declares x, y without answering them · the core runs without it',
'[services] shorter did not start · it declares z without answering it · the core runs without it',
])
- // The store keeps its own requests.
+ // The catalog keeps its own requests.
const { got, reply } = collect()
h.services.route('dsh_list', {}, ASKER, reply)
return vi.waitFor(() => expect(got).toEqual([{ dsh: [] }]))
@@ -382,14 +382,14 @@ describe('hosting services so one that fails cannot take the core down', () => {
})
it('fails one request on every ask, and leaves the service\'s others alone', async () => {
- const h = host({ faults: testFaults('store.dsh_list') })
- h.services.serve('store', () => ({ dsh_list: () => ({ dsh: [] }), dsh_remove: () => ({ ok: true }) }), fakeCore(), ['dsh_list', 'dsh_remove'])
+ const h = host({ faults: testFaults('catalog.dsh_list') })
+ h.services.serve('catalog', () => ({ dsh_list: () => ({ dsh: [] }), dsh_remove: () => ({ ok: true }) }), fakeCore(), ['dsh_list', 'dsh_remove'])
const got: Array<Record<string, unknown>> = []
h.services.route('dsh_list', {}, { local: true, owner: true }, (result) => got.push(result))
h.services.route('dsh_remove', {}, { local: true, owner: true }, (result) => got.push(result))
await vi.waitFor(() => expect(got).toHaveLength(2))
- expect(got).toEqual([{ error: 'SERVICE_FAILED', service: 'store' }, { ok: true }])
- expect(h.lines).toEqual(['[services] store.dsh_list failed · injected fault: store.dsh_list'])
+ expect(got).toEqual([{ error: 'SERVICE_FAILED', service: 'catalog' }, { ok: true }])
+ expect(h.lines).toEqual(['[services] catalog.dsh_list failed · injected fault: catalog.dsh_list'])
})
})
})
diff --git a/cli/src/core/storeLink.spec.ts b/cli/src/core/storeLink.spec.ts
index 01b821dec..6a9a7a502 100644
--- a/cli/src/core/storeLink.spec.ts
+++ b/cli/src/core/storeLink.spec.ts
@@ -5,29 +5,18 @@ import { createStoreLink } from './storeLink.js'
describe('the Store in its own process, as the core hears it', () => {
afterEach(() => vi.useRealTimers())
- it('waits for preparation, refreshes the index first and remembers it for restore', async () => {
- vi.useFakeTimers()
- const installed = vi.fn()
- const link = createStoreLink(fakeCore(), installed)
- const first = link.ready()
- const second = link.ready()
- expect(link.answer('prepared', {})).toEqual({ read: true })
- expect(installed).toHaveBeenCalledOnce()
- expect(await first).toBe(true)
- expect(await second).toBe(true)
- expect(await link.ready()).toBe(true)
- expect(vi.getTimerCount()).toBe(0)
- })
-
- it('lets ordinary agents restore when the Store is unavailable, and accepts a late preparation', async () => {
- vi.useFakeTimers()
- const link = createStoreLink(fakeCore(), vi.fn())
- const waiting = link.ready(50)
+ it('refreshes the installed index before notifying held launches; readiness never waits', () => {
+ const order: string[] = []
+ const link = createStoreLink(fakeCore(), () => order.push('installed'))
+ const off = link.onReady(() => order.push('ready'))
link.answer('installed', {})
- await vi.advanceTimersByTimeAsync(50)
- expect(await waiting).toBe(false)
+ expect(order).toEqual(['installed'])
+ link.answer('prepared', {})
+ expect(order).toEqual(['installed', 'installed', 'ready'])
+ off()
link.answer('prepared', {})
- expect(await link.ready()).toBe(true)
+ expect(order).toEqual(['installed', 'installed', 'ready', 'installed'])
+ expect(link).not.toHaveProperty('ready')
})
it('pushes an install\'s progress to the apps, and reads the installed index again when told it changed', () => {
const core = fakeCore()
@@ -47,3 +36,41 @@ describe('the Store in its own process, as the core hears it', () => {
expect(link.answer('credentials', {})).toEqual({ error: 'UNKNOWN_QUERY' })
})
})
+
+describe('checked Store launch replies', () => {
+ const request = { dsh: 'test/draw', workspace: '/workspace', engine: 'claude' as const, key: 'agent', account: {} }
+ const materialized = { ok: true, created: [], kept: ['existing'], warnings: [] }
+ const launched = { ok: true, launch: { env: { HARNESS_DSH: 'test/draw' }, args: ['--context'] } }
+ it('round trips valid launches and refusals through the real link', async () => {
+ const call = vi.fn().mockResolvedValueOnce(materialized).mockResolvedValueOnce(launched)
+ const link = createStoreLink(fakeCore(), vi.fn(), call)
+ expect(await link.port.dshMaterialize(request)).toEqual(materialized)
+ expect(await link.port.dshLaunch(request)).toEqual(launched)
+ expect(call.mock.calls).toEqual([['dshMaterialize', request], ['dshLaunch', request]])
+ for (const refused of [
+ { ok: false, error: 'DSH_NOT_INSTALLED', detail: 'missing' },
+ { ok: false, error: 'DSH_UNAVAILABLE', detail: 'waiting', unavailable: 'store', holdScope: 'workspace', thrown: 'Error: waiting' },
+ ]) {
+ call.mockResolvedValue(refused)
+ expect(await link.port.dshMaterialize(request)).toEqual(refused)
+ expect(await link.port.dshLaunch(request)).toEqual(refused)
+ }
+ })
+ it('a down Store or malformed answer cannot become an unprepared launch', async () => {
+ const call = vi.fn()
+ const link = createStoreLink(fakeCore(), vi.fn(), call)
+ const common = [null, [], false, {}, { ok: false }, { ok: false, error: 1 },
+ { ok: false, error: 'x', detail: 1 }, { ok: false, error: 'x', detail: 'x', unavailable: 'models' },
+ { ok: false, error: 'x', detail: 'x', thrown: 1 }, { ok: false, error: 'x', detail: 'x', holdScope: 'process' }, { error: 'SERVICE_UNAVAILABLE' }]
+ for (const bad of [...common, { ok: true }, { ...materialized, created: [1] }, { ...materialized, kept: null }, { ...materialized, warnings: [1] }]) {
+ call.mockResolvedValue(bad)
+ await expect(link.port.dshMaterialize(request)).rejects.toThrow('the store service is unavailable')
+ }
+ for (const bad of [...common, { ok: true }, { ok: true, launch: { env: [] } },
+ { ok: true, launch: { env: { KEY: 3 }, args: [] } }, { ok: true, launch: { env: {}, args: [1] } }]) {
+ call.mockResolvedValue(bad)
+ await expect(link.port.dshLaunch(request)).rejects.toThrow('the store service is unavailable')
+ }
+ await expect(createStoreLink(fakeCore(), vi.fn()).port.dshLaunch(request)).rejects.toThrow('the store service is unavailable')
+ })
+})
diff --git a/cli/src/core/storeLink.ts b/cli/src/core/storeLink.ts
index 599e29bf2..2f61d1744 100644
--- a/cli/src/core/storeLink.ts
+++ b/cli/src/core/storeLink.ts
@@ -6,21 +6,62 @@
* installed index again rather than from its two-second cache (dsh/installed.ts): the create that follows
* an install must find the harness just installed.
*/
-import type { CoreApi } from './api.js'
+import type { DshLaunchAnswer, DshMaterializeAnswer, DshRefusal } from '../dsh/launchWire.js'
+import type { CoreApi, StorePort } from './api.js'
+import { ServiceUnavailableError } from './serviceHost.js'
-export function createStoreLink(core: Pick<CoreApi, 'clients'>, installedChanged: () => void) {
- let prepared = false
- const waiters = new Set<() => void>()
- return {
- /** Wait only at boot, before restoring bundled harness agents. A missing Store cannot stop boot. */
- ready(waitMs = 5_000): Promise<boolean> {
- if (prepared) return Promise.resolve(true)
- return new Promise((resolve) => {
- const done = () => { clearTimeout(timer); waiters.delete(done); resolve(true) }
- const timer = setTimeout(() => { waiters.delete(done); resolve(false) }, waitMs)
- waiters.add(done)
- })
+const record = (value: unknown): value is Record<string, unknown> => !!value && typeof value === 'object' && !Array.isArray(value)
+const text = (value: unknown): value is string => typeof value === 'string'
+const texts = (value: unknown): value is string[] => Array.isArray(value) && value.every(text)
+
+function refusal(value: Record<string, unknown>): DshRefusal | null {
+ if (value.ok !== false || !text(value.error) || !text(value.detail)) return null
+ if (value.unavailable !== undefined && value.unavailable !== 'store') return null
+ if (value.thrown !== undefined && !text(value.thrown)) return null
+ if (value.holdScope !== undefined && value.holdScope !== 'workspace') return null
+ return { ok: false, error: value.error, detail: value.detail,
+ ...(value.unavailable ? { unavailable: value.unavailable } : {}),
+ ...(value.holdScope ? { holdScope: value.holdScope } : {}),
+ ...(value.thrown !== undefined ? { thrown: value.thrown } : {}) }
+}
+
+/** Only a checked contribution can reach the pane; malformed answers hold the launch. */
+export function dshMaterializeAnswerIn(value: unknown): DshMaterializeAnswer | null {
+ if (!record(value)) return null
+ if (value.ok !== true) return refusal(value)
+ return texts(value.created) && texts(value.kept) && texts(value.warnings)
+ ? { ok: true, created: value.created, kept: value.kept, warnings: value.warnings } : null
+}
+
+export function dshLaunchAnswerIn(value: unknown): DshLaunchAnswer | null {
+ if (!record(value)) return null
+ if (value.ok !== true) return refusal(value)
+ const launch = value.launch
+ if (!record(launch) || !record(launch.env) || !Object.values(launch.env).every(text) || !texts(launch.args)) return null
+ return { ok: true, launch: { env: launch.env as Record<string, string>, args: launch.args } }
+}
+
+type CallStore = (type: string, payload: Record<string, unknown>) => Promise<Record<string, unknown>>
+
+export function createStoreLink(core: Pick<CoreApi, 'clients'>, installedChanged: () => void,
+ call: CallStore = async () => ({ error: 'SERVICE_UNAVAILABLE' })) {
+ const listeners = new Set<() => void>()
+ const port: StorePort = {
+ dshMaterialize: async request => {
+ const answer = dshMaterializeAnswerIn(await call('dshMaterialize', { ...request }))
+ if (!answer) throw new ServiceUnavailableError('store')
+ return answer
},
+ dshLaunch: async request => {
+ const answer = dshLaunchAnswerIn(await call('dshLaunch', { ...request }))
+ if (!answer) throw new ServiceUnavailableError('store')
+ return answer
+ },
+ }
+ return {
+ port,
+ /** Restore is already held in core; a Store notice only schedules another pass after core ready. */
+ onReady(listener: () => void): () => void { listeners.add(listener); return () => { listeners.delete(listener) } },
/** The core's answers to the Store's questions (core/serviceLinks.ts `answer`, for `store`). */
answer(query: string, payload: Record<string, unknown>): Record<string, unknown> {
if (query === 'installStatus') {
@@ -32,8 +73,7 @@ export function createStoreLink(core: Pick<CoreApi, 'clients'>, installedChanged
if (query === 'prepared' || query === 'installed') {
installedChanged()
if (query === 'prepared') {
- prepared = true
- for (const done of waiters) done()
+ for (const ready of listeners) ready()
}
return { read: true }
}
diff --git a/cli/src/dsh/compatibility.ts b/cli/src/dsh/compatibility.ts
index 496b65168..a3fbe340d 100644
--- a/cli/src/dsh/compatibility.ts
+++ b/cli/src/dsh/compatibility.ts
@@ -8,3 +8,13 @@ export function compatibleHarnessEngines(manifest: { kind?: string; engine?: Age
if (manifest.kind === 'viewer' || !manifest.engine || manifest.engine === 'terminal') return []
return [manifest.engine, ...PROCESS_ENGINES.filter(engine => engine !== manifest.engine)]
}
+
+export function incompatibleHarnessEngine(id: string, manifest: { kind?: string; engine?: AgentEngine },
+ engine: AgentEngine): string | null {
+ const supported = compatibleHarnessEngines(manifest)
+ if (supported.includes(engine)) return null
+ return supported.length
+ ? `${id} supports ${supported.join(', ')}; ${engine} is not compatible`
+ : `${id} cannot run as an agent`
+}
+
diff --git a/cli/src/dsh/launch.spec.ts b/cli/src/dsh/launch.spec.ts
index 8c3c0ad7b..55ccbc1a1 100644
--- a/cli/src/dsh/launch.spec.ts
+++ b/cli/src/dsh/launch.spec.ts
@@ -48,7 +48,7 @@ describe('buildLaunchOverrides with a DSH', () => {
writeGridConfigDir: async () => '/cfg',
tmuxSupportsSessionEnv: async () => true,
installCodexHooks: () => undefined,
- dshLaunch: (id, workspace, engine) => (id === installed.id ? dshLaunch(installed, workspace, {}, engine) : null),
+ dshLaunch: async (id, workspace, engine) => id === installed.id ? { ok: true, launch: dshLaunch(installed, workspace, {}, engine) } : { ok: false, error: 'DSH_NOT_INSTALLED', detail: `${id} is not installed on this machine` },
}
it('layers the DSH env and argv over a plain relaunch', async () => {
diff --git a/cli/src/dsh/launchWire.ts b/cli/src/dsh/launchWire.ts
new file mode 100644
index 000000000..2777a9b28
--- /dev/null
+++ b/cli/src/dsh/launchWire.ts
@@ -0,0 +1,36 @@
+/** The Store's launch contribution. Core owns the pane and registry; the Store owns package execution. */
+import type { AgentEngine } from '../engines/types.js'
+import type { DshAccount, DshLaunch } from './launch.js'
+
+export interface DshMaterializeRequest {
+ dsh: string
+ workspace: string
+ engine: AgentEngine
+ account: DshAccount
+ /** The create's stable label also identifies its workspace preparation across a lost reply. */
+ key: string
+}
+
+export interface DshLaunchRequest extends DshMaterializeRequest {
+ forkOf?: { agentId: string; dshRuntime: string | null }
+}
+
+export interface DshRefusal {
+ ok: false
+ error: string
+ detail: string
+ /** A restore holds this launch until the service returns. */
+ unavailable?: 'store'
+ /** The Store answered, but only this workspace is held; other workspaces can still launch. */
+ holdScope?: 'workspace'
+ /** Relaunches historically used String(error); create and fork used error.message. */
+ thrown?: string
+}
+
+export type DshMaterializeAnswer = { ok: true; created: string[]; kept: string[]; warnings: string[] } | DshRefusal
+export type DshLaunchAnswer = { ok: true; launch: DshLaunch } | DshRefusal
+
+export function dshUnavailable(name: string): DshRefusal {
+ return { ok: false, error: 'DSH_UNAVAILABLE', unavailable: 'store',
+ detail: `The Store is not running, so ${name} cannot be prepared for this agent. Try again in a moment.` }
+}
diff --git a/cli/src/dsh/portability.integration.spec.ts b/cli/src/dsh/portability.integration.spec.ts
index 6c5c59500..75f31b1b0 100644
--- a/cli/src/dsh/portability.integration.spec.ts
+++ b/cli/src/dsh/portability.integration.spec.ts
@@ -143,7 +143,7 @@ for (const engine of PROCESS_ENGINES) it(`${engine}: prepare → spawn → tool
expect(readFileSync(join(workspace, 'scene.txt'), 'utf8')).toBe('drawn by test/portable\n')
const restored = await buildLaunchOverrides({ machine: () => ({ hermesSystemManaged: false }), gridLaunch: gridLaunchInProcess(), writeGridConfigDir: async () => '/unused',
tmuxSupportsSessionEnv: async () => true, installCodexHooks: () => {},
- dshLaunch: (_id, ws, selected, key) => prepareHarnessLaunch(pkg, ws, selected, key) }, engine,
+ dshLaunch: async (_id, ws, selected, key) => ({ ok: true, launch: prepareHarnessLaunch(pkg, ws, selected, key) }) }, engine,
{ dsh: pkg.id, cwd: workspace, dshRuntime: 'created' }, 'registered')
expect(restored.ok).toBe(true)
if (!restored.ok) throw new Error(restored.detail)
diff --git a/cli/src/dsh/preparation.spec.ts b/cli/src/dsh/preparation.spec.ts
new file mode 100644
index 000000000..3282d9e8c
--- /dev/null
+++ b/cli/src/dsh/preparation.spec.ts
@@ -0,0 +1,73 @@
+import { mkdtempSync, mkdirSync, readdirSync, rmSync, symlinkSync, writeFileSync } from 'node:fs'
+import { tmpdir } from 'node:os'
+import { join } from 'node:path'
+import { afterEach, describe, expect, it, vi } from 'vitest'
+import { dshPreparations } from './preparation.js'
+
+const roots: string[] = []
+const setup = () => {
+ const root = mkdtempSync(join(tmpdir(), 'dsh-preparation-'))
+ roots.push(root)
+ const workspace = join(root, 'workspace'), directory = join(root, 'receipts')
+ mkdirSync(workspace)
+ return { root, workspace, directory, prepare: dshPreparations(directory) }
+}
+afterEach(() => { for (const root of roots.splice(0)) rmSync(root, { recursive: true, force: true }) })
+
+describe('durable Store workspace preparation', () => {
+ it('reuses confirmed initialization after a lost reply, but revalidates runtime inputs each time', async () => {
+ const { workspace, directory, prepare } = setup()
+ const init = vi.fn(async () => ({ created: ['template'], warnings: [] }))
+ expect(await prepare(workspace, { init: 'first' }, init, true)).toEqual({ created: ['template'], warnings: [] })
+ expect(await dshPreparations(directory)(workspace, { init: 'first' }, init, true)).toEqual({ created: ['template'], warnings: [] })
+ expect(init).toHaveBeenCalledOnce()
+ const runtime = vi.fn(async () => ({ env: {} }))
+ await prepare(workspace, { runtime: 'first' }, runtime)
+ await prepare(workspace, { runtime: 'first' }, runtime)
+ await prepare(workspace, { runtime: 'first', account: 'new' }, runtime)
+ expect(runtime).toHaveBeenCalledTimes(3)
+ expect(readdirSync(directory).filter(file => file.endsWith('.pending'))).toEqual([])
+ })
+ it('fences one canonical workspace across aliases and new request labels until the writer finishes', async () => {
+ const { root, workspace, directory, prepare } = setup()
+ const alias = join(root, 'alias'); symlinkSync(workspace, alias)
+ let finish!: (value: string) => void
+ const run = vi.fn(() => new Promise<string>(resolve => { finish = resolve }))
+ const first = prepare(workspace, { key: 'one' }, run)
+ const repeat = prepare(alias, { key: 'one' }, run)
+ await expect(prepare(alias, { key: 'two' }, run)).rejects.toThrow('still running')
+ await expect(dshPreparations(directory)(workspace, { key: 'new-after-crash' }, run)).rejects.toThrow('unconfirmed')
+ finish('done')
+ expect(await first).toBe('done'); expect(await repeat).toBe('done')
+ expect(run).toHaveBeenCalledOnce()
+ })
+ it('never retries uncertain or corrupt intent, even with another engine/package/key', async () => {
+ const { workspace, directory, prepare } = setup()
+ const broken = vi.fn(async () => { writeFileSync(join(workspace, 'user-content'), 'preserve'); throw new Error('lost writer') })
+ await expect(prepare(workspace, { key: 'one' }, broken)).rejects.toThrow('unconfirmed')
+ const later = vi.fn(async () => 'must not run')
+ await expect(dshPreparations(directory)(workspace, { key: 'two', package: 'other' }, later)).rejects.toThrow('unconfirmed')
+ const pending = readdirSync(directory).find(file => file.endsWith('.pending'))!
+ writeFileSync(join(directory, pending), '{')
+ await expect(prepare(workspace, {}, later)).rejects.toThrow('unconfirmed')
+ expect(later).not.toHaveBeenCalled()
+ expect(readdirSync(workspace)).toEqual(['user-content'])
+ })
+ it('does not replay old initialization into a newly recreated folder at the same path', async () => {
+ const { workspace, prepare } = setup()
+ const init = vi.fn(async () => 'initialized')
+ await prepare(workspace, { key: 'same' }, init, true)
+ rmSync(workspace, { recursive: true }); mkdirSync(workspace)
+ await prepare(workspace, { key: 'same' }, init, true)
+ expect(init).toHaveBeenCalledTimes(2)
+ })
+ it('refuses before writing when the resource or receipt directory cannot be trusted', async () => {
+ const { root, workspace, directory } = setup()
+ const run = vi.fn(async () => 'written')
+ await expect(dshPreparations(directory)(join(root, 'missing'), {}, run)).rejects.toThrow('cannot safely record')
+ mkdirSync(directory, { mode: 0o777 })
+ const { chmodSync } = await import('node:fs'); chmodSync(directory, 0o777)
+ await expect(dshPreparations(directory)(workspace, {}, run)).rejects.toThrow('cannot safely record')
+ expect(run).not.toHaveBeenCalled()
+ })
+})
diff --git a/cli/src/dsh/preparation.ts b/cli/src/dsh/preparation.ts
new file mode 100644
index 000000000..67c3f4f8d
--- /dev/null
+++ b/cli/src/dsh/preparation.ts
@@ -0,0 +1,84 @@
+/** A Store crash must not turn an uncertain workspace init into another execution. */
+import { randomUUID } from 'node:crypto'
+import { closeSync, constants, fsyncSync, openSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from 'node:fs'
+import { dirname, join } from 'node:path'
+import { creationFingerprint } from '../lib/agentCreationReceipt.js'
+import { readPrivateStateFile, secureStateDirectory } from '../lib/secureState.js'
+
+export class DshPreparationUnavailable extends Error {}
+export type PrepareDsh = <T>(workspace: string, input: unknown, run: () => Promise<T>, replay?: boolean) => Promise<T>
+
+/** The resource is the canonical workspace, independent of package, engine, agent and retry label.
+ * Reservations never expire. An init can outlive a killed Store and can have arbitrary external effects:
+ * only a confirmed outcome permits another operation, never the age or liveness of the Store process.
+ * These files belong to the daemon, outside the workspace; user files are never rolled back or deleted.
+ */
+export function dshPreparations(directory: string): PrepareDsh {
+ const active = new Map<string, { fingerprint: string; result: Promise<unknown> }>()
+ const uncertain = () => new DshPreparationUnavailable(
+ 'Previous workspace preparation is unconfirmed. This harness is held for review so its initialization is not run twice.')
+ const write = (file: string, value: unknown, exclusive = false): void => {
+ const temp = exclusive ? file : `${file}.${randomUUID()}.tmp`
+ let opened = false
+ try {
+ const fd = openSync(temp, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o600)
+ opened = true
+ try { writeFileSync(fd, JSON.stringify(value)); fsyncSync(fd) } finally { closeSync(fd) }
+ if (!exclusive) renameSync(temp, file)
+ const dir = openSync(dirname(file), constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW)
+ try { fsyncSync(dir) } finally { closeSync(dir) }
+ } finally {
+ if (!exclusive && opened) rmSync(temp, { force: true })
+ }
+ }
+ return async <T>(workspace: string, input: unknown, run: () => Promise<T>, replay = false): Promise<T> => {
+ let resource: string
+ let incarnation: string
+ try {
+ resource = creationFingerprint(realpathSync(workspace))
+ const stat = statSync(workspace, { bigint: true })
+ incarnation = `${stat.dev}:${stat.ino}:${stat.birthtimeNs}`
+ secureStateDirectory(directory)
+ }
+ catch { throw new DshPreparationUnavailable('The Store cannot safely record workspace preparation. This harness is held until its preparation records are accessible.') }
+ const fingerprint = creationFingerprint({ input, incarnation })
+ const running = active.get(resource)
+ if (running) {
+ if (running.fingerprint === fingerprint) return running.result as Promise<T>
+ throw new DshPreparationUnavailable('Another preparation is still running in this workspace. This harness waits for it to finish.')
+ }
+ const reservation = join(directory, `${resource}.pending`)
+ const receipt = join(directory, `${resource}-${fingerprint}.json`)
+ try { write(reservation, { version: 1, fingerprint, state: 'pending' }, true) }
+ catch { throw uncertain() }
+ const release = () => {
+ rmSync(reservation)
+ const dir = openSync(directory, constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW)
+ try { fsyncSync(dir) } finally { closeSync(dir) }
+ }
+ // Only workspace initialization reuses an outcome. Runtime preparation revalidates its current files
+ // and account on every launch, even if the package/runtime key did not change.
+ if (replay) {
+ try {
+ const saved = JSON.parse(readPrivateStateFile(receipt, 1024 * 1024))
+ if (saved.fingerprint !== fingerprint || saved.state !== 'complete') throw uncertain()
+ release()
+ return saved.answer as T
+ } catch (error) { if ((error as NodeJS.ErrnoException).code !== 'ENOENT') throw uncertain() }
+ }
+ const result = Promise.resolve().then(async () => {
+ let answer: T
+ try { answer = await run() }
+ catch { throw uncertain() }
+ // Persist the outcome before releasing the resource. If either write is uncertain, preserve the
+ // reservation: a new process must not infer that a stopped writer made no workspace changes.
+ try {
+ write(receipt, { version: 1, fingerprint, state: 'complete', answer })
+ release()
+ } catch { throw uncertain() }
+ return answer
+ }).finally(() => active.delete(resource))
+ active.set(resource, { fingerprint, result })
+ return result
+ }
+}
diff --git a/cli/src/dsh/runtime.spec.ts b/cli/src/dsh/runtime.spec.ts
index 9676308e2..d082ec304 100644
--- a/cli/src/dsh/runtime.spec.ts
+++ b/cli/src/dsh/runtime.spec.ts
@@ -9,7 +9,9 @@ import { buildLaunchOverrides } from '../lib/launchOverrides.js'
import type { InstalledDsh } from './installed.js'
import { HARNESS_ADAPTERS, HARNESS_BOOTSTRAP, harnessAdapter } from './adapters.js'
import { compatibleHarnessEngines } from './compatibility.js'
-import { forkRuntimeKey, harnessLaunchOrRefusal, harnessRuntimeDir, incompatibleHarnessEngine, migrateHarnessInstructions, prepareHarnessLaunch } from './runtime.js'
+import { incompatibleHarnessEngine } from './compatibility.js'
+import { storeLaunchPort } from '../services/storeLaunch.js'
+import { forkRuntimeKey, harnessRuntimeDir, migrateHarnessInstructions, prepareHarnessLaunch } from './runtime.js'
import { gridLaunchInProcess } from '../testing/gridLaunchInProcess.js'
let root: string
@@ -93,7 +95,7 @@ describe('session isolation and lifecycle', () => {
it('does not inherit the previous account private grid on a harness relaunch', async () => {
const result = await buildLaunchOverrides({ machine: () => ({ hermesSystemManaged: false }), gridLaunch: gridLaunchInProcess(),
writeGridConfigDir: async () => '/unused', tmuxSupportsSessionEnv: async () => true,
- installCodexHooks: () => {}, dshLaunch: () => prepareHarnessLaunch(pkg, ws, 'claude', 'new-account'),
+ installCodexHooks: () => {}, dshLaunch: async () => ({ ok: true, launch: prepareHarnessLaunch(pkg, ws, 'claude', 'new-account') }),
}, 'claude', { dsh: pkg.id, cwd: ws }, 'agent')
if (!result.ok) throw new Error(result.detail)
const [, , script] = buildEngineLaunchArgv('claude', { clearEnv: result.overrides.clearEnv }, '/bin/sh', undefined, undefined, null)
@@ -137,8 +139,8 @@ describe('session isolation and lifecycle', () => {
write(join(pkg.realDir, 'AGENTS.md'), '# Updated instructions\n')
const deps = { machine: () => ({ hermesSystemManaged: false }), gridLaunch: gridLaunchInProcess(), writeGridConfigDir: async () => '/cfg',
tmuxSupportsSessionEnv: async () => true, installCodexHooks: () => {},
- dshLaunch: (_id: string, workspace: string, engine: typeof PROCESS_ENGINES[number] | 'terminal', key: string) =>
- prepareHarnessLaunch(pkg, workspace, engine, key, { privateGrid: 'new-grid' }) }
+ dshLaunch: async (_id: string, workspace: string, engine: typeof PROCESS_ENGINES[number] | 'terminal', key: string) =>
+ ({ ok: true as const, launch: prepareHarnessLaunch(pkg, workspace, engine, key, { privateGrid: 'new-grid' }) }) }
const result = await buildLaunchOverrides(deps, 'claude', { dsh: pkg.id, cwd: ws, dshRuntime: 'original' }, 'registry-agent-id')
expect(result.ok && result.overrides.env.HARNESS_CONTEXT_FILE).toBe(first.env.HARNESS_CONTEXT_FILE)
expect(result.ok && result.overrides.env.HARNESS_PRIVATE_GRID).toBe('new-grid')
@@ -156,7 +158,7 @@ describe('session isolation and lifecycle', () => {
it('keeps older rows stable using their agent id and supports package renames', async () => {
const deps = { machine: () => ({ hermesSystemManaged: false }), gridLaunch: gridLaunchInProcess(), writeGridConfigDir: async () => '/cfg',
tmuxSupportsSessionEnv: async () => true, installCodexHooks: () => {},
- dshLaunch: (_id: string, workspace: string, engine: typeof PROCESS_ENGINES[number] | 'terminal', key: string) => prepareHarnessLaunch(pkg, workspace, engine, key) }
+ dshLaunch: async (_id: string, workspace: string, engine: typeof PROCESS_ENGINES[number] | 'terminal', key: string) => ({ ok: true as const, launch: prepareHarnessLaunch(pkg, workspace, engine, key) }) }
const first = await buildLaunchOverrides(deps, 'codex', { dsh: pkg.id, cwd: ws }, 'old-agent')
pkg.manifest.formerly = [pkg.id]
pkg.id = 'acme/drawing'
@@ -393,14 +395,13 @@ describe('create and fork decisions', () => {
expect(forkRuntimeKey({ ...source, dshRuntime: '' })).toBe('a1')
})
- it('turns a runtime that cannot be prepared into a refusal, never a throw', () => {
- const ok = harnessLaunchOrRefusal(() => prepareHarnessLaunch(pkg, ws, 'claude', 'k'))
- expect(ok.ok).toBe(true)
+ it('the Store turns a runtime that cannot be prepared into a refusal', async () => {
+ const store = storeLaunchPort(() => pkg)
+ const request = { dsh: pkg.id, workspace: ws, engine: 'claude' as const, key: 'k', account: {} }
+ expect((await store.dshLaunch(request)).ok).toBe(true)
rmSync(join(pkg.realDir, 'skills/draw/SKILL.md'))
- const refused = harnessLaunchOrRefusal(() => prepareHarnessLaunch(pkg, ws, 'claude', 'fresh'))
+ const refused = await store.dshLaunch({ ...request, key: 'fresh' })
expect(refused).toMatchObject({ ok: false, error: 'DSH_RUNTIME_FAILED' })
expect(refused.ok ? '' : refused.detail).not.toMatch(/^Error: /)
- expect(harnessLaunchOrRefusal(() => { throw 'a bare string' })).toEqual(
- { ok: false, error: 'DSH_RUNTIME_FAILED', detail: 'a bare string' })
})
})
diff --git a/cli/src/dsh/runtime.ts b/cli/src/dsh/runtime.ts
index 3381c838e..3950f0099 100644
--- a/cli/src/dsh/runtime.ts
+++ b/cli/src/dsh/runtime.ts
@@ -2,8 +2,8 @@
* Create snapshots instructions/env/argv; resume reads that snapshot; fork copies it under a new
* key. Toolchains and skill assets stay at their installed package paths, as in spec 1.
*/
-import { createHash } from 'node:crypto'
-import { existsSync, lstatSync, mkdirSync, readFileSync, readlinkSync, realpathSync, rmSync, symlinkSync, unlinkSync, writeFileSync } from 'node:fs'
+import { createHash, randomUUID } from 'node:crypto'
+import { closeSync, existsSync, fsyncSync, lstatSync, mkdirSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, rmSync, symlinkSync, unlinkSync, writeFileSync } from 'node:fs'
import { basename, join, resolve } from 'node:path'
import { z } from 'zod'
import { PROCESS_ENGINES, type AgentEngine } from '../engines/types.js'
@@ -11,7 +11,6 @@ import { instructionFileOf, launchContract } from '../engines/launches.js'
import { HARNESS_BOOTSTRAP, harnessAdapter } from './adapters.js'
import { installedDsh, type InstalledDsh } from './installed.js'
import { dshAccountEnv, dshLaunch, type DshAccount, type DshLaunch } from './launch.js'
-import { compatibleHarnessEngines } from './compatibility.js'
import { skillDirsIn } from './materialize.js'
const Snapshot = z.object({
@@ -49,7 +48,14 @@ function isLink(path: string): boolean {
function writeManagedFile(path: string, body: string): void {
if (isLink(path)) throw new Error(`Refusing to replace a symlink: ${path}`)
- writeFileSync(path, body, { mode: 0o600 })
+ // A killed Store must never truncate the context an already-running agent is reading.
+ const temporary = `${path}.${randomUUID()}.tmp`
+ const mode = existsSync(path) ? lstatSync(path).mode & 0o777 : 0o600
+ const fd = openSync(temporary, 'wx', mode)
+ try {
+ try { writeFileSync(fd, body); fsyncSync(fd) } finally { closeSync(fd) }
+ renameSync(temporary, path)
+ } finally { rmSync(temporary, { force: true }) }
}
/** Older versions appended a marker without an end marker. Remove only text that exactly matches
@@ -137,15 +143,6 @@ function snapshot(dsh: InstalledDsh, workspace: string, engine: AgentEngine): Ru
* Why `engine` cannot run the harness `id`, or null when it can. The words are what a refused
* create says, so they name what WOULD work rather than only what was wrong.
*/
-export function incompatibleHarnessEngine(id: string, manifest: { kind?: string; engine?: AgentEngine },
- engine: AgentEngine): string | null {
- const supported = compatibleHarnessEngines(manifest)
- if (supported.includes(engine)) return null
- return supported.length
- ? `${id} supports ${supported.join(', ')}; ${engine} is not compatible`
- : `${id} cannot run as an agent`
-}
-
/**
* The runtime bundle a fork copies. A session records its key when it is created; one created
* before keys were recorded still has a bundle under its agent id if it ran on this version, and
@@ -156,20 +153,6 @@ export function forkRuntimeKey(source: { cwd: string; agentId: string; dshRuntim
return existsSync(join(harnessRuntimeDir(source.cwd, source.agentId), 'runtime.json')) ? source.agentId : null
}
-/**
- * `prepare`, refused rather than thrown. A runtime that cannot be prepared — a missing skill, a
- * corrupt snapshot, an occupied path — has to fail the one create or fork that asked for it, never
- * the daemon that is serving every other session.
- */
-export function harnessLaunchOrRefusal(prepare: () => DshLaunch):
- { ok: true; launch: DshLaunch } | { ok: false; error: 'DSH_RUNTIME_FAILED'; detail: string } {
- try {
- return { ok: true, launch: prepare() }
- } catch (error) {
- return { ok: false, error: 'DSH_RUNTIME_FAILED', detail: error instanceof Error ? error.message : String(error) }
- }
-}
-
export function prepareHarnessLaunch(dsh: InstalledDsh, workspace: string, engine: AgentEngine,
key: string, account: DshAccount = {}, sourceKey?: string | null): DshLaunch {
const adapter = harnessAdapter(engine)
diff --git a/cli/src/engines/__fixtures__/dsh-launch-shapes.golden.json b/cli/src/engines/__fixtures__/dsh-launch-shapes.golden.json
new file mode 100644
index 000000000..7ea62107f
--- /dev/null
+++ b/cli/src/engines/__fixtures__/dsh-launch-shapes.golden.json
@@ -0,0 +1,140 @@
+{
+"create": {
+ "claude · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w1","claude","--add-dir","<root>/work/w1/input","--append-system-prompt","Read the harness context at \"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"12e153592bb8a342","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w1","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w1","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w1"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w1\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w1\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w1/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w1/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w1/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w1\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w1 · created 1 · kept 0"]},
+ "codex · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w2","codex","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/draw\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/draw\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w2\"","-c","shell_environment_policy.set.TOOLCHAIN=\"<root>/dsh/acme/draw/tools\"","-c","shell_environment_policy.set.OLD_SKILLS=\"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.OTHER_SKILLS=\"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"34bd8c352b3e8fae","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w2","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","OTHER_SKILLS":"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","HARNESS_CONTEXT_FILE":"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"acme/draw","dshRuntime":"harness-codex-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w2","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w2"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: codex. Workspace: \"<root>/work/w2\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"codex\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w2\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w2/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w2/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"600","text":"model = \"gpt-5\"\n\n[projects.\"<root>/work/w2\"]\ntrust_level = \"trusted\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w2 · created 1 · kept 0"]},
+ "cursor · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w3","cursor-agent"],"script":"0fe0c7d64d4feca8","sessionLabel":"harness-cursor-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w3","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills","OTHER_SKILLS":"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills","HARNESS_CONTEXT_FILE":"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills"},"dsh":"acme/draw","dshRuntime":"harness-cursor-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w3","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w3"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: cursor. Workspace: \"<root>/work/w3\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"cursor\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w3\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w3/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w3/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w3 · created 1 · kept 0"]},
+ "opencode · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w4","opencode"],"script":"7c8185a3831b7ef9","sessionLabel":"harness-opencode-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w4","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","OTHER_SKILLS":"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","HARNESS_CONTEXT_FILE":"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","OPENCODE_CONFIG_CONTENT":"{\"permission\":\"ask\",\"model\":\"opencode/muse-spark-1.3-contributor-free\",\"small_model\":\"opencode/muse-spark-1.3-contributor-free\",\"provider\":{\"opencode\":{\"models\":{\"muse-spark-1.3-contributor-free\":{\"options\":{\"reasoningEffort\":\"xhigh\"}}}}},\"agent\":{\"build\":{\"model\":\"opencode/muse-spark-1.3-contributor-free\",\"variant\":\"xhigh\"},\"plan\":{\"model\":\"opencode/muse-spark-1.3-contributor-free\",\"variant\":\"xhigh\"}}}"},"dsh":"acme/draw","dshRuntime":"harness-opencode-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w4","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w4"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: opencode. Workspace: \"<root>/work/w4\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"opencode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w4\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w4/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w4/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w4 · created 1 · kept 0"]},
+ "pi · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w5","pi","--append-system-prompt","<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/CONTEXT.md"],"script":"db977b46dbec10f2","sessionLabel":"harness-pi-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w5","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills","OTHER_SKILLS":"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills","HARNESS_CONTEXT_FILE":"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills"},"dsh":"acme/draw","dshRuntime":"harness-pi-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w5","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w5"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: pi. Workspace: \"<root>/work/w5\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"pi\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w5\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w5/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w5/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w5 · created 1 · kept 0"]},
+ "hermes · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w6","hermes"],"script":"7ffd6bcc2ef01772","sessionLabel":"harness-hermes-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w6","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills","OTHER_SKILLS":"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills","HARNESS_CONTEXT_FILE":"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills"},"dsh":"acme/draw","dshRuntime":"harness-hermes-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w6","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w6"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: hermes. Workspace: \"<root>/work/w6\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"hermes\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w6\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w6/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w6/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w6 · created 1 · kept 0"]},
+ "commandcode · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w7","cmd"],"script":"ef0f56644cefde2a","sessionLabel":"harness-commandcode-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w7","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills","OTHER_SKILLS":"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills","HARNESS_CONTEXT_FILE":"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills"},"dsh":"acme/draw","dshRuntime":"harness-commandcode-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w7","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w7"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: commandcode. Workspace: \"<root>/work/w7\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"commandcode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w7\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w7/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w7/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w7 · created 1 · kept 0"]},
+ "devin · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w8","devin"],"script":"863b0decdcb073ef","sessionLabel":"harness-devin-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w8","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills","OTHER_SKILLS":"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills","HARNESS_CONTEXT_FILE":"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills"},"dsh":"acme/draw","dshRuntime":"harness-devin-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w8","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w8"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: devin. Workspace: \"<root>/work/w8\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"devin\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w8\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w8/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w8/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w8 · created 1 · kept 0"]},
+ "muse · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w9","muse"],"script":"00e21e210d7ae5ce","sessionLabel":"harness-muse-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w9","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills","OTHER_SKILLS":"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills","HARNESS_CONTEXT_FILE":"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills"},"dsh":"acme/draw","dshRuntime":"harness-muse-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w9","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w9"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: muse. Workspace: \"<root>/work/w9\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"muse\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w9\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w9/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w9/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w9 · created 1 · kept 0"]},
+ "amp · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w10","amp"],"script":"5185380a771b24dc","sessionLabel":"harness-amp-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w10","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills","OTHER_SKILLS":"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills","HARNESS_CONTEXT_FILE":"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills"},"dsh":"acme/draw","dshRuntime":"harness-amp-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w10","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w10"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: amp. Workspace: \"<root>/work/w10\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"amp\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w10\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w10/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w10/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w10 · created 1 · kept 0"]},
+ "kilo · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w11","kilo"],"script":"1b9d410a2033ba68","sessionLabel":"harness-kilo-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w11","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills","OTHER_SKILLS":"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills","HARNESS_CONTEXT_FILE":"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills"},"dsh":"acme/draw","dshRuntime":"harness-kilo-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w11","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w11"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: kilo. Workspace: \"<root>/work/w11\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"kilo\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w11\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w11/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w11/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w11 · created 1 · kept 0"]},
+ "grok · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w12","grok"],"script":"e69844b477ba7a81","sessionLabel":"harness-grok-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w12","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills","OTHER_SKILLS":"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills","HARNESS_CONTEXT_FILE":"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills"},"dsh":"acme/draw","dshRuntime":"harness-grok-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w12","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w12"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: grok. Workspace: \"<root>/work/w12\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"grok\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w12\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w12/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w12/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w12 · created 1 · kept 0"]},
+ "agy · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w13","agy"],"script":"b685653e2043af30","sessionLabel":"harness-agy-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w13","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills","OTHER_SKILLS":"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills","HARNESS_CONTEXT_FILE":"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills"},"dsh":"acme/draw","dshRuntime":"harness-agy-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w13","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w13"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: agy. Workspace: \"<root>/work/w13\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"agy\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w13\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w13/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w13/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w13 · created 1 · kept 0"]},
+ "copilot · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w14","copilot"],"script":"4b832fb5464ffac2","sessionLabel":"harness-copilot-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w14","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills","OTHER_SKILLS":"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills","HARNESS_CONTEXT_FILE":"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills"},"dsh":"acme/draw","dshRuntime":"harness-copilot-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w14","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w14"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: copilot. Workspace: \"<root>/work/w14\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"copilot\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w14\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w14/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w14/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w14 · created 1 · kept 0"]},
+ "claude · a folder with work in it": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w15","claude","--add-dir","<root>/work/w15/input","--append-system-prompt","Read the harness context at \"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"12e153592bb8a342","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w15","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w15","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w15"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w15\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w15\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w15/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w15/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w15/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"644","text":"# My rules\n\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# Mine\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w15 · created 1 · kept 0"]},
+ "codex · a folder already laid out": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w16","codex","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/draw\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/draw\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w16\"","-c","shell_environment_policy.set.TOOLCHAIN=\"<root>/dsh/acme/draw/tools\"","-c","shell_environment_policy.set.OLD_SKILLS=\"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.OTHER_SKILLS=\"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"34bd8c352b3e8fae","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w16","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","OTHER_SKILLS":"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","HARNESS_CONTEXT_FILE":"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"acme/draw","dshRuntime":"harness-codex-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: codex. Workspace: \"<root>/work/w16\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"codex\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w16\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w16/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w16/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"644","text":"# Ours\n\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w16 · created 0 · kept 1"]},
+ "codex · a package with nothing but an engine": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w17","codex","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/bare\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/bare\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w17\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w17/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w17/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"34bd8c352b3e8fae","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"acme/bare","HARNESS_DSH_DIR":"<root>/dsh/acme/bare","HARNESS_WORKSPACE":"<root>/work/w17","HARNESS_CONTEXT_FILE":"<root>/work/w17/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w17/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"acme/bare","dshRuntime":"harness-codex-golden","label":"Bare","permissionMode":null,"bypassPermission":false,"grid":null},"init":[],"gridSetup":[],"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Bare (acme/bare)\nEngine: codex. Workspace: \"<root>/work/w17\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n\n\n## Harness skills\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/bare\",\n \"engine\": \"codex\",\n \"instructions\": \"\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/bare\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/bare\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w17\"\n },\n \"args\": [],\n \"skills\": []\n}\n"},"skills":{"dir":{}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/bare materialized <root>/work/w17 · created 0 · kept 0"]},
+ "claude · the account's private grid": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w18","claude","--add-dir","<root>/work/w18/input","--append-system-prompt","Read the harness context at \"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"4f39e14be3336b02","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w18","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_PRIVATE_GRID":"grid-of-mine","HARNESS_CONTEXT_FILE":"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w18","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w18","HARNESS_PRIVATE_GRID":"grid-of-mine"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w18\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w18\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w18/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w18/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w18/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w18\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w18 · created 1 · kept 0"]},
+ "claude · on a grid too": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w19","claude","--disallowedTools=WebSearch,WebFetch","--system-prompt-snapshot","off","--append-system-prompt","This session has no web tools. The built-in `WebSearch` and `WebFetch` tools are not available in this session, even where earlier turns of this conversation used them — do not call them; tell the user the web cannot be searched or read from here instead.","--add-dir","<root>/work/w19/input","--append-system-prompt","Read the harness context at \"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"f78a73b923aec9c8","sessionLabel":"harness-claude-golden","env":{"ANTHROPIC_BASE_URL":"https://grid.example/g/home/relay","ANTHROPIC_AUTH_TOKEN":"grid-key-1","ANTHROPIC_MODEL":"qwen3-coder","HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w19","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":{"baseUrl":"https://grid.example/g/home/relay/v1","model":"qwen3-coder"}},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w19","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w19"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w19\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w19\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w19/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w19/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w19/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w19\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w19 · created 1 · kept 0","[grid] claude -> Home (net-home) · qwen3-coder · web search unavailable"]},
+ "codex · the Model Manager": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w20","codex","-c","shell_environment_policy.set.HARNESS_DSH=\"autonomous/autonomous-grid\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/autonomous/autonomous-grid\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w20\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w20/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w20/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"34bd8c352b3e8fae","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"autonomous/autonomous-grid","HARNESS_DSH_DIR":"<root>/dsh/autonomous/autonomous-grid","HARNESS_WORKSPACE":"<root>/work/w20","HARNESS_CONTEXT_FILE":"<root>/work/w20/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w20/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"autonomous/autonomous-grid","dshRuntime":"harness-codex-golden","label":"Grid","permissionMode":null,"bypassPermission":false,"grid":null},"init":[],"gridSetup":["ensure ownGrid=true"],"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Grid (autonomous/autonomous-grid)\nEngine: codex. Workspace: \"<root>/work/w20\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Grid\n\n## Harness skills\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"autonomous/autonomous-grid\",\n \"engine\": \"codex\",\n \"instructions\": \"# Grid\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"autonomous/autonomous-grid\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/autonomous/autonomous-grid\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w20\"\n },\n \"args\": [],\n \"skills\": []\n}\n"},"skills":{"dir":{}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] autonomous/autonomous-grid materialized <root>/work/w20 · created 0 · kept 0"]},
+ "claude · an init that fails": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w21","claude","--add-dir","<root>/work/w21/input","--append-system-prompt","Read the harness context at \"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"12e153592bb8a342","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w21","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w21","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w21"},"timeoutMs":300000}],"gridSetup":[],"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w21\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w21\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w21/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w21/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w21/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w21\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialize · init exited 2","[dsh] acme/draw materialized <root>/work/w21 · created 1 · kept 0"]},
+ "claude · an init that runs out of time": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w22","claude","--add-dir","<root>/work/w22/input","--append-system-prompt","Read the harness context at \"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"12e153592bb8a342","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w22","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w22","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w22"},"timeoutMs":300000}],"gridSetup":[],"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w22\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w22\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w22/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w22/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w22/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w22\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialize · init exited by timeout","[dsh] acme/draw materialized <root>/work/w22 · created 1 · kept 0"]},
+ "claude · a skill folder with no skill": {"result":{"ok":false,"error":"DSH_RUNTIME_FAILED","detail":"No SKILL.md under <root>/dsh/acme/broken/nothing-here; repair the harness installation."},"pane":null,"init":[],"gridSetup":[],"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{}}}}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/broken materialized <root>/work/w23 · created 0 · kept 0"]},
+ "claude · a viewer package": {"result":{"ok":false,"error":"INVALID_DSH","detail":"acme/viewer is a viewer package, not an agent"},"pane":null,"init":[],"gridSetup":[],"folder":{},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":[]},
+ "claude · a package not installed": {"result":{"ok":false,"error":"INVALID_DSH","detail":"acme/missing is not installed on this machine"},"pane":null,"init":[],"gridSetup":[],"folder":{},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":[]},
+ "terminal · a harness": {"result":{"ok":false,"error":"INVALID_DSH","detail":"acme/draw supports claude, codex, cursor, opencode, pi, hermes, commandcode, devin, muse, amp, kilo, grok, agy, copilot; terminal is not compatible"},"pane":null,"init":[],"gridSetup":[],"folder":{},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":[]},
+ "claude · an old tmux": {"result":{"ok":false,"error":"TMUX_TOO_OLD_FOR_DSH","detail":"this machine's tmux is older than 3.2, which is the first version that can give a new session its own environment — so Drawing could not tell claude which harness it is. Upgrade tmux."},"pane":null,"init":[],"gridSetup":[],"folder":{},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[agent] create acme/draw refused · this machine's tmux is older than 3.2, which is the first version that can give a new session its own environment — so Drawing could not tell claude which harness it is. Upgrade tmux."]}
+},
+"relaunch": {
+ "claude · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w28","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w28/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills","OTHER_SKILLS":"<root>/work/w28/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills","HARNESS_CONTEXT_FILE":"<root>/work/w28/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w28/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills"},"extraArgs":["--add-dir","<root>/work/w28/input","--append-system-prompt","Read the harness context at \"<root>/work/w28/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md\" before working."],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w28\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w28/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w28/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w28\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w28/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w28/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w28/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "codex · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w29","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills","OTHER_SKILLS":"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills","HARNESS_CONTEXT_FILE":"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills"},"extraArgs":["-c","model_provider=\"openai\"","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/draw\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/draw\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w29\"","-c","shell_environment_policy.set.TOOLCHAIN=\"<root>/dsh/acme/draw/tools\"","-c","shell_environment_policy.set.OLD_SKILLS=\"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills\"","-c","shell_environment_policy.set.OTHER_SKILLS=\"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills\""],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: codex. Workspace: \"<root>/work/w29\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w29/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"codex\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w29\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w29/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w29/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "cursor · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w30","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w30/.harness/runtime/f561e1f77a40b020cde2f1d7e4d82e588e86e0e081ee7cd8aae96000894e410b/skills","OTHER_SKILLS":"<root>/work/w30/.harness/runtime/f561e1f77a40b020cde2f1d7e4d82e588e86e0e081ee7cd8aae96000894e410b/skills","HARNESS_CONTEXT_FILE":"<root>/work/w30/.harness/runtime/f561e1f77a40b020cde2f1d7e4d82e588e86e0e081ee7cd8aae96000894e410b/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w30/.harness/runtime/f561e1f77a40b020cde2f1d7e4d82e588e86e0e081ee7cd8aae96000894e410b/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"f561e1f77a40b020cde2f1d7e4d82e588e86e0e081ee7cd8aae96000894e410b":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: cursor. Workspace: \"<root>/work/w30\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w30/.harness/runtime/f561e1f77a40b020cde2f1d7e4d82e588e86e0e081ee7cd8aae96000894e410b/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w30/.harness/runtime/f561e1f77a40b020cde2f1d7e4d82e588e86e0e081ee7cd8aae96000894e410b/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"cursor\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w30\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w30/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w30/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "opencode · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w31","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w31/.harness/runtime/4cdc33e93e07a3b3594ad8d55f0bf893e589d3beff3ccf8c3abc8c9b053b5564/skills","OTHER_SKILLS":"<root>/work/w31/.harness/runtime/4cdc33e93e07a3b3594ad8d55f0bf893e589d3beff3ccf8c3abc8c9b053b5564/skills","HARNESS_CONTEXT_FILE":"<root>/work/w31/.harness/runtime/4cdc33e93e07a3b3594ad8d55f0bf893e589d3beff3ccf8c3abc8c9b053b5564/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w31/.harness/runtime/4cdc33e93e07a3b3594ad8d55f0bf893e589d3beff3ccf8c3abc8c9b053b5564/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"4cdc33e93e07a3b3594ad8d55f0bf893e589d3beff3ccf8c3abc8c9b053b5564":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: opencode. Workspace: \"<root>/work/w31\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w31/.harness/runtime/4cdc33e93e07a3b3594ad8d55f0bf893e589d3beff3ccf8c3abc8c9b053b5564/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w31/.harness/runtime/4cdc33e93e07a3b3594ad8d55f0bf893e589d3beff3ccf8c3abc8c9b053b5564/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"opencode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w31\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w31/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w31/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "pi · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w32","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w32/.harness/runtime/b4d403b95a1e3e79f7dcb27021157c740bb0f4a7249c18c77f742e09e1151964/skills","OTHER_SKILLS":"<root>/work/w32/.harness/runtime/b4d403b95a1e3e79f7dcb27021157c740bb0f4a7249c18c77f742e09e1151964/skills","HARNESS_CONTEXT_FILE":"<root>/work/w32/.harness/runtime/b4d403b95a1e3e79f7dcb27021157c740bb0f4a7249c18c77f742e09e1151964/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w32/.harness/runtime/b4d403b95a1e3e79f7dcb27021157c740bb0f4a7249c18c77f742e09e1151964/skills"},"extraArgs":["--append-system-prompt","<root>/work/w32/.harness/runtime/b4d403b95a1e3e79f7dcb27021157c740bb0f4a7249c18c77f742e09e1151964/CONTEXT.md"],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b4d403b95a1e3e79f7dcb27021157c740bb0f4a7249c18c77f742e09e1151964":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: pi. Workspace: \"<root>/work/w32\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w32/.harness/runtime/b4d403b95a1e3e79f7dcb27021157c740bb0f4a7249c18c77f742e09e1151964/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w32/.harness/runtime/b4d403b95a1e3e79f7dcb27021157c740bb0f4a7249c18c77f742e09e1151964/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"pi\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w32\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w32/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w32/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "hermes · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w33","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w33/.harness/runtime/5de6714a794f53154333e0b1146eadfd82318d3e0cee5063f6be50d776ef3a21/skills","OTHER_SKILLS":"<root>/work/w33/.harness/runtime/5de6714a794f53154333e0b1146eadfd82318d3e0cee5063f6be50d776ef3a21/skills","HARNESS_CONTEXT_FILE":"<root>/work/w33/.harness/runtime/5de6714a794f53154333e0b1146eadfd82318d3e0cee5063f6be50d776ef3a21/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w33/.harness/runtime/5de6714a794f53154333e0b1146eadfd82318d3e0cee5063f6be50d776ef3a21/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"5de6714a794f53154333e0b1146eadfd82318d3e0cee5063f6be50d776ef3a21":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: hermes. Workspace: \"<root>/work/w33\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w33/.harness/runtime/5de6714a794f53154333e0b1146eadfd82318d3e0cee5063f6be50d776ef3a21/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w33/.harness/runtime/5de6714a794f53154333e0b1146eadfd82318d3e0cee5063f6be50d776ef3a21/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"hermes\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w33\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w33/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w33/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "commandcode · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w34","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w34/.harness/runtime/315d42f0aca6aa4ae30c0f04983c2d19b78d0afcfe2ee678c83acfa4f263a74a/skills","OTHER_SKILLS":"<root>/work/w34/.harness/runtime/315d42f0aca6aa4ae30c0f04983c2d19b78d0afcfe2ee678c83acfa4f263a74a/skills","HARNESS_CONTEXT_FILE":"<root>/work/w34/.harness/runtime/315d42f0aca6aa4ae30c0f04983c2d19b78d0afcfe2ee678c83acfa4f263a74a/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w34/.harness/runtime/315d42f0aca6aa4ae30c0f04983c2d19b78d0afcfe2ee678c83acfa4f263a74a/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"315d42f0aca6aa4ae30c0f04983c2d19b78d0afcfe2ee678c83acfa4f263a74a":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: commandcode. Workspace: \"<root>/work/w34\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w34/.harness/runtime/315d42f0aca6aa4ae30c0f04983c2d19b78d0afcfe2ee678c83acfa4f263a74a/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w34/.harness/runtime/315d42f0aca6aa4ae30c0f04983c2d19b78d0afcfe2ee678c83acfa4f263a74a/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"commandcode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w34\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w34/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w34/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "devin · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w35","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w35/.harness/runtime/de455f341c338c5fd85ed388f27fb72c3d83ebf7237aca52c9bdb8c0c1c8e418/skills","OTHER_SKILLS":"<root>/work/w35/.harness/runtime/de455f341c338c5fd85ed388f27fb72c3d83ebf7237aca52c9bdb8c0c1c8e418/skills","HARNESS_CONTEXT_FILE":"<root>/work/w35/.harness/runtime/de455f341c338c5fd85ed388f27fb72c3d83ebf7237aca52c9bdb8c0c1c8e418/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w35/.harness/runtime/de455f341c338c5fd85ed388f27fb72c3d83ebf7237aca52c9bdb8c0c1c8e418/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"de455f341c338c5fd85ed388f27fb72c3d83ebf7237aca52c9bdb8c0c1c8e418":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: devin. Workspace: \"<root>/work/w35\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w35/.harness/runtime/de455f341c338c5fd85ed388f27fb72c3d83ebf7237aca52c9bdb8c0c1c8e418/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w35/.harness/runtime/de455f341c338c5fd85ed388f27fb72c3d83ebf7237aca52c9bdb8c0c1c8e418/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"devin\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w35\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w35/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w35/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "muse · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w36","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w36/.harness/runtime/f770b8252cab6f618d3e753aed59ba5d27498464ceba75ed78689af0ec8d9d12/skills","OTHER_SKILLS":"<root>/work/w36/.harness/runtime/f770b8252cab6f618d3e753aed59ba5d27498464ceba75ed78689af0ec8d9d12/skills","HARNESS_CONTEXT_FILE":"<root>/work/w36/.harness/runtime/f770b8252cab6f618d3e753aed59ba5d27498464ceba75ed78689af0ec8d9d12/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w36/.harness/runtime/f770b8252cab6f618d3e753aed59ba5d27498464ceba75ed78689af0ec8d9d12/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"f770b8252cab6f618d3e753aed59ba5d27498464ceba75ed78689af0ec8d9d12":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: muse. Workspace: \"<root>/work/w36\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w36/.harness/runtime/f770b8252cab6f618d3e753aed59ba5d27498464ceba75ed78689af0ec8d9d12/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w36/.harness/runtime/f770b8252cab6f618d3e753aed59ba5d27498464ceba75ed78689af0ec8d9d12/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"muse\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w36\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w36/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w36/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "amp · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w37","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w37/.harness/runtime/8d966a2c145e69aa854a3679fff8ef3d4ea75002354c12f84b9b5002c1d92231/skills","OTHER_SKILLS":"<root>/work/w37/.harness/runtime/8d966a2c145e69aa854a3679fff8ef3d4ea75002354c12f84b9b5002c1d92231/skills","HARNESS_CONTEXT_FILE":"<root>/work/w37/.harness/runtime/8d966a2c145e69aa854a3679fff8ef3d4ea75002354c12f84b9b5002c1d92231/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w37/.harness/runtime/8d966a2c145e69aa854a3679fff8ef3d4ea75002354c12f84b9b5002c1d92231/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"8d966a2c145e69aa854a3679fff8ef3d4ea75002354c12f84b9b5002c1d92231":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: amp. Workspace: \"<root>/work/w37\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w37/.harness/runtime/8d966a2c145e69aa854a3679fff8ef3d4ea75002354c12f84b9b5002c1d92231/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w37/.harness/runtime/8d966a2c145e69aa854a3679fff8ef3d4ea75002354c12f84b9b5002c1d92231/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"amp\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w37\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w37/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w37/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "kilo · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w38","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w38/.harness/runtime/e1f73fc9cc665e8f6fd7cc27680502bb360d2193f0adf3d838649c89b229056e/skills","OTHER_SKILLS":"<root>/work/w38/.harness/runtime/e1f73fc9cc665e8f6fd7cc27680502bb360d2193f0adf3d838649c89b229056e/skills","HARNESS_CONTEXT_FILE":"<root>/work/w38/.harness/runtime/e1f73fc9cc665e8f6fd7cc27680502bb360d2193f0adf3d838649c89b229056e/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w38/.harness/runtime/e1f73fc9cc665e8f6fd7cc27680502bb360d2193f0adf3d838649c89b229056e/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"e1f73fc9cc665e8f6fd7cc27680502bb360d2193f0adf3d838649c89b229056e":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: kilo. Workspace: \"<root>/work/w38\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w38/.harness/runtime/e1f73fc9cc665e8f6fd7cc27680502bb360d2193f0adf3d838649c89b229056e/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w38/.harness/runtime/e1f73fc9cc665e8f6fd7cc27680502bb360d2193f0adf3d838649c89b229056e/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"kilo\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w38\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w38/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w38/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "grok · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w39","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w39/.harness/runtime/2fd14a8ac18ac048a9f1cb43300b3182a27d16dd9befc5db093de001d1f6406b/skills","OTHER_SKILLS":"<root>/work/w39/.harness/runtime/2fd14a8ac18ac048a9f1cb43300b3182a27d16dd9befc5db093de001d1f6406b/skills","HARNESS_CONTEXT_FILE":"<root>/work/w39/.harness/runtime/2fd14a8ac18ac048a9f1cb43300b3182a27d16dd9befc5db093de001d1f6406b/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w39/.harness/runtime/2fd14a8ac18ac048a9f1cb43300b3182a27d16dd9befc5db093de001d1f6406b/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"2fd14a8ac18ac048a9f1cb43300b3182a27d16dd9befc5db093de001d1f6406b":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: grok. Workspace: \"<root>/work/w39\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w39/.harness/runtime/2fd14a8ac18ac048a9f1cb43300b3182a27d16dd9befc5db093de001d1f6406b/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w39/.harness/runtime/2fd14a8ac18ac048a9f1cb43300b3182a27d16dd9befc5db093de001d1f6406b/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"grok\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w39\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w39/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w39/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "agy · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w40","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w40/.harness/runtime/6da00afb140bae88243685a25960d49770e082fcef0fc5441ab24307d7a5343a/skills","OTHER_SKILLS":"<root>/work/w40/.harness/runtime/6da00afb140bae88243685a25960d49770e082fcef0fc5441ab24307d7a5343a/skills","HARNESS_CONTEXT_FILE":"<root>/work/w40/.harness/runtime/6da00afb140bae88243685a25960d49770e082fcef0fc5441ab24307d7a5343a/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w40/.harness/runtime/6da00afb140bae88243685a25960d49770e082fcef0fc5441ab24307d7a5343a/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"6da00afb140bae88243685a25960d49770e082fcef0fc5441ab24307d7a5343a":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: agy. Workspace: \"<root>/work/w40\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w40/.harness/runtime/6da00afb140bae88243685a25960d49770e082fcef0fc5441ab24307d7a5343a/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w40/.harness/runtime/6da00afb140bae88243685a25960d49770e082fcef0fc5441ab24307d7a5343a/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"agy\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w40\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w40/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w40/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "copilot · restart a harness agent": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w41","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w41/.harness/runtime/166641b9365407905d2bcc20c58056b69c94a181a2b58082b2da41c91353644c/skills","OTHER_SKILLS":"<root>/work/w41/.harness/runtime/166641b9365407905d2bcc20c58056b69c94a181a2b58082b2da41c91353644c/skills","HARNESS_CONTEXT_FILE":"<root>/work/w41/.harness/runtime/166641b9365407905d2bcc20c58056b69c94a181a2b58082b2da41c91353644c/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w41/.harness/runtime/166641b9365407905d2bcc20c58056b69c94a181a2b58082b2da41c91353644c/skills"},"extraArgs":[],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"166641b9365407905d2bcc20c58056b69c94a181a2b58082b2da41c91353644c":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: copilot. Workspace: \"<root>/work/w41\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w41/.harness/runtime/166641b9365407905d2bcc20c58056b69c94a181a2b58082b2da41c91353644c/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w41/.harness/runtime/166641b9365407905d2bcc20c58056b69c94a181a2b58082b2da41c91353644c/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"copilot\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w41\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w41/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w41/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · restart after the package changed": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w42","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w42/.harness/runtime/e45e5b1cbfe4a35d3e687d80e33ce802781dce7b1aa4cd4d9d8c6ccdaf86b200/skills","OTHER_SKILLS":"<root>/work/w42/.harness/runtime/e45e5b1cbfe4a35d3e687d80e33ce802781dce7b1aa4cd4d9d8c6ccdaf86b200/skills","HARNESS_CONTEXT_FILE":"<root>/work/w42/.harness/runtime/e45e5b1cbfe4a35d3e687d80e33ce802781dce7b1aa4cd4d9d8c6ccdaf86b200/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w42/.harness/runtime/e45e5b1cbfe4a35d3e687d80e33ce802781dce7b1aa4cd4d9d8c6ccdaf86b200/skills"},"extraArgs":["--add-dir","<root>/work/w42/input","--append-system-prompt","Read the harness context at \"<root>/work/w42/.harness/runtime/e45e5b1cbfe4a35d3e687d80e33ce802781dce7b1aa4cd4d9d8c6ccdaf86b200/CONTEXT.md\" before working."],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"e45e5b1cbfe4a35d3e687d80e33ce802781dce7b1aa4cd4d9d8c6ccdaf86b200":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w42\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w42/.harness/runtime/e45e5b1cbfe4a35d3e687d80e33ce802781dce7b1aa4cd4d9d8c6ccdaf86b200/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w42/.harness/runtime/e45e5b1cbfe4a35d3e687d80e33ce802781dce7b1aa4cd4d9d8c6ccdaf86b200/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w42\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w42/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w42/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w42/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · the account's private grid": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w43","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w43/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills","OTHER_SKILLS":"<root>/work/w43/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills","HARNESS_PRIVATE_GRID":"grid-of-mine","HARNESS_CONTEXT_FILE":"<root>/work/w43/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w43/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills"},"extraArgs":["--add-dir","<root>/work/w43/input","--append-system-prompt","Read the harness context at \"<root>/work/w43/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md\" before working."],"clearEnv":[]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w43\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w43/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w43/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w43\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w43/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w43/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w43/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · on a grid too": {"result":{"ok":true,"overrides":{"env":{"ANTHROPIC_BASE_URL":"https://grid.example/g/home/relay","ANTHROPIC_AUTH_TOKEN":"grid-key-1","ANTHROPIC_MODEL":"qwen3-coder","HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w44","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w44/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills","OTHER_SKILLS":"<root>/work/w44/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills","HARNESS_CONTEXT_FILE":"<root>/work/w44/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w44/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills"},"extraArgs":["--disallowedTools=WebSearch,WebFetch","--system-prompt-snapshot","off","--append-system-prompt","This session has no web tools. The built-in `WebSearch` and `WebFetch` tools are not available in this session, even where earlier turns of this conversation used them — do not call them; tell the user the web cannot be searched or read from here instead.","--add-dir","<root>/work/w44/input","--append-system-prompt","Read the harness context at \"<root>/work/w44/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md\" before working."],"clearEnv":["ANTHROPIC_API_KEY","OPENAI_API_KEY","OPENAI_BASE_URL","XAI_API_KEY","GROK_MODELS_BASE_URL","COPILOT_PROVIDER_API_KEY","COPILOT_PROVIDER_BASE_URL","COPILOT_MODEL","HERMES_INFERENCE_MODEL","GRID_API_KEY","GRID_MCP_AUTHORIZATION","HERMES_MANAGED_DIR","GROK_HOME","HARNESS_PRIVATE_GRID"],"gridLaunchRecord":{"override":{"networkId":"net-home","networkName":"Home","baseUrl":"https://grid.example/g/home/relay/v1","apiKey":"grid-key-1","model":"qwen3-coder"},"webSearch":"unavailable"}}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w44\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w44/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w44/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w44\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w44/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w44/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w44/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · a package that was renamed": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/renamed","HARNESS_DSH_DIR":"<root>/dsh/acme/renamed","HARNESS_WORKSPACE":"<root>/work/w45","HARNESS_CONTEXT_FILE":"<root>/work/w45/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w45/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills"},"extraArgs":["--append-system-prompt","Read the harness context at \"<root>/work/w45/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md\" before working."],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Renamed (acme/renamed)\nEngine: claude. Workspace: \"<root>/work/w45\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Renamed\n\n## Harness skills\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/renamed\",\n \"engine\": \"claude\",\n \"instructions\": \"# Renamed\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/renamed\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/renamed\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w45\"\n },\n \"args\": [],\n \"skills\": []\n}\n"},"skills":{"dir":{}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "codex · a package with nothing but an engine": {"result":{"ok":true,"overrides":{"env":{"HARNESS_DSH":"acme/bare","HARNESS_DSH_DIR":"<root>/dsh/acme/bare","HARNESS_WORKSPACE":"<root>/work/w46","HARNESS_CONTEXT_FILE":"<root>/work/w46/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w46/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills"},"extraArgs":["-c","model_provider=\"openai\"","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/bare\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/bare\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w46\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w46/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w46/.harness/runtime/4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd/skills\""],"clearEnv":["HARNESS_PRIVATE_GRID"]}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"4c1bdd5c3c799706891c91d495bd149c5f329a8c39ef5d389aa5108e18e4f0bd":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Bare (acme/bare)\nEngine: codex. Workspace: \"<root>/work/w46\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n\n\n## Harness skills\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/bare\",\n \"engine\": \"codex\",\n \"instructions\": \"\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/bare\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/bare\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w46\"\n },\n \"args\": [],\n \"skills\": []\n}\n"},"skills":{"dir":{}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · a package not installed": {"result":{"ok":false,"error":"DSH_NOT_INSTALLED","detail":"acme/missing is not installed on this machine"},"folder":{},"logged":["[dsh] acme/missing is not installed on this machine · cannot restore its harness context"]},
+ "claude · no workspace on record": {"result":{"ok":false,"error":"DSH_WORKSPACE_MISSING","detail":"acme/draw has no saved workspace"},"folder":null,"logged":[]},
+ "claude · a bootstrap edited by hand": {"result":{"ok":false,"error":"DSH_RUNTIME_FAILED","detail":"Error: The Harness bootstrap in <root>/work/w49/CLAUDE.md was edited; restore it before launching."},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w49\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w49/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w49/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w49\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w49/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w49/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w49/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime edited -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "codex · a runtime that belongs to another engine": {"result":{"ok":false,"error":"DSH_RUNTIME_FAILED","detail":"Error: Harness runtime belongs to acme/draw / claude, not acme/draw / codex"},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"a4d26868017c0ccffe2efe50944ef4211834660cca834c6e9f86dec6a88246fa":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w50\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w50/.harness/runtime/a4d26868017c0ccffe2efe50944ef4211834660cca834c6e9f86dec6a88246fa/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w50/.harness/runtime/a4d26868017c0ccffe2efe50944ef4211834660cca834c6e9f86dec6a88246fa/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w50\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w50/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w50/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w50/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · a skill folder with no skill": {"result":{"ok":false,"error":"DSH_RUNTIME_FAILED","detail":"Error: No SKILL.md under <root>/dsh/acme/broken/nothing-here; repair the harness installation."},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3":{"dir":{}}}}}}},"logged":[]},
+ "claude · retarget onto a grid": {"result":{"ok":true,"overrides":{"env":{"ANTHROPIC_BASE_URL":"https://grid.example/g/home/relay","ANTHROPIC_AUTH_TOKEN":"grid-key-1","ANTHROPIC_MODEL":"qwen3-coder","HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w54","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w54/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills","OTHER_SKILLS":"<root>/work/w54/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills","HARNESS_CONTEXT_FILE":"<root>/work/w54/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w54/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills"},"extraArgs":["--disallowedTools=WebSearch,WebFetch","--system-prompt-snapshot","off","--append-system-prompt","This session has no web tools. The built-in `WebSearch` and `WebFetch` tools are not available in this session, even where earlier turns of this conversation used them — do not call them; tell the user the web cannot be searched or read from here instead.","--add-dir","<root>/work/w54/input","--append-system-prompt","Read the harness context at \"<root>/work/w54/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/CONTEXT.md\" before working."],"clearEnv":["ANTHROPIC_API_KEY","OPENAI_API_KEY","OPENAI_BASE_URL","XAI_API_KEY","GROK_MODELS_BASE_URL","COPILOT_PROVIDER_API_KEY","COPILOT_PROVIDER_BASE_URL","COPILOT_MODEL","HERMES_INFERENCE_MODEL","GRID_API_KEY","GRID_MCP_AUTHORIZATION","HERMES_MANAGED_DIR","GROK_HOME","HARNESS_PRIVATE_GRID"],"gridLaunchRecord":{"override":{"networkId":"net-home","networkName":"Home","baseUrl":"https://grid.example/g/home/relay/v1","apiKey":"grid-key-1","model":"qwen3-coder"},"webSearch":"unavailable"}}},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w54\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w54/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w54/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w54\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w54/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w54/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w54/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]}
+},
+"fork": {
+ "claude · a fork of a harness agent": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w55","claude","--resume","s","--fork-session","--add-dir","<root>/work/w55/input","--append-system-prompt","Read the harness context at \"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"12e153592bb8a342","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w55","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w55\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w55\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w55/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w55/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w55/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w55\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w55/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w55/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w55\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w55/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w55/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w55/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "codex · a fork of a harness agent": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w56","codex","fork","s","-c","model_provider=\"openai\"","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/draw\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/draw\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w56\"","-c","shell_environment_policy.set.TOOLCHAIN=\"<root>/dsh/acme/draw/tools\"","-c","shell_environment_policy.set.OLD_SKILLS=\"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.OTHER_SKILLS=\"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"34bd8c352b3e8fae","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w56","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","OTHER_SKILLS":"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","HARNESS_CONTEXT_FILE":"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"acme/draw","dshRuntime":"harness-codex-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: codex. Workspace: \"<root>/work/w56\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"codex\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w56\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w56/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w56/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: codex. Workspace: \"<root>/work/w56\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w56/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w56/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"codex\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w56\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w56/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w56/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "opencode · a fork of a harness agent": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w57","opencode","--prompt","You are a fork of the agent \"w57 · s\" in <root>/work/w57. It kept working; you are its copy, picking up from what it knew. Here is its recent history, oldest first.\n\nContinue from there. Before acting, say in one line what you understand the current state to be."],"script":"7c8185a3831b7ef9","sessionLabel":"harness-opencode-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w57","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","OTHER_SKILLS":"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","HARNESS_CONTEXT_FILE":"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills"},"dsh":"acme/draw","dshRuntime":"harness-opencode-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: opencode. Workspace: \"<root>/work/w57\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"opencode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w57\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w57/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w57/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: opencode. Workspace: \"<root>/work/w57\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w57/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w57/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"opencode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w57\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w57/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w57/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "cursor · a fork of a harness agent": {"result":{"ok":false,"error":"FORK_UNSUPPORTED","detail":"cursor can neither fork a session nor open with a first message, so a fork of w58 · s would start empty."},"pane":null,"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: cursor. Workspace: \"<root>/work/w58\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w58/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w58/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"cursor\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w58\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w58/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w58/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · a source whose runtime is under its agent id": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w59","claude","--resume","s","--fork-session","--add-dir","<root>/work/w59/input","--append-system-prompt","Read the harness context at \"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"12e153592bb8a342","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w59","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w59\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w59/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w59/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w59\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w59/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w59/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w59/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w59\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w59\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w59/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w59/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w59/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · a source with no runtime yet": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w60","claude","--resume","s","--fork-session","--add-dir","<root>/work/w60/input","--append-system-prompt","Read the harness context at \"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"12e153592bb8a342","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w60","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w60\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w60\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w60/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w60/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w60/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · a runtime the row names that is gone": {"result":{"ok":false,"error":"DSH_RUNTIME_FAILED","detail":"The original harness runtime is missing: <root>/work/w61/.harness/runtime/283bb9deef02e6843abfb538efa1eca70801bd8a701c3f98191e123496339247/runtime.json"},"pane":null,"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"283bb9deef02e6843abfb538efa1eca70801bd8a701c3f98191e123496339247":{"dir":{}},"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{}}}}}}},"logged":[]},
+ "claude · the account's private grid": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w62","claude","--resume","s","--fork-session","--add-dir","<root>/work/w62/input","--append-system-prompt","Read the harness context at \"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"4f39e14be3336b02","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w62","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_PRIVATE_GRID":"grid-of-mine","HARNESS_CONTEXT_FILE":"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ada987408d4654e36fc691a5d4383af83cdaf396c088eb6370a5a18235786882":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w62\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w62/.harness/runtime/ada987408d4654e36fc691a5d4383af83cdaf396c088eb6370a5a18235786882/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w62/.harness/runtime/ada987408d4654e36fc691a5d4383af83cdaf396c088eb6370a5a18235786882/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w62\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w62/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w62/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w62/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w62\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w62\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w62/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w62/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w62/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · a package no longer installed": {"result":{"ok":false,"error":"INVALID_DSH","detail":"acme/missing is no longer installed on this machine"},"pane":null,"folder":{},"logged":[]}
+},
+"linux": {
+"create": {
+ "claude · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w1","claude","--add-dir","<root>/work/w1/input","--append-system-prompt","Read the harness context at \"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"f52b23afe37bfe6f","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w1","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w1","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w1"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w1\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w1/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w1\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w1/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w1/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w1/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w1\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w1 · created 1 · kept 0"]},
+ "codex · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w2","codex","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/draw\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/draw\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w2\"","-c","shell_environment_policy.set.TOOLCHAIN=\"<root>/dsh/acme/draw/tools\"","-c","shell_environment_policy.set.OLD_SKILLS=\"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.OTHER_SKILLS=\"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"26908a1bf3fa9a7e","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w2","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","OTHER_SKILLS":"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","HARNESS_CONTEXT_FILE":"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"acme/draw","dshRuntime":"harness-codex-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w2","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w2"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: codex. Workspace: \"<root>/work/w2\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w2/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"codex\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w2\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w2/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w2/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"600","text":"model = \"gpt-5\"\n\n[projects.\"<root>/work/w2\"]\ntrust_level = \"trusted\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w2 · created 1 · kept 0"]},
+ "cursor · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w3","cursor-agent"],"script":"6042bd89f7c3b8a4","sessionLabel":"harness-cursor-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w3","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills","OTHER_SKILLS":"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills","HARNESS_CONTEXT_FILE":"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills"},"dsh":"acme/draw","dshRuntime":"harness-cursor-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w3","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w3"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: cursor. Workspace: \"<root>/work/w3\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w3/.harness/runtime/68b6346e43d9e6f4d05127853ba54c774d8dca9d072d7c66f7b02a8a8a1e904d/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"cursor\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w3\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w3/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w3/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w3 · created 1 · kept 0"]},
+ "opencode · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w4","opencode"],"script":"c9ee97212ea93f05","sessionLabel":"harness-opencode-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w4","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","OTHER_SKILLS":"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","HARNESS_CONTEXT_FILE":"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","OPENCODE_CONFIG_CONTENT":"{\"permission\":\"ask\",\"model\":\"opencode/muse-spark-1.3-contributor-free\",\"small_model\":\"opencode/muse-spark-1.3-contributor-free\",\"provider\":{\"opencode\":{\"models\":{\"muse-spark-1.3-contributor-free\":{\"options\":{\"reasoningEffort\":\"xhigh\"}}}}},\"agent\":{\"build\":{\"model\":\"opencode/muse-spark-1.3-contributor-free\",\"variant\":\"xhigh\"},\"plan\":{\"model\":\"opencode/muse-spark-1.3-contributor-free\",\"variant\":\"xhigh\"}}}"},"dsh":"acme/draw","dshRuntime":"harness-opencode-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w4","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w4"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: opencode. Workspace: \"<root>/work/w4\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w4/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"opencode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w4\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w4/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w4/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w4 · created 1 · kept 0"]},
+ "pi · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w5","pi","--append-system-prompt","<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/CONTEXT.md"],"script":"c8ee3ab4869ef70f","sessionLabel":"harness-pi-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w5","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills","OTHER_SKILLS":"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills","HARNESS_CONTEXT_FILE":"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills"},"dsh":"acme/draw","dshRuntime":"harness-pi-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w5","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w5"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: pi. Workspace: \"<root>/work/w5\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w5/.harness/runtime/b28af9354f73755a5bc9cd8f3c0a9cacb711f0edd27d694dd0c4ea51599e5685/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"pi\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w5\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w5/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w5/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w5 · created 1 · kept 0"]},
+ "hermes · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w6","hermes"],"script":"a84996dfe8e66395","sessionLabel":"harness-hermes-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w6","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills","OTHER_SKILLS":"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills","HARNESS_CONTEXT_FILE":"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills"},"dsh":"acme/draw","dshRuntime":"harness-hermes-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w6","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w6"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: hermes. Workspace: \"<root>/work/w6\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w6/.harness/runtime/8067e817795e3f5cbfcca5c8b837bbc0f49d4b896397a6f499753d4e3052a990/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"hermes\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w6\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w6/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w6/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w6 · created 1 · kept 0"]},
+ "commandcode · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w7","cmd"],"script":"2699d38f8718387d","sessionLabel":"harness-commandcode-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w7","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills","OTHER_SKILLS":"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills","HARNESS_CONTEXT_FILE":"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills"},"dsh":"acme/draw","dshRuntime":"harness-commandcode-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w7","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w7"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: commandcode. Workspace: \"<root>/work/w7\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w7/.harness/runtime/030c191bfce330bdea3b8a37c4df344bdc554c9e6981870387ee71bc2a9a83af/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"commandcode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w7\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w7/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w7/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w7 · created 1 · kept 0"]},
+ "devin · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w8","devin"],"script":"a3d6df96e2b63875","sessionLabel":"harness-devin-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w8","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills","OTHER_SKILLS":"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills","HARNESS_CONTEXT_FILE":"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills"},"dsh":"acme/draw","dshRuntime":"harness-devin-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w8","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w8"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: devin. Workspace: \"<root>/work/w8\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w8/.harness/runtime/5d85b187d72ec12bcb51415deefc8bba301548d0f9bb15759c660e511c6b636f/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"devin\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w8\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w8/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w8/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w8 · created 1 · kept 0"]},
+ "muse · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w9","muse"],"script":"f36545aea2ea8d64","sessionLabel":"harness-muse-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w9","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills","OTHER_SKILLS":"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills","HARNESS_CONTEXT_FILE":"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills"},"dsh":"acme/draw","dshRuntime":"harness-muse-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w9","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w9"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: muse. Workspace: \"<root>/work/w9\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w9/.harness/runtime/f41fa4d1fc10d3651393fde25efa85f5072670928d43a3f12bd935b13a3bd4c7/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"muse\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w9\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w9/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w9/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w9 · created 1 · kept 0"]},
+ "amp · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w10","amp"],"script":"d82e85635beecc55","sessionLabel":"harness-amp-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w10","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills","OTHER_SKILLS":"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills","HARNESS_CONTEXT_FILE":"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills"},"dsh":"acme/draw","dshRuntime":"harness-amp-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w10","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w10"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: amp. Workspace: \"<root>/work/w10\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w10/.harness/runtime/2507bf5ffca8b38c15ec541595b0279954e148b42254e4be9aeec1a0025d3a7f/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"amp\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w10\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w10/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w10/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w10 · created 1 · kept 0"]},
+ "kilo · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w11","kilo"],"script":"8e7dd09ca9c1fc6d","sessionLabel":"harness-kilo-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w11","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills","OTHER_SKILLS":"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills","HARNESS_CONTEXT_FILE":"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills"},"dsh":"acme/draw","dshRuntime":"harness-kilo-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w11","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w11"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: kilo. Workspace: \"<root>/work/w11\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w11/.harness/runtime/3743da38f21c2178eab145cba8ce152e8ba6cfc142ad817ca5c7f94988cf20fe/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"kilo\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w11\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w11/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w11/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w11 · created 1 · kept 0"]},
+ "grok · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w12","grok"],"script":"521b00aa3840e8bc","sessionLabel":"harness-grok-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w12","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills","OTHER_SKILLS":"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills","HARNESS_CONTEXT_FILE":"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills"},"dsh":"acme/draw","dshRuntime":"harness-grok-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w12","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w12"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: grok. Workspace: \"<root>/work/w12\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w12/.harness/runtime/a7ce90251623745a2216eb5da83d91a9faf93cbbfca575f50c08d49adc65b30e/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"grok\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w12\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w12/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w12/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w12 · created 1 · kept 0"]},
+ "agy · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w13","agy"],"script":"f0efe06915d97573","sessionLabel":"harness-agy-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w13","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills","OTHER_SKILLS":"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills","HARNESS_CONTEXT_FILE":"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills"},"dsh":"acme/draw","dshRuntime":"harness-agy-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w13","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w13"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: agy. Workspace: \"<root>/work/w13\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w13/.harness/runtime/9ebfddd51f700e618680618ef32159201ca4527adbb4610ccf77e0c02f744780/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"agy\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w13\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w13/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w13/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w13 · created 1 · kept 0"]},
+ "copilot · a harness in an empty folder": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w14","copilot"],"script":"58947c4ec2b03118","sessionLabel":"harness-copilot-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w14","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills","OTHER_SKILLS":"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills","HARNESS_CONTEXT_FILE":"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills"},"dsh":"acme/draw","dshRuntime":"harness-copilot-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w14","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w14"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: copilot. Workspace: \"<root>/work/w14\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w14/.harness/runtime/b03c397db2aa2e1e120d1b3fe9f5054c1c7b3202054adb82dfd90e73d9bb2d58/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"copilot\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w14\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w14/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w14/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w14 · created 1 · kept 0"]},
+ "claude · a folder with work in it": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w15","claude","--add-dir","<root>/work/w15/input","--append-system-prompt","Read the harness context at \"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"f52b23afe37bfe6f","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w15","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w15","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w15"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w15\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w15/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w15\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w15/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w15/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w15/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"644","text":"# My rules\n\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# Mine\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w15 · created 1 · kept 0"]},
+ "codex · a folder already laid out": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w16","codex","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/draw\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/draw\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w16\"","-c","shell_environment_policy.set.TOOLCHAIN=\"<root>/dsh/acme/draw/tools\"","-c","shell_environment_policy.set.OLD_SKILLS=\"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.OTHER_SKILLS=\"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"26908a1bf3fa9a7e","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w16","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","OTHER_SKILLS":"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","HARNESS_CONTEXT_FILE":"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"acme/draw","dshRuntime":"harness-codex-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: codex. Workspace: \"<root>/work/w16\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w16/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"codex\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w16\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w16/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w16/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"644","text":"# Ours\n\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w16 · created 0 · kept 1"]},
+ "codex · a package with nothing but an engine": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w17","codex","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/bare\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/bare\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w17\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w17/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w17/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"26908a1bf3fa9a7e","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"acme/bare","HARNESS_DSH_DIR":"<root>/dsh/acme/bare","HARNESS_WORKSPACE":"<root>/work/w17","HARNESS_CONTEXT_FILE":"<root>/work/w17/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w17/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"acme/bare","dshRuntime":"harness-codex-golden","label":"Bare","permissionMode":null,"bypassPermission":false,"grid":null},"init":[],"gridSetup":[],"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Bare (acme/bare)\nEngine: codex. Workspace: \"<root>/work/w17\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n\n\n## Harness skills\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/bare\",\n \"engine\": \"codex\",\n \"instructions\": \"\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/bare\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/bare\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w17\"\n },\n \"args\": [],\n \"skills\": []\n}\n"},"skills":{"dir":{}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/bare materialized <root>/work/w17 · created 0 · kept 0"]},
+ "claude · the account's private grid": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w18","claude","--add-dir","<root>/work/w18/input","--append-system-prompt","Read the harness context at \"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"b38e2589c00c0f8a","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w18","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_PRIVATE_GRID":"grid-of-mine","HARNESS_CONTEXT_FILE":"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w18","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w18","HARNESS_PRIVATE_GRID":"grid-of-mine"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w18\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w18/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w18\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w18/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w18/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w18/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w18\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w18 · created 1 · kept 0"]},
+ "claude · on a grid too": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w19","claude","--disallowedTools=WebSearch,WebFetch","--system-prompt-snapshot","off","--append-system-prompt","This session has no web tools. The built-in `WebSearch` and `WebFetch` tools are not available in this session, even where earlier turns of this conversation used them — do not call them; tell the user the web cannot be searched or read from here instead.","--add-dir","<root>/work/w19/input","--append-system-prompt","Read the harness context at \"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"26c59a77ce812430","sessionLabel":"harness-claude-golden","env":{"ANTHROPIC_BASE_URL":"https://grid.example/g/home/relay","ANTHROPIC_AUTH_TOKEN":"grid-key-1","ANTHROPIC_MODEL":"qwen3-coder","HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w19","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":{"baseUrl":"https://grid.example/g/home/relay/v1","model":"qwen3-coder"}},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w19","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w19"},"timeoutMs":300000}],"gridSetup":[],"folder":{".draw-ready":{"mode":"644","text":"ready\n"},".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w19\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w19/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w19\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w19/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w19/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w19/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w19\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialized <root>/work/w19 · created 1 · kept 0","[grid] claude -> Home (net-home) · qwen3-coder · web search unavailable"]},
+ "codex · the Model Manager": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w20","codex","-c","shell_environment_policy.set.HARNESS_DSH=\"autonomous/autonomous-grid\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/autonomous/autonomous-grid\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w20\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w20/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w20/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"26908a1bf3fa9a7e","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"autonomous/autonomous-grid","HARNESS_DSH_DIR":"<root>/dsh/autonomous/autonomous-grid","HARNESS_WORKSPACE":"<root>/work/w20","HARNESS_CONTEXT_FILE":"<root>/work/w20/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w20/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"autonomous/autonomous-grid","dshRuntime":"harness-codex-golden","label":"Grid","permissionMode":null,"bypassPermission":false,"grid":null},"init":[],"gridSetup":["ensure ownGrid=true"],"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Grid (autonomous/autonomous-grid)\nEngine: codex. Workspace: \"<root>/work/w20\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Grid\n\n## Harness skills\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"autonomous/autonomous-grid\",\n \"engine\": \"codex\",\n \"instructions\": \"# Grid\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"autonomous/autonomous-grid\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/autonomous/autonomous-grid\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w20\"\n },\n \"args\": [],\n \"skills\": []\n}\n"},"skills":{"dir":{}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"home":{".claude.json":{"mode":"644","text":"{\n \"projects\": {}\n}\n"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] autonomous/autonomous-grid materialized <root>/work/w20 · created 0 · kept 0"]},
+ "claude · an init that fails": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w21","claude","--add-dir","<root>/work/w21/input","--append-system-prompt","Read the harness context at \"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"f52b23afe37bfe6f","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w21","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w21","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w21"},"timeoutMs":300000}],"gridSetup":[],"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w21\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w21/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w21\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w21/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w21/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w21/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w21\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialize · init exited 2","[dsh] acme/draw materialized <root>/work/w21 · created 1 · kept 0"]},
+ "claude · an init that runs out of time": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w22","claude","--add-dir","<root>/work/w22/input","--append-system-prompt","Read the harness context at \"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"f52b23afe37bfe6f","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w22","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"init":[{"command":"'<root>/dsh/acme/draw/harness/init.sh'","cwd":"<root>/work/w22","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w22"},"timeoutMs":300000}],"gridSetup":[],"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w22\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w22/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w22\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w22/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w22/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w22/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"},"README.md":{"mode":"644","text":"# A drawing\n"},"input":{"dir":{"brief.md":{"mode":"644","text":"Draw a house.\n"}}}},"home":{".claude.json":{"mode":"600","text":"{\n \"projects\": {\n \"<root>/work/w22\": {\n \"allowedTools\": [],\n \"hasTrustDialogAccepted\": true\n }\n }\n}"},".codex":{"dir":{"config.toml":{"mode":"644","text":"model = \"gpt-5\"\n"}}}},"logged":["[dsh] acme/draw materialize · init exited by timeout","[dsh] acme/draw materialized <root>/work/w22 · created 1 · kept 0"]}
+},
+"relaunch": {
+
+},
+"fork": {
+ "claude · a fork of a harness agent": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w55","claude","--resume","s","--fork-session","--add-dir","<root>/work/w55/input","--append-system-prompt","Read the harness context at \"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"f52b23afe37bfe6f","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w55","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w55\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w55/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w55\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w55/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w55/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w55/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w55\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w55/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w55/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w55\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w55/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w55/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w55/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "codex · a fork of a harness agent": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w56","codex","fork","s","-c","model_provider=\"openai\"","-c","shell_environment_policy.set.HARNESS_DSH=\"acme/draw\"","-c","shell_environment_policy.set.HARNESS_DSH_DIR=\"<root>/dsh/acme/draw\"","-c","shell_environment_policy.set.HARNESS_WORKSPACE=\"<root>/work/w56\"","-c","shell_environment_policy.set.TOOLCHAIN=\"<root>/dsh/acme/draw/tools\"","-c","shell_environment_policy.set.OLD_SKILLS=\"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.OTHER_SKILLS=\"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\"","-c","shell_environment_policy.set.HARNESS_CONTEXT_FILE=\"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md\"","-c","shell_environment_policy.set.HARNESS_SKILLS_DIR=\"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills\""],"script":"26908a1bf3fa9a7e","sessionLabel":"harness-codex-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w56","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","OTHER_SKILLS":"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills","HARNESS_CONTEXT_FILE":"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills"},"dsh":"acme/draw","dshRuntime":"harness-codex-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: codex. Workspace: \"<root>/work/w56\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w56/.harness/runtime/9909a78e070b42b52f6b498d1dc4a49224ca3b22c95a50c402f47d9abd99a671/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"codex\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w56\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w56/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w56/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: codex. Workspace: \"<root>/work/w56\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w56/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w56/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"codex\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w56\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w56/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w56/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "opencode · a fork of a harness agent": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w57","opencode","--prompt","You are a fork of the agent \"w57 · s\" in <root>/work/w57. It kept working; you are its copy, picking up from what it knew. Here is its recent history, oldest first.\n\nContinue from there. Before acting, say in one line what you understand the current state to be."],"script":"c9ee97212ea93f05","sessionLabel":"harness-opencode-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w57","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","OTHER_SKILLS":"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills","HARNESS_CONTEXT_FILE":"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills"},"dsh":"acme/draw","dshRuntime":"harness-opencode-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: opencode. Workspace: \"<root>/work/w57\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w57/.harness/runtime/93b54ba496862c3ba2937702c3fb1a4ec6c7f5933e90d881736af21fc4012b93/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"opencode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w57\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w57/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w57/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: opencode. Workspace: \"<root>/work/w57\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w57/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w57/.harness/runtime/ffa6a744d78d28386438b4a8e8ee32f56718633735057b1b5ddfb5d224d45d98/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"opencode\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w57\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w57/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w57/.agents/skills\"\n },\n \"args\": [],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"AGENTS.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · a source whose runtime is under its agent id": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w59","claude","--resume","s","--fork-session","--add-dir","<root>/work/w59/input","--append-system-prompt","Read the harness context at \"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"f52b23afe37bfe6f","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w59","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w59\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w59/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w59/.harness/runtime/b53c366c4e4cb65e4639b3c9e7a9d4f56d5b1a764749dc88ba8327d2cebedca3/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w59\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w59/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w59/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w59/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w59\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w59/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w59\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w59/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w59/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w59/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · a source with no runtime yet": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w60","claude","--resume","s","--fork-session","--add-dir","<root>/work/w60/input","--append-system-prompt","Read the harness context at \"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"f52b23afe37bfe6f","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w60","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_CONTEXT_FILE":"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w60\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w60/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w60\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w60/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w60/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w60/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]},
+ "claude · the account's private grid": {"result":{"ok":false,"error":"RECORDED","detail":"the pane is not opened by this spec"},"pane":{"argv":["/usr/bin/env","DISABLE_AUTO_UPDATE=true","/bin/zsh","-lic",". '<root>/data/launch/<script>.sh'","harness-engine","<root>/work/w62","claude","--resume","s","--fork-session","--add-dir","<root>/work/w62/input","--append-system-prompt","Read the harness context at \"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md\" before working."],"script":"b38e2589c00c0f8a","sessionLabel":"harness-claude-golden","env":{"HARNESS_DSH":"acme/draw","HARNESS_DSH_DIR":"<root>/dsh/acme/draw","HARNESS_WORKSPACE":"<root>/work/w62","TOOLCHAIN":"<root>/dsh/acme/draw/tools","OLD_SKILLS":"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","OTHER_SKILLS":"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills","HARNESS_PRIVATE_GRID":"grid-of-mine","HARNESS_CONTEXT_FILE":"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/CONTEXT.md","HARNESS_SKILLS_DIR":"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills"},"dsh":"acme/draw","dshRuntime":"harness-claude-golden","label":"Drawing","permissionMode":null,"bypassPermission":false,"grid":null},"folder":{".harness":{"dir":{".gitignore":{"mode":"600","text":"runtime/\nlegacy-AGENTS.md\n"},"runtime":{"dir":{"ada987408d4654e36fc691a5d4383af83cdaf396c088eb6370a5a18235786882":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w62\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w62/.harness/runtime/ada987408d4654e36fc691a5d4383af83cdaf396c088eb6370a5a18235786882/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w62/.harness/runtime/ada987408d4654e36fc691a5d4383af83cdaf396c088eb6370a5a18235786882/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w62\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w62/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w62/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w62/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}},"ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5":{"dir":{"CONTEXT.md":{"mode":"600","text":"# Drawing (acme/draw)\nEngine: claude. Workspace: \"<root>/work/w62\".\nUse your file and shell tools for these instructions, skills, and toolchain commands.\nLegacy references to .claude/skills or .agents/skills mean HARNESS_SKILLS_DIR for this session.\n\n# Make a drawing\nYou are an agent in this workspace.\nRead `\"$HARNESS_SKILLS_DIR\"/draw/SKILL.md` first.\n\n## Harness skills\n- draw: \"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/draw/SKILL.md\"\n- paint: \"<root>/work/w62/.harness/runtime/ff05148322bf53a234e71f1b5fec5dd97865453e32fa8c8be7f58ca6a81493c5/skills/paint/SKILL.md\"\n"},"runtime.json":{"mode":"600","text":"{\n \"version\": 1,\n \"id\": \"acme/draw\",\n \"engine\": \"claude\",\n \"instructions\": \"# Make a drawing\\nYou are Claude Code in this workspace.\\nRead `.claude/skills/draw/SKILL.md` first.\\n\",\n \"env\": {\n \"HARNESS_DSH\": \"acme/draw\",\n \"HARNESS_DSH_DIR\": \"<root>/dsh/acme/draw\",\n \"HARNESS_WORKSPACE\": \"<root>/work/w62\",\n \"TOOLCHAIN\": \"<root>/dsh/acme/draw/tools\",\n \"OLD_SKILLS\": \"<root>/work/w62/.claude/skills\",\n \"OTHER_SKILLS\": \"<root>/work/w62/.agents/skills\"\n },\n \"args\": [\n \"--add-dir\",\n \"<root>/work/w62/input\"\n ],\n \"skills\": [\n {\n \"name\": \"draw\",\n \"dir\": \"<root>/dsh/acme/draw/skills/draw\"\n },\n {\n \"name\": \"paint\",\n \"dir\": \"<root>/dsh/acme/draw/skills/paint\"\n }\n ]\n}\n"},"skills":{"dir":{"draw":{"link":"<root>/dsh/acme/draw/skills/draw"},"paint":{"link":"<root>/dsh/acme/draw/skills/paint"}}}}}}}}},"CLAUDE.md":{"mode":"600","text":"\n<!-- harness:runtime v1 -->\n## Harness session context\n\nIf HARNESS_CONTEXT_FILE is set in your environment, read that file before working:\n\n```sh\nif [ -n \"$HARNESS_CONTEXT_FILE\" ]; then cat \"$HARNESS_CONTEXT_FILE\"; fi\n```\n\nIt contains the instructions and skill index for this session's selected harness.\nIf the variable is absent, this is an ordinary coding session with no selected harness.\n<!-- /harness:runtime -->\n"}},"logged":[]}
+}
+},
+"scripts": {
+ "00e21e210d7ae5ce": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: muse exited ('\"$harness_status\"'). This pane is a shell now — run muse again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'muse' '<root>/home/.local/bin/muse'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://dev.meta.ai/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://dev.meta.ai/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "0fe0c7d64d4feca8": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: cursor-agent exited ('\"$harness_status\"'). This pane is a shell now — run cursor-agent again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'cursor-agent' '<root>/home/.local/bin/cursor-agent'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl https://cursor.com/install -fsS | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl https://cursor.com/install -fsS | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "12e153592bb8a342": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: claude exited ('\"$harness_status\"'). This pane is a shell now — run claude again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'claude' '<root>/home/.local/bin/claude'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'claude'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @anthropic-ai/claude-code' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @anthropic-ai/claude-code') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "1b9d410a2033ba68": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: kilo exited ('\"$harness_status\"'). This pane is a shell now — run kilo again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'kilo' 'kilocode' '<root>/home/.kilo/bin/kilo' '<root>/home/.local/bin/kilo' '<root>/home/.local/bin/kilocode'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'kilo' 'kilocode'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @kilocode/cli' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @kilocode/cli') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "26908a1bf3fa9a7e": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: codex exited ('\"$harness_status\"'). This pane is a shell now — run codex again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nharness_codex_probe() {\n harness_codex_mode=0\n harness_codex_seen=$('<daemon-node>' -e 'const {execFileSync}=require('\"'\"'node:child_process'\"'\"');try { const h=execFileSync(process.argv[1],['\"'\"'--help'\"'\"'],{timeout:5000,maxBuffer:1048576,encoding:'\"'\"'utf8'\"'\"',stdio:['\"'\"'ignore'\"'\"','\"'\"'pipe'\"'\"','\"'\"'pipe'\"'\"']});process.exit(/--no-daemon(?:[^A-Za-z0-9-]|$)/.test(h)?0:64); } catch { process.exit(2); }' \"$1\") || harness_codex_mode=$?\n case \"$harness_codex_mode\" in\n 0) harness_codex_no_daemon=1 ;;\n 64) harness_codex_no_daemon= ;;\n *) printf '%s\\n' 'harness: could not verify Codex startup options. Please try opening this session again.' >&2; exit 1 ;;\n esac\n}\nharness_codex_check() {\n '<daemon-node>' -e 'const { execFileSync } = require('\"'\"'node:child_process'\"'\"');\nconst { createHash } = require('\"'\"'node:crypto'\"'\"');\nconst [mode, tmux, pane, baseline] = process.argv.slice(1);\ntry {\n if (!/^%\\d+$/.test(pane)) process.exit(1);\n const screen = execFileSync(tmux, ['\"'\"'capture-pane'\"'\"', '\"'\"'-p'\"'\"', '\"'\"'-J'\"'\"', '\"'\"'-S'\"'\"', '\"'\"'-10'\"'\"', '\"'\"'-t'\"'\"', pane], {\n timeout: 2000, maxBuffer: 1024 * 1024, encoding: '\"'\"'utf8'\"'\"', stdio: ['\"'\"'ignore'\"'\"', '\"'\"'pipe'\"'\"', '\"'\"'ignore'\"'\"'],\n });\n const last = screen.trimEnd().split('\"'\"'\\n'\"'\"').at(-1)?.trim() ?? '\"'\"''\"'\"';\n const hash = createHash('\"'\"'sha256'\"'\"').update(last).digest('\"'\"'hex'\"'\"');\n if (mode === '\"'\"'before'\"'\"') {\n process.stdout.write(JSON.stringify({ at: Date.now(), hash }));\n } else {\n const before = JSON.parse(baseline);\n const elapsed = Date.now() - before.at;\n const error = '\"'\"'Error: account/read failed during TUI bootstrap: account/read failed: workspace routing discovery timed out (code -32603)'\"'\"';\n const fresh = Number.isFinite(elapsed) && elapsed >= 0 && /^[a-f0-9]{64}$/.test(before.hash) && before.hash !== hash;\n const matches = mode === '\"'\"'after-update'\"'\"'\n ? /^(?:🎉\\s*)?Update ran successfully! Please restart Codex\\.$/.test(last)\n : mode === '\"'\"'after'\"'\"' && elapsed <= 30000 && last === error;\n process.exit(fresh && matches ? 0 : 1);\n }\n} catch { process.exit(1); }' \"$@\"\n}\nharness_codex_start() {\n [ \"$harness_codex_go\" = 1 ] || return 0\n harness_codex_before=\n if [ -n \"${TMUX_PANE:-}\" ]; then harness_codex_before=$(harness_codex_check before '<tmux>' \"$TMUX_PANE\") || harness_codex_before=; fi\n harness_codex_probe \"$1\"\n harness_status=0\n}\nharness_codex_next() {\n [ \"$harness_codex_go\" = 1 ] || return 0\n harness_codex_go=0\n if [ \"$harness_status\" -eq 0 ] && [ \"$harness_codex_updated\" -eq 0 ] && [ -n \"$harness_codex_before\" ] &&\n harness_codex_seen=$(harness_codex_check after-update '<tmux>' \"$TMUX_PANE\" \"$harness_codex_before\"); then\n harness_codex_updated=1\n printf '\\n%s\\n' 'harness: Codex updated. Continuing startup…'\n harness_codex_go=1\n return 0\n fi\n [ \"$harness_status\" -eq 1 ] && [ \"$harness_codex_attempt\" -lt 3 ] && [ -n \"$harness_codex_before\" ] || return 0\n harness_codex_seen=$(harness_codex_check after '<tmux>' \"$TMUX_PANE\" \"$harness_codex_before\") || return 0\n harness_codex_delay=$((harness_codex_attempt * 2))\n harness_codex_attempt=$((harness_codex_attempt + 1))\n harness_codex_cancelled=0\n trap 'harness_codex_cancelled=1' INT\n printf '\\n%s\\n' \"harness: Codex account lookup timed out. Retrying startup ($harness_codex_attempt/3) in ${harness_codex_delay}s; Ctrl-C cancels.\"\n harness_codex_seen=$(sleep \"$harness_codex_delay\") || harness_codex_cancelled=1\n trap : INT\n if [ \"$harness_codex_cancelled\" -eq 1 ]; then harness_status=130; return 0; fi\n harness_codex_go=1\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'codex' '<root>/home/.local/bin/codex'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'codex'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @openai/codex' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @openai/codex') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_codex_attempt=1\nharness_codex_updated=0\nharness_codex_go=1\nharness_codex_start \"$harness_engine_bin\"\n[ \"$harness_codex_go\" != 1 ] || \"$harness_engine_bin\" ${harness_codex_no_daemon:+--no-daemon} \"$@\" || harness_status=$?\nharness_resume\nharness_codex_next\nharness_codex_start \"$harness_engine_bin\"\n[ \"$harness_codex_go\" != 1 ] || \"$harness_engine_bin\" ${harness_codex_no_daemon:+--no-daemon} \"$@\" || harness_status=$?\nharness_resume\nharness_codex_next\nharness_codex_start \"$harness_engine_bin\"\n[ \"$harness_codex_go\" != 1 ] || \"$harness_engine_bin\" ${harness_codex_no_daemon:+--no-daemon} \"$@\" || harness_status=$?\nharness_resume\nharness_codex_next\nharness_codex_start \"$harness_engine_bin\"\n[ \"$harness_codex_go\" != 1 ] || \"$harness_engine_bin\" ${harness_codex_no_daemon:+--no-daemon} \"$@\" || harness_status=$?\nharness_resume\nharness_codex_next\nharness_after",
+ "2699d38f8718387d": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: cmd exited ('\"$harness_status\"'). This pane is a shell now — run cmd again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'cmd' 'command-code' '<root>/home/.local/bin/cmd' '<root>/home/.local/bin/command-code'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'cmd' 'command-code'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm i -g command-code' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm i -g command-code') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "26c59a77ce812430": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: claude exited ('\"$harness_status\"'). This pane is a shell now — run claude again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset ANTHROPIC_API_KEY OPENAI_API_KEY OPENAI_BASE_URL XAI_API_KEY GROK_MODELS_BASE_URL COPILOT_PROVIDER_API_KEY COPILOT_PROVIDER_BASE_URL COPILOT_MODEL HERMES_INFERENCE_MODEL GRID_API_KEY GRID_MCP_AUTHORIZATION HERMES_MANAGED_DIR GROK_HOME HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'claude' '<root>/home/.local/bin/claude'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'claude'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @anthropic-ai/claude-code' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @anthropic-ai/claude-code') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "34bd8c352b3e8fae": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: codex exited ('\"$harness_status\"'). This pane is a shell now — run codex again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nharness_codex_probe() {\n harness_codex_mode=0\n harness_codex_seen=$('<daemon-node>' -e 'const {execFileSync}=require('\"'\"'node:child_process'\"'\"');try { const h=execFileSync(process.argv[1],['\"'\"'--help'\"'\"'],{timeout:5000,maxBuffer:1048576,encoding:'\"'\"'utf8'\"'\"',stdio:['\"'\"'ignore'\"'\"','\"'\"'pipe'\"'\"','\"'\"'pipe'\"'\"']});process.exit(/--no-daemon(?:[^A-Za-z0-9-]|$)/.test(h)?0:64); } catch { process.exit(2); }' \"$1\") || harness_codex_mode=$?\n case \"$harness_codex_mode\" in\n 0) harness_codex_no_daemon=1 ;;\n 64) harness_codex_no_daemon= ;;\n *) printf '%s\\n' 'harness: could not verify Codex startup options. Please try opening this session again.' >&2; exit 1 ;;\n esac\n}\nharness_codex_check() {\n '<daemon-node>' -e 'const { execFileSync } = require('\"'\"'node:child_process'\"'\"');\nconst { createHash } = require('\"'\"'node:crypto'\"'\"');\nconst [mode, tmux, pane, baseline] = process.argv.slice(1);\ntry {\n if (!/^%\\d+$/.test(pane)) process.exit(1);\n const screen = execFileSync(tmux, ['\"'\"'capture-pane'\"'\"', '\"'\"'-p'\"'\"', '\"'\"'-J'\"'\"', '\"'\"'-S'\"'\"', '\"'\"'-10'\"'\"', '\"'\"'-t'\"'\"', pane], {\n timeout: 2000, maxBuffer: 1024 * 1024, encoding: '\"'\"'utf8'\"'\"', stdio: ['\"'\"'ignore'\"'\"', '\"'\"'pipe'\"'\"', '\"'\"'ignore'\"'\"'],\n });\n const last = screen.trimEnd().split('\"'\"'\\n'\"'\"').at(-1)?.trim() ?? '\"'\"''\"'\"';\n const hash = createHash('\"'\"'sha256'\"'\"').update(last).digest('\"'\"'hex'\"'\"');\n if (mode === '\"'\"'before'\"'\"') {\n process.stdout.write(JSON.stringify({ at: Date.now(), hash }));\n } else {\n const before = JSON.parse(baseline);\n const elapsed = Date.now() - before.at;\n const error = '\"'\"'Error: account/read failed during TUI bootstrap: account/read failed: workspace routing discovery timed out (code -32603)'\"'\"';\n const fresh = Number.isFinite(elapsed) && elapsed >= 0 && /^[a-f0-9]{64}$/.test(before.hash) && before.hash !== hash;\n const matches = mode === '\"'\"'after-update'\"'\"'\n ? /^(?:🎉\\s*)?Update ran successfully! Please restart Codex\\.$/.test(last)\n : mode === '\"'\"'after'\"'\"' && elapsed <= 30000 && last === error;\n process.exit(fresh && matches ? 0 : 1);\n }\n} catch { process.exit(1); }' \"$@\"\n}\nharness_codex_start() {\n [ \"$harness_codex_go\" = 1 ] || return 0\n harness_codex_before=\n if [ -n \"${TMUX_PANE:-}\" ]; then harness_codex_before=$(harness_codex_check before '<tmux>' \"$TMUX_PANE\") || harness_codex_before=; fi\n harness_codex_probe \"$1\"\n harness_status=0\n}\nharness_codex_next() {\n [ \"$harness_codex_go\" = 1 ] || return 0\n harness_codex_go=0\n if [ \"$harness_status\" -eq 0 ] && [ \"$harness_codex_updated\" -eq 0 ] && [ -n \"$harness_codex_before\" ] &&\n harness_codex_seen=$(harness_codex_check after-update '<tmux>' \"$TMUX_PANE\" \"$harness_codex_before\"); then\n harness_codex_updated=1\n printf '\\n%s\\n' 'harness: Codex updated. Continuing startup…'\n harness_codex_go=1\n return 0\n fi\n [ \"$harness_status\" -eq 1 ] && [ \"$harness_codex_attempt\" -lt 3 ] && [ -n \"$harness_codex_before\" ] || return 0\n harness_codex_seen=$(harness_codex_check after '<tmux>' \"$TMUX_PANE\" \"$harness_codex_before\") || return 0\n harness_codex_delay=$((harness_codex_attempt * 2))\n harness_codex_attempt=$((harness_codex_attempt + 1))\n harness_codex_cancelled=0\n trap 'harness_codex_cancelled=1' INT\n printf '\\n%s\\n' \"harness: Codex account lookup timed out. Retrying startup ($harness_codex_attempt/3) in ${harness_codex_delay}s; Ctrl-C cancels.\"\n harness_codex_seen=$(sleep \"$harness_codex_delay\") || harness_codex_cancelled=1\n trap : INT\n if [ \"$harness_codex_cancelled\" -eq 1 ]; then harness_status=130; return 0; fi\n harness_codex_go=1\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'codex' '<root>/home/.local/bin/codex'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'codex'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @openai/codex' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @openai/codex') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_codex_attempt=1\nharness_codex_updated=0\nharness_codex_go=1\nharness_codex_start \"$harness_engine_bin\"\n[ \"$harness_codex_go\" != 1 ] || \"$harness_engine_bin\" ${harness_codex_no_daemon:+--no-daemon} \"$@\" || harness_status=$?\nharness_resume\nharness_codex_next\nharness_codex_start \"$harness_engine_bin\"\n[ \"$harness_codex_go\" != 1 ] || \"$harness_engine_bin\" ${harness_codex_no_daemon:+--no-daemon} \"$@\" || harness_status=$?\nharness_resume\nharness_codex_next\nharness_codex_start \"$harness_engine_bin\"\n[ \"$harness_codex_go\" != 1 ] || \"$harness_engine_bin\" ${harness_codex_no_daemon:+--no-daemon} \"$@\" || harness_status=$?\nharness_resume\nharness_codex_next\nharness_codex_start \"$harness_engine_bin\"\n[ \"$harness_codex_go\" != 1 ] || \"$harness_engine_bin\" ${harness_codex_no_daemon:+--no-daemon} \"$@\" || harness_status=$?\nharness_resume\nharness_codex_next\nharness_after",
+ "4b832fb5464ffac2": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: copilot exited ('\"$harness_status\"'). This pane is a shell now — run copilot again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'copilot' '<root>/home/.local/bin/copilot'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'copilot'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @github/copilot' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @github/copilot') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "4f39e14be3336b02": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: claude exited ('\"$harness_status\"'). This pane is a shell now — run claude again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'claude' '<root>/home/.local/bin/claude'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'claude'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @anthropic-ai/claude-code' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @anthropic-ai/claude-code') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "5185380a771b24dc": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: amp exited ('\"$harness_status\"'). This pane is a shell now — run amp again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'amp' '<root>/home/.local/bin/amp' '<root>/home/.amp/bin/amp'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://ampcode.com/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://ampcode.com/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "521b00aa3840e8bc": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: grok exited ('\"$harness_status\"'). This pane is a shell now — run grok again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'grok' '<root>/home/.grok/bin/grok' '<root>/home/.local/bin/grok'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://x.ai/cli/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://x.ai/cli/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "58947c4ec2b03118": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: copilot exited ('\"$harness_status\"'). This pane is a shell now — run copilot again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'copilot' '<root>/home/.local/bin/copilot'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'copilot'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @github/copilot' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @github/copilot') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "6042bd89f7c3b8a4": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: cursor-agent exited ('\"$harness_status\"'). This pane is a shell now — run cursor-agent again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'cursor-agent' '<root>/home/.local/bin/cursor-agent'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl https://cursor.com/install -fsS | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl https://cursor.com/install -fsS | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "7c8185a3831b7ef9": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: opencode exited ('\"$harness_status\"'). This pane is a shell now — run opencode again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'opencode' '<root>/home/.opencode/bin/opencode' '<root>/home/.local/bin/opencode'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'opencode'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://opencode.ai/install | bash' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'curl -fsSL https://opencode.ai/install | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "7ffd6bcc2ef01772": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: hermes exited ('\"$harness_status\"'). This pane is a shell now — run hermes again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'hermes' '<root>/home/.local/bin/hermes' '/usr/local/bin/hermes'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "863b0decdcb073ef": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: devin exited ('\"$harness_status\"'). This pane is a shell now — run devin again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'devin' '<root>/home/.local/bin/devin'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://cli.devin.ai/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://cli.devin.ai/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "8e7dd09ca9c1fc6d": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: kilo exited ('\"$harness_status\"'). This pane is a shell now — run kilo again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'kilo' 'kilocode' '<root>/home/.kilo/bin/kilo' '<root>/home/.local/bin/kilo' '<root>/home/.local/bin/kilocode'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'kilo' 'kilocode'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @kilocode/cli' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @kilocode/cli') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "a3d6df96e2b63875": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: devin exited ('\"$harness_status\"'). This pane is a shell now — run devin again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'devin' '<root>/home/.local/bin/devin'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://cli.devin.ai/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://cli.devin.ai/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "a84996dfe8e66395": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: hermes exited ('\"$harness_status\"'). This pane is a shell now — run hermes again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'hermes' '<root>/home/.local/bin/hermes' '/usr/local/bin/hermes'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "b38e2589c00c0f8a": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: claude exited ('\"$harness_status\"'). This pane is a shell now — run claude again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'claude' '<root>/home/.local/bin/claude'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'claude'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @anthropic-ai/claude-code' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @anthropic-ai/claude-code') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "b685653e2043af30": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: agy exited ('\"$harness_status\"'). This pane is a shell now — run agy again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'agy' '<root>/home/.local/bin/agy'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://antigravity.google/cli/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://antigravity.google/cli/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "c8ee3ab4869ef70f": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: pi exited ('\"$harness_status\"'). This pane is a shell now — run pi again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'pi' '<root>/home/.local/bin/pi'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'pi'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g --ignore-scripts @earendil-works/pi-coding-agent' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g --ignore-scripts @earendil-works/pi-coding-agent') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "c9ee97212ea93f05": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: opencode exited ('\"$harness_status\"'). This pane is a shell now — run opencode again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'opencode' '<root>/home/.opencode/bin/opencode' '<root>/home/.local/bin/opencode'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'opencode'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://opencode.ai/install | bash' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'curl -fsSL https://opencode.ai/install | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "d82e85635beecc55": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: amp exited ('\"$harness_status\"'). This pane is a shell now — run amp again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'amp' '<root>/home/.local/bin/amp' '<root>/home/.amp/bin/amp'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://ampcode.com/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://ampcode.com/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "db977b46dbec10f2": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: pi exited ('\"$harness_status\"'). This pane is a shell now — run pi again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'pi' '<root>/home/.local/bin/pi'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'pi'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g --ignore-scripts @earendil-works/pi-coding-agent' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g --ignore-scripts @earendil-works/pi-coding-agent') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "e69844b477ba7a81": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: grok exited ('\"$harness_status\"'). This pane is a shell now — run grok again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'grok' '<root>/home/.grok/bin/grok' '<root>/home/.local/bin/grok'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://x.ai/cli/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://x.ai/cli/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "ef0f56644cefde2a": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: cmd exited ('\"$harness_status\"'). This pane is a shell now — run cmd again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'cmd' 'command-code' '<root>/home/.local/bin/cmd' '<root>/home/.local/bin/command-code'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'cmd' 'command-code'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm i -g command-code' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm i -g command-code') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "f0efe06915d97573": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: agy exited ('\"$harness_status\"'). This pane is a shell now — run agy again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'agy' '<root>/home/.local/bin/agy'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://antigravity.google/cli/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://antigravity.google/cli/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "f36545aea2ea8d64": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: muse exited ('\"$harness_status\"'). This pane is a shell now — run muse again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'muse' '<root>/home/.local/bin/muse'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n return 1\n}\nif ! harness_find_engine \"$1\"; then\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ curl -fsSL https://dev.meta.ai/install.sh | bash' ''\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (eval 'curl -fsSL https://dev.meta.ai/install.sh | bash') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "f52b23afe37bfe6f": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: claude exited ('\"$harness_status\"'). This pane is a shell now — run claude again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: check the folder'\"'\"'s permissions for this user.' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'claude' '<root>/home/.local/bin/claude'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'claude'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @anthropic-ai/claude-code' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @anthropic-ai/claude-code') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after",
+ "f78a73b923aec9c8": "rm -f -- '<root>/data/launch/<script>.sh'\nharness_nofile=$(ulimit -S -n 2>/dev/null) || harness_nofile=unlimited; if [ \"$harness_nofile\" != unlimited ] && [ \"$harness_nofile\" -lt 65536 ] 2>/dev/null; then ulimit -S -n 65536 2>/dev/null || ulimit -S -n \"$(ulimit -H -n)\" 2>/dev/null || true; fi; unset harness_nofile\nharness_stopped() {\n [ \"$harness_status\" -gt 128 ] 2>/dev/null || return 1\n harness_signal=$(kill -l \"$harness_status\" 2>/dev/null) || return 1\n case $harness_signal in\n STOP|TSTP|TTIN|TTOU|SIGSTOP|SIGTSTP|SIGTTIN|SIGTTOU) jobs %% >/dev/null 2>&1 ;;\n *) return 1 ;;\n esac\n}\nharness_fg() {\n harness_now=$(date +%s 2>/dev/null) || harness_now=0\n if [ $((harness_now - harness_resumed)) -le 1 ]; then harness_quick=$((harness_quick + 1)); else harness_quick=0; fi\n harness_resumes=$((harness_resumes + 1))\n case $harness_signal in *TTIN|*TTOU) harness_stuck=$harness_quick ;; *) harness_stuck=0 ;; esac\n if [ \"$harness_stuck\" -ge 5 ] || { [ -z \"${ZSH_VERSION:-}\" ] && [ \"$harness_resumes\" -ge 1000 ]; }; then\n kill -9 %% 2>/dev/null\n harness_status=137\n return 0\n fi\n if [ \"$harness_quick\" -ge 3 ]; then harness_waited=$(sleep 1) || :; fi\n harness_resumed=$(date +%s 2>/dev/null) || harness_resumed=0\n harness_status=0\n fg >/dev/null || harness_status=$?\n}\nharness_resume() {\n if [ -n \"${ZSH_VERSION:-}\" ]; then\n while harness_stopped; do harness_fg; done\n return 0\n fi\n harness_stopped || return 0\n harness_fg\n harness_resume\n}\nharness_resumed=0\nharness_quick=0\nharness_resumes=0\nharness_after() {\n if [ \"$harness_status\" -eq 127 ]; then exit 127; fi\n [ -n \"${TMUX_PANE:-}\" ] && { '<tmux>' set-option -p -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1 || '<tmux>' set-option -w -t \"$TMUX_PANE\" @harness_engine_exit \"$harness_status\" >/dev/null 2>&1; } || true\n if ! [ -t 0 ]; then exit \"$harness_status\"; fi\n if harness_tty=$(stty -g 2>/dev/null) && stty -icanon -echo min 0 time 3 2>/dev/null; then\n while harness_waiting=$(dd bs=65536 count=1 2>/dev/null | wc -c) && [ \"$((harness_waiting))\" -gt 0 ]; do :; done\n stty \"$harness_tty\" 2>/dev/null || true\n fi\n printf '\\n%s\\n' 'harness: claude exited ('\"$harness_status\"'). This pane is a shell now — run claude again, or stop the pane.'\n exec '/bin/zsh' -l\n}\nunset ANTHROPIC_API_KEY OPENAI_API_KEY OPENAI_BASE_URL XAI_API_KEY GROK_MODELS_BASE_URL COPILOT_PROVIDER_API_KEY COPILOT_PROVIDER_BASE_URL COPILOT_MODEL HERMES_INFERENCE_MODEL GRID_API_KEY GRID_MCP_AUTHORIZATION HERMES_MANAGED_DIR GROK_HOME HARNESS_PRIVATE_GRID\nGRID_NO_UPDATE_CHECK=1\nexport GRID_NO_UPDATE_CHECK\nif ! command -v node >/dev/null 2>&1; then PATH=\"${PATH:+$PATH:}\"'<daemon-node-dir>'; export PATH; fi\nif ! cd -- \"$1\"; then printf '%s\\n' 'harness: the selected working directory is unavailable.' >&2; exit 1; fi\nif ! [ -r . ]; then printf '%s\\n' \"harness: cannot read $PWD — the agent was not started.\" 'harness: on macOS, grant Full Disk Access to the app that started tmux (and to Harness), then run: tmux kill-server' 'harness: or pick a folder outside Documents, Desktop and Downloads (System Settings › Privacy & Security).' >&2; exit 1; fi\nshift\nif [ -n \"${ZSH_VERSION:-}\" ]; then setopt monitor 2>/dev/null || :; else set -m 2>/dev/null || :; fi\ntrap : INT QUIT\nresolve_engine() {\n candidate=\"$1\"\n resolved=\"\"\n case \"$candidate\" in\n */*) resolved=\"$candidate\" ;;\n *) resolved=\"$(command -v \"$candidate\" 2>/dev/null)\" || true ;;\n esac\n [ -n \"$resolved\" ] && [ -f \"$resolved\" ] && [ -x \"$resolved\" ]\n}\nharness_find_engine() {\n harness_engine_bin=\n for candidate in \"$1\" 'claude' '<root>/home/.local/bin/claude'; do\n if resolve_engine \"$candidate\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n npm_prefix=\"$(npm prefix -g 2>/dev/null)\" || true\n if [ -n \"$npm_prefix\" ]; then\n for bin in 'claude'; do\n if resolve_engine \"$npm_prefix/bin/$bin\"; then harness_engine_bin=\"$resolved\"; return 0; fi\n done\n fi\n return 1\n}\nif ! command -v node >/dev/null 2>&1 || ! command -v npm >/dev/null 2>&1; then\n for harness_node_bin in '<daemon-node-dir>'; do\n if [ -x \"$harness_node_bin/node\" ] && [ -x \"$harness_node_bin/npm\" ]; then\n PATH=\"$harness_node_bin${PATH:+:$PATH}\"\n export PATH\n hash -r 2>/dev/null || true\n break\n fi\n done\nfi\nif ! harness_find_engine \"$1\"; then\n if ! command -v npm >/dev/null 2>&1; then\n printf '%s\\n' 'harness: npm is unavailable and the managed Node.js/npm runtime could not be used.'\n exit 1\n fi\n printf '%s\\n' 'harness: engine is missing — installing it in this terminal' 'harness: $ npm install -g @anthropic-ai/claude-code' ''\n printf '%s\\n' 'harness: installing for this user in <root>/home/.local'\nfi\nharness_status=0\n[ -n \"$harness_engine_bin\" ] || (export npm_config_prefix='<root>/home/.local' NPM_CONFIG_PREFIX='<root>/home/.local'; eval 'npm install -g @anthropic-ai/claude-code') || harness_status=$?\nharness_resume\nif [ -z \"$harness_engine_bin\" ]; then\n if [ \"$harness_status\" -ne 0 ]; then printf '\\n%s\\n' 'harness: the install failed, so the agent was not started. The command is above; fix it and create the agent again.'; exit 1; fi\n hash -r 2>/dev/null || true\n if ! harness_find_engine \"$1\"; then printf '\\n%s\\n' 'harness: the install completed, but its executable could not be found. Check the installer output and PATH above.'; exit 1; fi\nfi\nshift\nharness_status=0\n\"$harness_engine_bin\" \"$@\" || harness_status=$?\nharness_resume\nharness_after"
+}
+}
diff --git a/cli/src/engines/dshLaunchShapes.golden.spec.ts b/cli/src/engines/dshLaunchShapes.golden.spec.ts
new file mode 100644
index 000000000..73f9e96d9
--- /dev/null
+++ b/cli/src/engines/dshLaunchShapes.golden.spec.ts
@@ -0,0 +1,411 @@
+/**
+ * Every launch shape that carries a harness package (DSH), answer for answer: recorded from the code as it stood
+ * before the Store prepared those launches for the core (docs/design/2026-10-08-launch-port.md, (L3)). For each
+ * engine, it records what a create, a relaunch (restart, resume, restore) and a fork start the pane with: the argv,
+ * the environment, the variables cleared, the row's harness fields. It also records the workspace each leaves behind
+ * (the template, the init the harness asked to run, the session's runtime, its skills and its context, the engine's
+ * bootstrap), the folder trust a create records, the log lines and every refusal.
+ *
+ * Each case runs with `process.platform` pinned to darwin and to linux, and linux's are stored where they differ.
+ * Local time is pinned. The home folder, the data folder and the packages are the spec's own, and no size depends
+ * on their paths. A harness's init is recorded as asked for, never run: it would run in this machine's shell. A
+ * create's label, new each time, is one per engine.
+ *
+ * `RECORD_DSH_LAUNCH_SHAPES_GOLDEN=1` writes the fixture. Record it again only for a change meant to alter a launch,
+ * and say so in that change.
+ */
+import { createHash } from 'node:crypto'
+import { existsSync, lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, readlinkSync, realpathSync, rmSync, statSync, writeFileSync } from 'node:fs'
+import { tmpdir } from 'node:os'
+import { dirname, join } from 'node:path'
+import { fileURLToPath } from 'node:url'
+import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'
+import { PROCESS_ENGINES, type AgentEngine } from './types.js'
+import { baseNode } from '../harnessd/baseNode.js'
+import { resolveBinaryOnPath } from '../lib/binaryOnPath.js'
+import type { RegisteredSession } from '../lib/registry.js'
+import type { GridLaunchOverride } from '../lib/gridLaunchWire.js'
+
+process.env.TZ = 'UTC'
+
+// The pane itself, the probes of this machine's binaries, and a harness's init: the launch is what is recorded.
+const pane = vi.hoisted(() => ({ calls: [] as Array<Record<string, unknown>>, tmux: true }))
+const init = vi.hoisted(() => ({ calls: [] as Array<Record<string, unknown>>, code: 0 as number | null, timedOut: false }))
+vi.mock('../lib/createAgentPane.js', () => ({
+ createAndRegisterPane: vi.fn(async (input: Record<string, unknown>) => {
+ pane.calls.push(input)
+ return { ok: false, error: 'RECORDED', detail: 'the pane is not opened by this spec' }
+ }),
+}))
+vi.mock('../lib/tmuxVersion.js', async (real) => ({ ...await real<object>(), tmuxSupportsSessionEnv: vi.fn(async () => pane.tmux) }))
+vi.mock('../engines/opencode/version.js', async (real) => ({ ...await real<object>(), opencodeMajorVersion: vi.fn(() => 2) }))
+vi.mock('../lib/engineBin.js', async (real) => ({ ...await real<object>(), enginePathOverride: vi.fn(() => null) }))
+// A create's and a fork's label is new each time, and their session's runtime is keyed on it: one per engine here.
+vi.mock('../lib/harnessSessionLabel.js', async (real) => ({ ...await real<object>(), buildHarnessSessionLabel: vi.fn((engine: string) => `harness-${engine}-golden`) }))
+vi.mock('../dsh/shell.js', async (real) => ({
+ ...await real<object>(),
+ runDshCommand: vi.fn(async (command: string, options: { cwd: string; env?: Record<string, string>; onLine?: (line: string) => void; timeoutMs?: number }) => {
+ init.calls.push({ command, cwd: options.cwd, env: options.env, timeoutMs: options.timeoutMs })
+ options.onLine?.('laying out the workspace')
+ // What the package's init does when it works: it marks the workspace as laid out.
+ if (init.code === 0 && !init.timedOut) writeFileSync(join(options.cwd, '.draw-ready'), 'ready\n')
+ return { code: init.code, signal: null, lines: ['laying out the workspace'], timedOut: init.timedOut }
+ }),
+}))
+
+const GOLDEN = fileURLToPath(new URL('./__fixtures__/dsh-launch-shapes.golden.json', import.meta.url))
+const RECORD = process.env.RECORD_DSH_LAUNCH_SHAPES_GOLDEN === '1'
+
+let root = ''
+const saved: Record<string, string | undefined> = {}
+/** The variables a launch reads of the daemon's own environment, each pinned (or cleared) for the record. */
+const VARS = ['ADAPTER_DATA_DIR', 'DSH_DIR', 'HOME', 'ZDOTDIR', 'SHELL', 'CODEX_HOME', 'CODEX_PATH', 'HARNESS_OS', 'HARNESS_GRID_BIN', 'CLAUDE_PATH',
+ 'CURSOR_PATH', 'OPENCODE_PATH', 'PI_PATH', 'HERMES_PATH', 'COMMANDCODE_PATH', 'DEVIN_PATH', 'MUSE_PATH', 'AMP_PATH', 'KILO_PATH', 'GROK_PATH',
+ 'AGY_PATH', 'COPILOT_PATH', 'XDG_CONFIG_HOME', 'XDG_DATA_HOME'] as const
+/** The launch scripts the cases name, by digest: most shapes share theirs with others. */
+const scripts: Record<string, string> = {}
+type Shapes = ReturnType<typeof import('../testing/launchShapes.js')['launchShapes']>
+let shapes: (gridName?: string | null) => Shapes
+let invalidate: () => void = () => {}
+
+const GRID: GridLaunchOverride = {
+ networkId: 'net-home', networkName: 'Home', baseUrl: 'https://grid.example/g/home/relay/v1', apiKey: 'grid-key-1', model: 'qwen3-coder',
+}
+const M1 = { hermesSystemManaged: false, opencodeMajor: 2 }
+
+/** The machine's own parts of a text, as placeholders: the spec's folders, this node. */
+const placeheld = (text: string): string => {
+ const node = baseNode(process.execPath)
+ const tmux = resolveBinaryOnPath('tmux') ?? 'tmux'
+ return text.split(`'${node}'`).join("'<daemon-node>'").split(`'${dirname(node)}'`).join("'<daemon-node-dir>'")
+ .split(`'${tmux}'`).join("'<tmux>'")
+ .split(root).join('<root>')
+ .replace(/\/launch\/[0-9a-f-]{36}\.sh/g, '/launch/<script>.sh')
+}
+const norm = (value: unknown): unknown => value === undefined ? '<undefined>' : JSON.parse(placeheld(JSON.stringify(value)))
+/** The script a launch's argv sources, kept once by its digest. */
+function scriptOf(argv: unknown): string | null {
+ const sourced = Array.isArray(argv) ? argv.map(String).map((arg) => /^\. '(.+\/launch\/[0-9a-f-]{36}\.sh)'$/.exec(arg)?.[1]).find(Boolean) : undefined
+ if (!sourced || !existsSync(sourced)) return null
+ const text = placeheld(readFileSync(sourced, 'utf8'))
+ const digest = createHash('sha256').update(text).digest('hex').slice(0, 16)
+ scripts[digest] = text
+ return digest
+}
+
+/** A folder's files: names, bytes and modes, and where each link points. */
+function tree(dir: string): Record<string, unknown> | null {
+ if (!existsSync(dir)) return null
+ const out: Record<string, unknown> = {}
+ for (const name of readdirSync(dir).sort()) {
+ const path = join(dir, name)
+ const info = lstatSync(path)
+ out[name] = info.isSymbolicLink() ? { link: readlinkSync(path) }
+ : info.isDirectory() ? { dir: tree(path) }
+ : { mode: (statSync(path).mode & 0o777).toString(8), text: readFileSync(path, 'utf8') }
+ }
+ return out
+}
+const write = (path: string, text: string): void => { mkdirSync(dirname(path), { recursive: true }); writeFileSync(path, text) }
+let folders = 0
+const work = (files: Record<string, string> = {}): string => {
+ const dir = join(root, 'work', `w${++folders}`)
+ mkdirSync(dir, { recursive: true })
+ for (const [name, text] of Object.entries(files)) write(join(dir, name), text)
+ return dir
+}
+
+// ------------------------------------------------------------------------------------------------ packages
+
+const DRAW = 'acme/draw'
+const BARE = 'acme/bare'
+const VIEWER = 'acme/viewer'
+const BROKEN = 'acme/broken'
+const RENAMED = 'acme/renamed'
+const MODEL_MANAGER = 'autonomous/autonomous-grid'
+const installed: Array<Record<string, unknown>> = []
+
+function install(manifest: Record<string, unknown>, files: Record<string, string> = {}): string {
+ const id = String(manifest.id)
+ const dir = join(root, 'dsh', ...id.split('/'))
+ rmSync(dir, { recursive: true, force: true })
+ for (const [name, text] of Object.entries(files)) write(join(dir, name), text)
+ write(join(dir, 'harness.json'), `${JSON.stringify(manifest, null, 2)}\n`)
+ const others = installed.filter((row) => row.id !== id)
+ installed.length = 0
+ installed.push(...others, { id, dir, source: dir, ref: null, commit: null, linked: false, installedAt: 1 })
+ write(join(root, 'dsh', 'installed.json'), `${JSON.stringify(installed, null, 2)}\n`)
+ invalidate()
+ return dir
+}
+const DRAW_FILES = {
+ 'AGENTS.md': '# Make a drawing\nYou are Claude Code in this workspace.\nRead `.claude/skills/draw/SKILL.md` first.\n',
+ 'skills/draw/SKILL.md': '# Draw\nRun the toolchain and write .harness/verdict.json.\n',
+ 'skills/paint/SKILL.md': '# Paint\nColour it in.\n',
+ 'template/README.md': '# A drawing\n',
+ 'template/input/brief.md': 'Draw a house.\n',
+ 'harness/init.sh': '#!/bin/sh\necho laying out\n',
+}
+function installAll(): void {
+ install({
+ spec: 1, id: DRAW, name: 'Drawing', engine: 'claude',
+ workspace: { template: 'template', marker: '.draw-ready', init: 'harness/init.sh' },
+ agent: {
+ instructions: 'AGENTS.md', skills: ['skills'], args: ['--add-dir', '${workspace}/input'],
+ env: { TOOLCHAIN: '${dsh}/tools', OLD_SKILLS: '${workspace}/.claude/skills', OTHER_SKILLS: '${workspace}/.agents/skills', HARNESS_DSH: 'spoofed' },
+ },
+ }, DRAW_FILES)
+ install({ spec: 1, id: BARE, name: 'Bare', engine: 'codex' })
+ install({ spec: 1, id: VIEWER, name: 'Viewer', kind: 'viewer', viewer: { command: 'serve', url: 'http://127.0.0.1:{port}/' } })
+ install({ spec: 1, id: BROKEN, name: 'Broken', engine: 'claude', agent: { skills: ['nothing-here'] } }, { 'nothing-here/README.md': 'no skill\n' })
+ install({ spec: 1, id: RENAMED, name: 'Renamed', engine: 'claude', formerly: ['acme/old-name'], agent: { instructions: 'AGENTS.md' } },
+ { 'AGENTS.md': '# Renamed\n' })
+ install({ spec: 1, id: MODEL_MANAGER, name: 'Grid', engine: 'codex', agent: { instructions: 'AGENTS.md' } }, { 'AGENTS.md': '# Grid\n' })
+}
+
+beforeAll(async () => {
+ root = realpathSync(mkdtempSync(join(tmpdir(), 'dsh-launch-shapes-golden-')))
+ for (const name of VARS) saved[name] = process.env[name]
+ for (const name of VARS) delete process.env[name]
+ process.env.ADAPTER_DATA_DIR = join(root, 'data')
+ process.env.DSH_DIR = join(root, 'dsh')
+ process.env.HOME = join(root, 'home')
+ process.env.SHELL = '/bin/zsh'
+ process.env.CODEX_HOME = join(root, 'home', '.codex')
+ process.env.XDG_CONFIG_HOME = join(root, 'home', '.config')
+ process.env.XDG_DATA_HOME = join(root, 'home', '.local', 'share')
+ process.env.ZDOTDIR = join(root, 'zdotdir')
+ for (const dir of ['data', 'zdotdir', 'home/.codex', 'dsh']) mkdirSync(join(root, dir), { recursive: true })
+ writeFileSync(join(root, 'zdotdir', '.zshrc'), '')
+ vi.resetModules()
+ const { launchShapes } = await import('../testing/launchShapes.js')
+ invalidate = (await import('../dsh/installed.js')).invalidateInstalledDsh
+ shapes = (gridName = null) => launchShapes({
+ dataDir: join(root, 'data'), machine: () => ({ ...M1 }), tmuxSupportsSessionEnv: async () => pane.tmux,
+ readCodexConfig: () => null, setGridLaunch: () => {}, gridName: () => gridName,
+ })
+})
+
+afterAll(() => {
+ for (const name of VARS) {
+ if (saved[name] === undefined) delete process.env[name]
+ else process.env[name] = saved[name]
+ }
+ rmSync(root, { recursive: true, force: true })
+ vi.resetModules()
+})
+
+/** What was logged while `run` ran. */
+async function logged<T>(run: () => Promise<T>): Promise<{ value: T; lines: string[] }> {
+ const lines: string[] = []
+ const keep = (...args: unknown[]) => { lines.push(args.map(String).join(' ')) }
+ const log = vi.spyOn(console, 'log').mockImplementation(keep)
+ const warn = vi.spyOn(console, 'warn').mockImplementation(keep)
+ try { return { value: await run(), lines } } finally { log.mockRestore(); warn.mockRestore() }
+}
+const home = (): unknown => tree(join(root, 'home'))
+/** A home whose Claude Code and Codex have been run before: each keeps its folder trust in a file it made. */
+const resetHome = (): void => {
+ rmSync(join(root, 'home'), { recursive: true, force: true })
+ write(join(root, 'home', '.claude.json'), '{\n "projects": {}\n}\n')
+ write(join(root, 'home', '.codex', 'config.toml'), 'model = "gpt-5"\n')
+}
+/** The pane a launch asked for, as far as a harness has a say in it. */
+const paneOf = (call: Record<string, unknown> | undefined): unknown => call ? {
+ argv: call.argv, script: scriptOf(call.argv), sessionLabel: call.sessionLabel, env: call.env, dsh: call.dsh, dshRuntime: call.dshRuntime, label: call.label,
+ permissionMode: call.permissionMode, bypassPermission: call.bypassPermission, grid: call.grid,
+} : null
+
+// ------------------------------------------------------------------------------------------------ create
+
+const pending = { agentId: 'created', sessionId: '', engine: 'claude' } as RegisteredSession
+const gridSetups: string[] = []
+const createRest = (privateGrid: string | null) => ({
+ tmuxBackend: {} as never, registry: { setLaunch: () => pending } as never,
+ adoptableSession: async () => ({ ok: false, error: 'UNUSED' }) as never, heldBy: async () => 'none' as const, takeOverWhenIdle: async () => {},
+ watchNewPane: (async () => {}) as never, announceSession: () => {}, attachDsh: () => {}, hookPort: 4242, hooksDisabled: true,
+ installOpencodePlugin: async () => true, terminalHintMachineName: () => 'this-mac', blocksFolder: () => false,
+ gridSetup: () => async (request: { ownGrid: boolean }) => { gridSetups.push(`ensure ownGrid=${request.ownGrid}`); return {} as never },
+ privateGridName: async () => privateGrid,
+})
+
+async function createCase(engine: AgentEngine, dsh: string, options: { files?: Record<string, string>; grid?: GridLaunchOverride; privateGrid?: string } = {}): Promise<unknown> {
+ pane.calls.length = 0
+ init.calls.length = 0
+ gridSetups.length = 0
+ resetHome()
+ const cwd = work(options.files)
+ const { value, lines } = await logged(() => shapes().create(createRest(options.privateGrid ?? null) as never)({
+ engine, cwd, bypassPermission: false, permissionMode: null, grid: options.grid ?? null, codexHome: null, dsh, prompt: null, name: null,
+ agent: null, resumeSessionId: null, takeOver: null,
+ } as never))
+ return norm({
+ result: value, pane: paneOf(pane.calls[0]), init: [...init.calls], gridSetup: [...gridSetups], folder: tree(cwd), home: home(),
+ logged: lines.filter((line) => /dsh|harness|refused|grid/i.test(line)),
+ })
+}
+
+async function createCases(): Promise<Record<string, unknown>> {
+ const cases: Record<string, unknown> = {}
+ for (const engine of PROCESS_ENGINES) cases[`${engine} · a harness in an empty folder`] = await createCase(engine, DRAW)
+ cases['claude · a folder with work in it'] = await createCase('claude', DRAW, { files: { 'README.md': '# Mine\n', 'CLAUDE.md': '# My rules\n' } })
+ cases['codex · a folder already laid out'] = await createCase('codex', DRAW, { files: { '.draw-ready': 'ready\n', 'AGENTS.md': '# Ours\n' } })
+ cases['codex · a package with nothing but an engine'] = await createCase('codex', BARE)
+ cases['claude · the account\'s private grid'] = await createCase('claude', DRAW, { privateGrid: 'grid-of-mine' })
+ cases['claude · on a grid too'] = await createCase('claude', DRAW, { grid: GRID })
+ cases['codex · the Model Manager'] = await createCase('codex', MODEL_MANAGER)
+ init.code = 2
+ cases['claude · an init that fails'] = await createCase('claude', DRAW)
+ init.code = null
+ init.timedOut = true
+ cases['claude · an init that runs out of time'] = await createCase('claude', DRAW)
+ init.code = 0
+ init.timedOut = false
+ cases['claude · a skill folder with no skill'] = await createCase('claude', BROKEN)
+ cases['claude · a viewer package'] = await createCase('claude', VIEWER)
+ cases['claude · a package not installed'] = await createCase('claude', 'acme/missing')
+ cases['terminal · a harness'] = await createCase('terminal', DRAW)
+ pane.tmux = false
+ cases['claude · an old tmux'] = await createCase('claude', DRAW)
+ pane.tmux = true
+ return cases
+}
+
+// ---------------------------------------------------------------------------------------------- relaunch
+
+const session = (engine: AgentEngine, over: Partial<RegisteredSession> = {}): RegisteredSession => ({
+ agentId: `agent-${engine}`, sessionId: 's', engine, cwd: work(), gridLaunch: null, codexHome: null, dsh: DRAW, dshRuntime: null, agent: null,
+ scmLaunch: null, ...over,
+}) as unknown as RegisteredSession
+
+async function relaunchCase(s: RegisteredSession, options: { gridName?: string; source?: Parameters<Shapes['relaunch']>[1]; before?: () => Promise<void> | void } = {}): Promise<unknown> {
+ await options.before?.()
+ const { value, lines } = await logged(() => shapes(options.gridName ?? null).relaunch(s, options.source))
+ return norm({ result: value, folder: s.cwd ? tree(s.cwd) : null, logged: lines.filter((line) => /dsh|harness|refused|grid/i.test(line)) })
+}
+
+async function relaunchCases(): Promise<Record<string, unknown>> {
+ const cases: Record<string, unknown> = {}
+ for (const engine of PROCESS_ENGINES) cases[`${engine} · restart a harness agent`] = await relaunchCase(session(engine))
+ {
+ // A session's runtime is its own: a package updated since does not change what it was created with.
+ const s = session('claude', { dshRuntime: 'created-1' })
+ await shapes().relaunch(s)
+ cases['claude · restart after the package changed'] = await relaunchCase(s, {
+ before: () => { write(join(root, 'dsh', 'acme', 'draw', 'AGENTS.md'), '# Make a painting\n') },
+ })
+ write(join(root, 'dsh', 'acme', 'draw', 'AGENTS.md'), DRAW_FILES['AGENTS.md'])
+ }
+ cases['claude · the account\'s private grid'] = await relaunchCase(session('claude'), { gridName: 'grid-of-mine' })
+ cases['claude · on a grid too'] = await relaunchCase(session('claude', { gridLaunch: GRID }))
+ cases['claude · a package that was renamed'] = await relaunchCase(session('claude', { dsh: 'acme/old-name' }))
+ cases['codex · a package with nothing but an engine'] = await relaunchCase(session('codex', { dsh: BARE }))
+ cases['claude · a package not installed'] = await relaunchCase(session('claude', { dsh: 'acme/missing' }))
+ cases['claude · no workspace on record'] = await relaunchCase(session('claude', { cwd: null } as Partial<RegisteredSession>))
+ {
+ const s = session('claude')
+ await shapes().relaunch(s)
+ cases['claude · a bootstrap edited by hand'] = await relaunchCase(s, {
+ before: () => { write(join(s.cwd!, 'CLAUDE.md'), readFileSync(join(s.cwd!, 'CLAUDE.md'), 'utf8').replace('<!-- harness:runtime v1 -->', '<!-- harness:runtime edited -->')) },
+ })
+ }
+ {
+ // The runtime a claude session made, asked for by a codex one.
+ const cwd = work()
+ await shapes().relaunch(session('claude', { cwd, dshRuntime: 'shared' }))
+ cases['codex · a runtime that belongs to another engine'] = await relaunchCase(session('codex', { cwd, dshRuntime: 'shared' }))
+ }
+ cases['claude · a skill folder with no skill'] = await relaunchCase(session('claude', { dsh: BROKEN }))
+ // Retarget hands the override it just resolved, and the harness still comes from the row.
+ cases['claude · retarget onto a grid'] = await relaunchCase(session('claude'), { source: { gridLaunch: GRID } })
+ return cases
+}
+
+// -------------------------------------------------------------------------------------------------- fork
+
+const mirror = { isBusy: () => false, recentAsks: () => [], recent: () => [], lastFullText: () => undefined }
+const forkRest = (source: RegisteredSession) => ({
+ tmuxBackend: {} as never, registry: { byAgent: (id: string) => (id === source.agentId ? source : undefined) } as never, mirror: mirror as never,
+ pendingForkInherit: new Map<string, string>(), watchNewPane: (async () => {}) as never, announceSession: () => {}, attachDsh: () => {},
+})
+
+async function forkCase(source: RegisteredSession, options: { gridName?: string; before?: () => Promise<void> | void } = {}): Promise<unknown> {
+ pane.calls.length = 0
+ await options.before?.()
+ const { value, lines } = await logged(() => shapes(options.gridName ?? null).fork(forkRest(source))({ agentId: source.agentId, name: null, prompt: null }))
+ return norm({
+ result: value, pane: paneOf(pane.calls[0]), folder: source.cwd ? tree(source.cwd) : null,
+ logged: lines.filter((line) => /dsh|harness|refused|grid|fork/i.test(line)),
+ })
+}
+
+async function forkCases(): Promise<Record<string, unknown>> {
+ const cases: Record<string, unknown> = {}
+ for (const engine of ['claude', 'codex', 'opencode', 'cursor'] as const) {
+ const source = session(engine, { dshRuntime: 'source-1' })
+ cases[`${engine} · a fork of a harness agent`] = await forkCase(source, { before: async () => { await shapes().relaunch(source) } })
+ }
+ {
+ // Created before rows recorded their runtime: the one under its agent id is the one to copy.
+ const source = session('claude')
+ cases['claude · a source whose runtime is under its agent id'] = await forkCase(source, { before: async () => { await shapes().relaunch(source) } })
+ }
+ cases['claude · a source with no runtime yet'] = await forkCase(session('claude'))
+ cases['claude · a runtime the row names that is gone'] = await forkCase(session('claude', { dshRuntime: 'gone' }))
+ {
+ const source = session('claude', { dshRuntime: 'source-2' })
+ cases['claude · the account\'s private grid'] = await forkCase(source, { gridName: 'grid-of-mine', before: async () => { await shapes().relaunch(source) } })
+ }
+ cases['claude · a package no longer installed'] = await forkCase(session('claude', { dsh: 'acme/missing' }))
+ return cases
+}
+
+type Sections = Record<string, Record<string, unknown>>
+const PLATFORMS = ['darwin', 'linux'] as const
+
+async function sectionsOn(platform: (typeof PLATFORMS)[number]): Promise<Sections> {
+ const real = Object.getOwnPropertyDescriptor(process, 'platform')!
+ Object.defineProperty(process, 'platform', { ...real, value: platform })
+ rmSync(join(root, 'work'), { recursive: true, force: true })
+ folders = 0
+ installAll()
+ try {
+ return { create: await createCases(), relaunch: await relaunchCases(), fork: await forkCases() }
+ } finally { Object.defineProperty(process, 'platform', real) }
+}
+
+describe('every launch of a harness package starts as it did before the Store prepared it', () => {
+ it('create, relaunch and fork match the record, on darwin and linux', async () => {
+ const darwin = await sectionsOn('darwin')
+ const linux = await sectionsOn('linux')
+ const linuxDiffers = Object.fromEntries(Object.entries(linux).map(([section, cases]) => [section,
+ Object.fromEntries(Object.entries(cases).filter(([key, value]) => JSON.stringify(value) !== JSON.stringify(darwin[section]![key])))]))
+ const used = Object.fromEntries(Object.entries(scripts).sort(([a], [b]) => a.localeCompare(b)))
+ if (RECORD) {
+ const block = (cases: Record<string, unknown>): string => Object.entries(cases).map(([key, value]) => ` ${JSON.stringify(key)}: ${JSON.stringify(value)}`).join(',\n')
+ const sections = (all: Sections): string => Object.entries(all).map(([section, cases]) => `${JSON.stringify(section)}: {\n${block(cases)}\n}`).join(',\n')
+ writeFileSync(GOLDEN, `{\n${sections(darwin)},\n"linux": {\n${sections(linuxDiffers)}\n},\n"scripts": {\n${block(used)}\n}\n}\n`)
+ return
+ }
+ const { linux: linuxGolden, scripts: scriptsGolden, ...darwinGolden } = JSON.parse(readFileSync(GOLDEN, 'utf8')) as Sections & { linux: Sections; scripts: Record<string, string> }
+ expect(Object.keys(used)).toEqual(Object.keys(scriptsGolden))
+ for (const [digest, text] of Object.entries(scriptsGolden)) expect(used[digest], `script ${digest}`).toEqual(text)
+ for (const [platform, actual, golden] of [
+ ['darwin', darwin, darwinGolden],
+ ['linux', linux, Object.fromEntries(Object.entries(darwinGolden).map(([section, cases]) => [section, { ...cases, ...linuxGolden[section] }]))],
+ ] as const) {
+ expect(Object.keys(actual), platform).toEqual(Object.keys(golden))
+ for (const [section, cases] of Object.entries(golden)) {
+ expect(Object.keys(actual[section]!).sort(), `${platform} · ${section}`).toEqual(Object.keys(cases).sort())
+ for (const [key, value] of Object.entries(cases)) expect(actual[section]![key], `${platform} · ${section} · ${key}`).toEqual(value)
+ }
+ }
+ }, 240_000)
+
+ it('records no machine-specific path', () => {
+ const text = readFileSync(GOLDEN, 'utf8')
+ expect(text).not.toContain('dsh-launch-shapes-golden-')
+ expect(text).not.toContain(root)
+ expect(text).not.toMatch(/\/Users\/|\/home\/runner/)
+ })
+})
diff --git a/cli/src/engines/launchArgv.golden.spec.ts b/cli/src/engines/launchArgv.golden.spec.ts
index 183781c7f..050abd024 100644
--- a/cli/src/engines/launchArgv.golden.spec.ts
+++ b/cli/src/engines/launchArgv.golden.spec.ts
@@ -409,12 +409,12 @@ async function overridesCases(): Promise<Record<string, unknown>> {
tmuxSupportsSessionEnv: async () => true,
installCodexHooks: (home) => { calls.push(`installCodexHooks ${home}`) },
readCodexConfig: (path) => { calls.push(`readCodexConfig ${path}`); return config },
- dshLaunch: (dsh, workspace, eng, key) => {
+ dshLaunch: async (dsh, workspace, eng, key) => {
calls.push(`dshLaunch ${dsh} ${workspace} ${eng} ${key}`)
// As dsh/runtime.ts prepareHarnessLaunch ends: the package's argv, then the engine's context and env flags.
const launchEnv = { HARNESS_DSH: dsh, HARNESS_WORKSPACE: workspace, HARNESS_CONTEXT_FILE: `${workspace}/.harness/runtime/${key}/CONTEXT.md`, STUDIO_MODE: 'pro "x"' }
const adapter = harnessAdapter(eng)
- return { env: launchEnv, args: ['--studio', ...(adapter.contextArgs?.(launchEnv.HARNESS_CONTEXT_FILE) ?? []), ...(adapter.envArgs?.(launchEnv) ?? [])] }
+ return { ok: true, launch: { env: launchEnv, args: ['--studio', ...(adapter.contextArgs?.(launchEnv.HARNESS_CONTEXT_FILE) ?? []), ...(adapter.envArgs?.(launchEnv) ?? [])] } }
},
...deps,
}, engine, source, 'agent-0001')
diff --git a/cli/src/lib/launchOverrides.ts b/cli/src/lib/launchOverrides.ts
index b70e0e146..00d678f47 100644
--- a/cli/src/lib/launchOverrides.ts
+++ b/cli/src/lib/launchOverrides.ts
@@ -29,7 +29,8 @@ import {
type GridLaunchRequest,
} from './gridLaunchWire.js'
import { TMUX_SESSION_ENV_MIN } from './tmuxVersion.js'
-import { harnessEnvToClear, type DshLaunch } from '../dsh/launch.js'
+import { harnessEnvToClear } from '../dsh/launch.js'
+import type { DshLaunchAnswer } from '../dsh/launchWire.js'
import { scmLaunchEnv } from '../scm/scmProjects.js'
import type { ScmLaunchRecord } from '../scm/types.js'
@@ -58,7 +59,7 @@ export interface LaunchOverrides {
/** A refusal names the service that could not be asked (`unavailable`) when that is all that stopped it. */
export type LaunchOverridesResult =
| { ok: true; overrides: LaunchOverrides }
- | { ok: false; error: string; detail: string; unavailable?: string }
+ | { ok: false; error: string; detail: string; unavailable?: string; holdScope?: 'workspace' }
export interface LaunchOverridesDeps {
/** The facts about THIS machine a contract needs and cannot read for itself — see `GridLaunchMachine`. */
@@ -86,7 +87,7 @@ export interface LaunchOverridesDeps {
readCodexConfig?: (path: string) => string | null
/** Prepare the saved harness context before restarting. Missing or broken packages refuse the
* relaunch: starting a plain agent would silently change the user's chosen harness. */
- dshLaunch?: (dsh: string, workspace: string, engine: AgentEngine, runtimeKey: string) => DshLaunch | null
+ dshLaunch?: (dsh: string, workspace: string, engine: AgentEngine, runtimeKey: string) => Promise<DshLaunchAnswer>
}
/** Where the agent should come back: the registry row, or an override the desktop just sent. */
@@ -181,13 +182,17 @@ export async function buildLaunchOverrides(
let overrides = base.overrides
if (source.dsh && !source.cwd) return { ok: false, error: 'DSH_WORKSPACE_MISSING', detail: `${source.dsh} has no saved workspace` }
if (source.dsh && source.cwd) {
- let dsh: DshLaunch | null
+ let prepared: DshLaunchAnswer | null
try {
- dsh = deps.dshLaunch?.(source.dsh, source.cwd, engine, source.dshRuntime ?? configKey) ?? null
+ prepared = await deps.dshLaunch?.(source.dsh, source.cwd, engine, source.dshRuntime ?? configKey) ?? null
} catch (error) {
return { ok: false, error: 'DSH_RUNTIME_FAILED', detail: String(error) }
}
- if (!dsh) return { ok: false, error: 'DSH_NOT_INSTALLED', detail: `${source.dsh} is not installed on this machine` }
+ if (!prepared) return { ok: false, error: 'DSH_NOT_INSTALLED', detail: `${source.dsh} is not installed on this machine` }
+ if (!prepared.ok) return { ok: false, error: prepared.error, detail: prepared.detail,
+ ...(prepared.unavailable ? { unavailable: prepared.unavailable } : {}),
+ ...(prepared.holdScope ? { holdScope: prepared.holdScope } : {}) }
+ const dsh = prepared.launch
// The DSH's variables layer over the grid's or the profile's; `HARNESS_*` are the daemon's own
// and a manifest cannot set them (see `dshLaunch`), so nothing here can shadow a grid credential.
overrides = {
diff --git a/cli/src/lib/registry.ts b/cli/src/lib/registry.ts
index bf71ca3fb..5b8eb0115 100644
--- a/cli/src/lib/registry.ts
+++ b/cli/src/lib/registry.ts
@@ -2318,7 +2318,9 @@ class Registry {
}, options.holdSavesMs)
timer?.unref?.()
try {
- return await apply()
+ const result = apply()
+ // A synchronous batch commits before another microtask can acknowledge a close intent.
+ return result instanceof Promise ? await result : result
} finally {
clearTimeout(timer)
release()
diff --git a/cli/src/lib/restartAgent.spec.ts b/cli/src/lib/restartAgent.spec.ts
index d44740bff..4c8aef32d 100644
--- a/cli/src/lib/restartAgent.spec.ts
+++ b/cli/src/lib/restartAgent.spec.ts
@@ -195,17 +195,38 @@ describe('restart cancellation', () => {
})
}
+ it('does not retain epochs for rejected unknown restart or resume IDs', async () => {
+ const coordinator = new AgentRestartCoordinator()
+ const before = coordinator.revision('known')
+ for (const operation of ['restart', 'resume']) for (let i = 0; i < 20; i++) {
+ const id = `${operation}-${i}`
+ await coordinator.run(id, async () => ({ ok: false, error: 'AGENT_NOT_FOUND' }), operation)
+ coordinator.cancel(id)
+ }
+ expect(coordinator.revision('next observed')).toBe(before + 1)
+ })
+
it('joins overlapping restarts but leaves other agents independent', async () => {
const coordinator = new AgentRestartCoordinator()
+ const initial = coordinator.revision('a')
+ expect(initial).toBeGreaterThan(0)
+ expect(coordinator.operation('a')).toBeUndefined()
let finish!: () => void
const handler = vi.fn(async () => { await new Promise<void>((resolve) => { finish = resolve }); return { ok: false, error: 'fixture' } as const })
const first = coordinator.run('a', handler)
+ expect(coordinator.revision('a')).toBe(initial + 1)
+ expect(coordinator.operation('a')).toBe('restart')
expect(coordinator.run('a', handler)).toBe(first)
expect(await coordinator.run('b', async () => ({ ok: false, error: 'other' }))).toEqual({ ok: false, error: 'other' })
finish()
await first
+ expect(coordinator.revision('a')).toBe(initial + 1)
expect(handler).toHaveBeenCalledTimes(1)
expect(await coordinator.run('a', async () => ({ ok: false, error: 'fresh' }))).toEqual({ ok: false, error: 'fresh' })
+ expect(coordinator.revision('a')).toBeGreaterThan(initial + 1)
+ const old = coordinator.revision('a')
+ coordinator.forget('a')
+ expect(coordinator.revision('a')).toBeGreaterThan(old)
})
it('Stop cancels before dispatch and during an outstanding step', async () => {
diff --git a/cli/src/lib/restartAgent.ts b/cli/src/lib/restartAgent.ts
index e03f3e305..834477d62 100644
--- a/cli/src/lib/restartAgent.ts
+++ b/cli/src/lib/restartAgent.ts
@@ -45,12 +45,22 @@ export type RestartAgentReply =
/** One process replacement per agent, even across clients and different receipt
* IDs. Stop cancels the work before its next process-changing step. */
export class AgentRestartCoordinator {
+ private readonly revisions = new Map<string, number>()
+ private sequence = 0
+ revision(agentId: string): number {
+ let revision = this.revisions.get(agentId)
+ if (revision === undefined) { revision = ++this.sequence; this.revisions.set(agentId, revision) }
+ return revision
+ }
+ forget(agentId: string): void { this.revisions.delete(agentId) }
+ operation(agentId: string): string | undefined { return this.jobs.get(agentId)?.operation }
private readonly jobs = new Map<string, { operation: string; cancelled: boolean; result: Promise<RestartAgentReply> }>()
run(agentId: string, restart: (current: () => boolean) => Promise<RestartAgentReply>, operation = 'restart'): Promise<RestartAgentReply> {
const existing = this.jobs.get(agentId)
if (existing) return existing.operation === operation ? existing.result
: Promise.resolve({ ok: false, error: 'AGENT_BUSY', detail: 'Another lifecycle operation is changing this harness.' })
+ if (this.revisions.has(agentId)) this.revisions.set(agentId, ++this.sequence)
const job = { operation, cancelled: false, result: null! as Promise<RestartAgentReply> }
const current = () => !job.cancelled && this.jobs.get(agentId) === job
job.result = Promise.resolve().then(async () => {
@@ -67,6 +77,7 @@ export class AgentRestartCoordinator {
busy(agentId: string): boolean { return this.jobs.has(agentId) }
cancel(agentId: string): void {
+ if (this.revisions.has(agentId)) this.revisions.set(agentId, ++this.sequence)
const job = this.jobs.get(agentId)
if (job) job.cancelled = true
}
diff --git a/cli/src/lib/restoreAgents.spec.ts b/cli/src/lib/restoreAgents.spec.ts
index 334328ce5..a6527047e 100644
--- a/cli/src/lib/restoreAgents.spec.ts
+++ b/cli/src/lib/restoreAgents.spec.ts
@@ -1,8 +1,15 @@
import { describe, expect, it, vi } from 'vitest'
-import type { AgentLaunch, ProcessIdentity, RegisteredSession } from './registry.js'
+import { registry as realRegistry, type AgentLaunch, type ProcessIdentity, type RegisteredSession } from './registry.js'
import type { TerminalRuntimeRef, TmuxRuntimeRef } from './terminalTypes.js'
import { GRID_CREDENTIAL_REQUIRED, heldLaunch, restoreAgents, tmuxSurvey, type RestoreAgentsDeps, type RestoreLaunch, type RestoreLaunchResult } from './restoreAgents.js'
import type { GridLaunchOverride } from './gridLaunch.js'
+import { createStopAgentService, type StopAgentServiceDeps } from './stopAgentService.js'
+import { AgentRestartCoordinator } from './restartAgent.js'
+import { createHeldLaunches } from '../core/agents/heldLaunches.js'
+import { createPaneSwap } from '../core/agents/swap.js'
+import { createPaneOperations } from '../core/agents/paneOperations.js'
+
+vi.mock('./captureResumeIdentity.js', () => ({ captureResumeIdentity: async (entry: RegisteredSession) => entry }))
const GRID: GridLaunchOverride = {
networkId: 'grid-abc',
@@ -119,17 +126,19 @@ function harness(rows: RegisteredSession[], opts: { livePanes?: string[]; aliveP
}
return launch
},
- createPane: async (entry, launch) => {
+ createPane: async (entry, launch, control) => {
note(`createPane:${entry.agentId}`)
h.launched.push({ agentId: entry.agentId, launch })
h.paneCreates++
if (opts.failCreate) return { ok: false, reason: 'tmux said no' }
+ control?.onDispatch?.()
return { ok: true, runtime: { backend: 'tmux', paneId: h.nextPane.shift() ?? '%99' } }
},
- respawn: async (runtime, launch) => {
+ respawn: async (runtime, launch, control) => {
note(`respawn:${runtime.paneId}:${launch.argv.join(' ')}`)
h.launched.push({ agentId: 'respawn', launch })
h.respawns++
+ control?.onDispatch?.()
return { ok: true }
},
probeProcess: async (runtime) => {
@@ -157,6 +166,232 @@ function harness(rows: RegisteredSession[], opts: { livePanes?: string[]; aliveP
const settled = (h: Harness, watches: number, successes = 0) =>
vi.waitFor(() => { expect(h.released.length).toBe(watches + successes) })
+describe('restore ownership across asynchronous work', () => {
+ const deferred = <T>() => {
+ let resolve!: (value: T) => void
+ return { promise: new Promise<T>(done => { resolve = done }), resolve }
+ }
+ const held = () => row({ launch: heldLaunch('store'), dsh: 'test/package' })
+
+ it('Stop beginning during Store preparation cancels restore before Stop removes the row', async () => {
+ const h = harness([held()], { alivePanes: ['%3'] })
+ const prepared = deferred<RestoreLaunchResult>()
+ const saving = deferred<void>()
+ const build = vi.fn(() => prepared.promise)
+ h.deps.buildLaunch = build
+ h.deps.only = new Set(['agent-a'])
+ const stopJobs = new Map<string, Promise<void>>()
+ h.deps.cancelled = id => stopJobs.has(id)
+ const stop = createStopAgentService({
+ registry: { resolve: (id: string) => h.rows.get(id) }, stopJobs,
+ restartJobs: new AgentRestartCoordinator(), stoppedAgents: { save: vi.fn() },
+ } as unknown as StopAgentServiceDeps)
+ const restoring = restoreAgents(h.deps)
+ await vi.waitFor(() => expect(build).toHaveBeenCalledOnce())
+ const checkpoint = vi.fn(async () => { await saving.promise; throw new Error('test checkpoint cancelled') })
+ const stopping = stop('agent-a', { checkpoint })
+ const ended = expect(stopping).rejects.toThrow('test checkpoint cancelled')
+ await vi.waitFor(() => expect(checkpoint).toHaveBeenCalledOnce())
+ expect(h.rows.get('agent-a')?.launch?.state).toBe('held')
+ prepared.resolve({ argv: ['must-not-launch'] })
+ expect((await restoring).restored).toEqual([])
+ expect(h.respawns).toBe(0)
+ saving.resolve()
+ await ended
+ })
+
+ it('a boot watch keeps the same epoch after pane-swap wiring is installed', async () => {
+ const h = harness([row()])
+ const restartJobs = new AgentRestartCoordinator()
+ const probe = deferred<ProcessIdentity | null>()
+ h.deps.revision = id => restartJobs.revision(id)
+ h.deps.probeProcess = () => probe.promise
+ await restoreAgents(h.deps)
+ const swap = createPaneSwap({ restartJobs, byAgent: h.deps.registry.byAgent, tmuxBackend: null,
+ prepareSessionResume: () => {}, keepAbandonedConversation: () => {} })
+ expect(swap.restartJobs).toBe(restartJobs)
+ probe.resolve(identity(8))
+ await settled(h, 1, 1)
+ expect(h.rows.get('agent-a')?.processIdentity).toEqual(identity(8))
+ })
+
+ it('a completed retarget invalidates the old watch even after its pin is released', async () => {
+ const h = harness([row()], { settleMs: 10_000 })
+ const jobs = new AgentRestartCoordinator()
+ const sleeping = deferred<void>()
+ const sleep = vi.fn(() => sleeping.promise)
+ let pinned = false
+ h.deps.revision = id => jobs.revision(id)
+ h.deps.cancelled = () => pinned
+ h.deps.sleep = sleep
+ h.probes.set('%0', [identity(8)])
+ h.states.set('%0', ['gone'])
+ await restoreAgents(h.deps)
+ await vi.waitFor(() => expect(sleep).toHaveBeenCalledOnce())
+ pinned = true
+ jobs.cancel('agent-a')
+ pinned = false
+ sleeping.resolve()
+ await settled(h, 1)
+ expect(h.respawns).toBe(1)
+ expect(h.calls.some(call => call.startsWith('unbind:'))).toBe(false)
+ })
+
+ it('the held retry still runs inside its own restart coordinator job', async () => {
+ const h = harness([held()], { alivePanes: ['%3'] })
+ const jobs = new AgentRestartCoordinator()
+ h.deps.revision = id => jobs.revision(id)
+ h.deps.cancelled = () => false
+ h.probes.set('%3', [identity(7)])
+ const retry = createHeldLaunches({ registry: h.deps.registry, log: vi.fn(),
+ restore: only => restoreAgents({ ...h.deps, only }) })
+ await retry.boot(async () => {})
+ expect(await jobs.run('agent-a', async () => {
+ expect(jobs.busy('agent-a')).toBe(true)
+ return retry.restartHeld('agent-a')!
+ })).toMatchObject({ ok: true, resumed: true })
+ await settled(h, 1, 1)
+ })
+
+ it.each(['allocation', 'respawn'] as const)('Stop joins only the dispatched %s and captures its committed pane', async phase => {
+ const h = harness([held()], { alivePanes: phase === 'respawn' ? ['%3'] : [] })
+ const operations = createPaneOperations()
+ const stopJobs = new Map<string, Promise<void>>()
+ h.deps.paneOperation = operations.run
+ h.deps.paneAllocations = operations.runMany
+ h.deps.paneBusy = operations.busy
+ h.deps.cancelled = id => stopJobs.has(id)
+ h.deps.only = new Set(['agent-a'])
+ h.deps.waitingLaunch = () => ({ argv: ['wait'] })
+ const reply = deferred<void>()
+ const dispatched = vi.fn()
+ const mark = vi.fn()
+ h.deps.engineStarted = mark
+ if (phase === 'allocation') h.deps.createPane = async (_entry, launch, control) => {
+ expect(launch.argv).toEqual(['wait'])
+ expect(control?.current?.()).toBe(true)
+ dispatched()
+ await reply.promise
+ return { ok: true, runtime: { backend: 'tmux', paneId: '%10' } }
+ }
+ else h.deps.respawn = async (_runtime, _launch, control) => {
+ expect(operations.busy('agent-a')).toBe(true)
+ expect(control?.current?.()).toBe(true)
+ control?.onDispatch?.()
+ expect(mark).toHaveBeenCalledWith('session-a')
+ expect(h.calls).toContain('hold:tmux\u0000%3')
+ dispatched()
+ await reply.promise
+ return { ok: true }
+ }
+ const stop = createStopAgentService({
+ registry: { resolve: (id: string) => h.rows.get(id) }, stopJobs, settlePane: operations.settle,
+ restartJobs: new AgentRestartCoordinator(), stoppedAgents: { save: vi.fn() },
+ } as unknown as StopAgentServiceDeps)
+ const restoring = restoreAgents(h.deps)
+ await vi.waitFor(() => expect(dispatched).toHaveBeenCalledOnce())
+ const checkpoint = vi.fn(async (entry: RegisteredSession) => {
+ expect(entry.runtimes).toEqual([{ backend: 'tmux', paneId: phase === 'allocation' ? '%10' : '%3' }])
+ throw new Error('test checkpoint cancelled')
+ })
+ const ended = expect(stop('agent-a', { checkpoint })).rejects.toThrow('test checkpoint cancelled')
+ await Promise.resolve()
+ expect(checkpoint).not.toHaveBeenCalled()
+ reply.resolve()
+ await restoring
+ await ended
+ if (phase === 'allocation') {
+ expect(h.respawns).toBe(0)
+ expect(mark).not.toHaveBeenCalled()
+ }
+ })
+
+ it('an old watcher cannot release a newer route hold or undo a competing lifecycle generation', async () => {
+ const h = harness([row()])
+ const jobs = new AgentRestartCoordinator()
+ h.deps.revision = id => jobs.revision(id)
+ const probe = deferred<ProcessIdentity | null>()
+ const probing = vi.fn(() => probe.promise)
+ h.deps.probeProcess = probing
+ let generation = 0
+ let held = false
+ const releases: number[] = []
+ h.deps.holdRoute = () => {
+ const own = ++generation
+ held = true
+ return () => { releases.push(own); if (own === generation) held = false }
+ }
+ await restoreAgents(h.deps)
+ await vi.waitFor(() => expect(probing).toHaveBeenCalledOnce())
+ h.deps.holdRoute('tmux\u0000%0', 1000)
+ await jobs.run('agent-a', async () => ({ ok: false, error: 'new restart' }))
+ probe.resolve(identity(7))
+ await vi.waitFor(() => expect(releases).toEqual([1]))
+ expect(held).toBe(true)
+ expect(h.calls.some(call => call.startsWith('updateIdentity'))).toBe(false)
+ expect(h.respawns).toBe(1)
+ })
+
+ it.each(['create', 'respawn', 'reason'] as const)('a replacement during awaited pane %s is never overwritten', async operation => {
+ const h = harness([held()], { alivePanes: operation === 'create' ? [] : ['%3'] })
+ h.deps.only = new Set(['agent-a'])
+ const pending = deferred<void>()
+ const waiting = vi.fn(async () => { await pending.promise })
+ h.deps.engineStarted = vi.fn()
+ if (operation === 'create') h.deps.createPane = async () => { await waiting(); return { ok: true, runtime: { backend: 'tmux', paneId: '%new' } } }
+ else h.deps.respawn = async () => { await waiting(); return { ok: true } }
+ if (operation === 'reason') {
+ h.deps.waitingLaunch = (_entry, launch) => ({ argv: ['wait', launch.detail] })
+ h.deps.buildLaunch = async () => ({ held: 'store', detail: 'Review unconfirmed initialization', holdScope: 'workspace' })
+ }
+ const result = restoreAgents(h.deps)
+ await vi.waitFor(() => expect(waiting).toHaveBeenCalledOnce())
+ const replacement = row({ sessionId: 'replacement', launch: { state: 'ready' } })
+ h.rows.set('agent-a', replacement)
+ pending.resolve()
+ expect(await result).toMatchObject({ restored: [], held: [], failed: [] })
+ expect(h.rows.get('agent-a')).toEqual(replacement)
+ expect(h.deps.engineStarted).not.toHaveBeenCalled()
+ expect(h.calls.some(call => /updateRuntimes|setLaunch/.test(call))).toBe(false)
+ })
+
+ it.each([false, true])('fresh fallback preserves the conversation and exact held reason: terminal %s', async terminalHost => {
+ const h = harness([row({ terminalHost })])
+ h.deps.keepAbandoned = vi.fn()
+ const build = h.deps.buildLaunch
+ h.deps.buildLaunch = (entry, opts) => opts.resumeSessionId ? build(entry, opts)
+ : Promise.resolve({ held: 'store', detail: 'Workspace preparation is unconfirmed; review required.', holdScope: 'workspace' })
+ h.deps.waitingLaunch = (_entry, launch) => ({ argv: ['wait', launch.detail] })
+ h.states.set('%0', [{ dead: true }])
+ await restoreAgents(h.deps)
+ await settled(h, 1)
+ expect(h.rows.get('agent-a')).toMatchObject({ sessionId: 'session-a', engine: 'claude',
+ launch: { state: 'held', detail: 'Workspace preparation is unconfirmed; review required.' } })
+ expect(h.calls).toContain('respawn:%0:wait Workspace preparation is unconfirmed; review required.')
+ expect(h.deps.keepAbandoned).not.toHaveBeenCalled()
+ expect(h.calls.some(call => /unbind|releaseEngine|inheritName/.test(call))).toBe(false)
+ })
+
+ it.each([false, true])('fresh fallback cannot respawn or archive after replacement during preparation: terminal %s', async terminalHost => {
+ const h = harness([row({ terminalHost })])
+ h.deps.keepAbandoned = vi.fn()
+ const pending = deferred<RestoreLaunchResult>()
+ const build = h.deps.buildLaunch
+ const fresh = vi.fn(() => pending.promise)
+ h.deps.buildLaunch = (entry, opts) => opts.resumeSessionId ? build(entry, opts) : fresh()
+ h.states.set('%0', [{ dead: true }])
+ await restoreAgents(h.deps)
+ await vi.waitFor(() => expect(fresh).toHaveBeenCalledOnce())
+ const replacement = row({ sessionId: 'replacement' })
+ h.rows.set('agent-a', replacement)
+ pending.resolve({ argv: ['stale'] })
+ await settled(h, 1)
+ expect(h.rows.get('agent-a')).toEqual(replacement)
+ expect(h.respawns).toBe(1)
+ expect(h.deps.keepAbandoned).not.toHaveBeenCalled()
+ })
+})
+
describe('restoreAgents — a survey that could not tell', () => {
it('asks a probe that could not answer again, and judges the row by the answer it then gives', async () => {
const h = harness([row()])
@@ -192,6 +427,23 @@ describe('restoreAgents — a survey that could not tell', () => {
expect(h.calls.filter((call) => /releaseEngine|createPane/.test(call))).toEqual([])
})
+ it('each held restore reads a fresh tmux inventory, preserving its pane until it actually disappears', async () => {
+ const h = harness([row({ launch: heldLaunch('store') })])
+ let panes: Array<{ tmuxPane: string }> = []
+ const list = vi.fn(async () => ({ ok: true as const, panes }))
+ h.deps.survey = () => tmuxSurvey(list, async () => ({ ok: false, unknown: false }))
+ h.deps.only = new Set(['agent-a'])
+ h.deps.buildLaunch = async () => ({ held: 'store' })
+ await restoreAgents(h.deps)
+ panes = [{ tmuxPane: '%0' }]
+ await restoreAgents(h.deps)
+ expect(h.paneCreates).toBe(1)
+ panes = []
+ await restoreAgents(h.deps)
+ expect(h.paneCreates).toBe(2)
+ expect(list).toHaveBeenCalledTimes(3)
+ })
+
it('the tmux survey reads one pane listing, again only after a read that failed', async () => {
const listings: Array<{ ok: true; panes: Array<{ tmuxPane: string }> } | { ok: false }> = [
{ ok: false }, { ok: true, panes: [{ tmuxPane: '%3' }] },
@@ -219,17 +471,14 @@ describe('restoreAgents — which agents get a pane back', () => {
expect(summary).toEqual({ restored: ['agent-a'], skipped: [], failed: [], held: [], unsurveyed: [] })
expect(h.launches).toEqual([{ agentId: 'agent-a', resumeSessionId: 'session-a' }])
- // Every registry write of phase 1 happens inside the one transaction, in this order.
- expect(h.calls.slice(0, 5)).toEqual([
- 'clearIdentity:agent-a@tx',
- 'createPane:agent-a@tx',
- 'hold:tmux\u0000%0@tx',
- 'updateRuntimes:agent-a:%0@tx',
- 'setLaunch:agent-a:starting@tx',
+ // Waiting shell allocation is outside the atomic route commit; engine dispatch follows it.
+ expect(h.calls.slice(0, 7)).toEqual([
+ 'createPane:agent-a', 'updateRuntimes:agent-a:%0@tx', 'setLaunch:agent-a:held@tx',
+ 'clearIdentity:agent-a', 'hold:tmux\u0000%0', 'respawn:%0:claude --resume session-a', 'setLaunch:agent-a:starting',
])
await settled(h, 1, 1)
// The route is released BEFORE the hint so the pass it triggers sees the pane again.
- expect(h.calls.slice(5)).toEqual([
+ expect(h.calls.slice(7)).toEqual([
'updateIdentity:agent-a:500',
'clearRemainOnExit:%0',
'release:tmux\u0000%0',
@@ -250,7 +499,7 @@ describe('restoreAgents — which agents get a pane back', () => {
await settled(h, 1, 1)
})
- it('says a rebuilt pane runs a new engine on its conversation, and only once the pane is up', async () => {
+ it('marks a new engine at dispatch, before it can attach, and never for a refused creation', async () => {
const h = harness([row(), row({ agentId: 'agent-b', sessionId: 'session-b', tmuxPane: '%1' })])
h.probes.set('%0', [null, identity(500)])
h.probes.set('%1', [null, identity(501)])
@@ -258,7 +507,7 @@ describe('restoreAgents — which agents get a pane back', () => {
let panes = 0
const createPane = h.deps.createPane
// The second pane cannot be opened: its conversation keeps whatever engine it had.
- const summary = await restoreAgents({ ...h.deps, engineStarted, createPane: async (entry, launch) => (++panes === 2 ? { ok: false, reason: 'no room' } : createPane(entry, launch)) })
+ const summary = await restoreAgents({ ...h.deps, engineStarted, createPane: async (entry, launch, control) => (++panes === 2 ? { ok: false, reason: 'no room' } : createPane(entry, launch, control)) })
expect(summary.restored).toEqual(['agent-a'])
expect(engineStarted.mock.calls).toEqual([['session-a']])
await settled(h, 1, 1)
@@ -296,7 +545,7 @@ describe('restoreAgents — which agents get a pane back', () => {
h.probes.set('%0', [identity(7)])
const summary = await restoreAgents(h.deps)
expect(summary).toEqual({ restored: ['gridded'], skipped: [], failed: [], held: [], unsurveyed: [] })
- expect(h.launched).toEqual([{ agentId: 'gridded', launch: { argv: ['claude', '--resume', 'session-a', '--grid', 'grid-abc'], env: { GRID_API_KEY: 'gridkey-abc123' } } }])
+ expect(h.launched).toEqual([{ agentId: 'gridded', launch: { argv: [] } }, { agentId: 'respawn', launch: { argv: ['claude', '--resume', 'session-a', '--grid', 'grid-abc'], env: { GRID_API_KEY: 'gridkey-abc123' } } }])
await settled(h, 1, 1)
})
@@ -306,8 +555,8 @@ describe('restoreAgents — which agents get a pane back', () => {
h.probes.set('%0', [null, identity(8)])
await restoreAgents(h.deps)
await settled(h, 1, 1)
- expect(h.launched.map((l) => l.launch.env)).toEqual([{ GRID_API_KEY: 'gridkey-abc123' }, { GRID_API_KEY: 'gridkey-abc123' }])
- expect(h.launched[1].launch.argv).toEqual(['claude', '--grid', 'grid-abc'])
+ expect(h.launched.slice(1).map((l) => l.launch.env)).toEqual([{ GRID_API_KEY: 'gridkey-abc123' }, { GRID_API_KEY: 'gridkey-abc123' }])
+ expect(h.launched[2].launch.argv).toEqual(['claude', '--grid', 'grid-abc'])
})
it('does not relaunch a grid agent whose credential was never persisted, and marks it so', async () => {
@@ -325,15 +574,17 @@ describe('restoreAgents — which agents get a pane back', () => {
const h = harness([row({ agentId: 'gridded', grid: { baseUrl: GRID.baseUrl, model: null }, gridLaunch: GRID })], { refuseLaunch: true })
const summary = await restoreAgents(h.deps)
expect(summary.failed).toEqual([{ agentId: 'gridded', reason: 'no way to point it at a grid' }])
- expect(h.paneCreates).toBe(0)
- expect(h.calls).toEqual(['clearIdentity:gridded@tx', 'setLaunch:gridded:failed:GRID_ENGINE_UNSUPPORTED@tx'])
+ expect(h.paneCreates).toBe(1)
+ expect(h.respawns).toBe(0)
+ expect(h.launched[0].launch.argv).toEqual([])
+ expect(h.calls.at(-1)).toBe('setLaunch:gridded:failed:GRID_ENGINE_UNSUPPORTED')
})
it('a Codex profile agent comes back under its own CODEX_HOME', async () => {
const h = harness([row({ agentId: 'profiled', engine: 'codex', codexHome: '/home/u/.codex-work' })])
h.probes.set('%0', [identity(9)])
await restoreAgents(h.deps)
- expect(h.launched[0].launch.env).toEqual({ CODEX_HOME: '/home/u/.codex-work' })
+ expect(h.launched[1].launch.env).toEqual({ CODEX_HOME: '/home/u/.codex-work' })
await settled(h, 1, 1)
})
@@ -429,6 +680,57 @@ describe('restoreAgents — held until the service a launch asks is ready', () =
expect(h.rows.get('second')?.launch).toEqual(HELD)
})
+ it('asks a failed Store only once when each harness also needs models', async () => {
+ const h = harness([gridRow('first', { launch: HELD, dsh: 'test/draw' }), gridRow('second', { launch: HELD, dsh: 'test/draw' })])
+ withModels(h)
+ h.deps.needs = () => ['models', 'store']
+ const asks: string[] = []
+ h.deps.buildLaunch = async entry => { asks.push(entry.agentId); return { held: 'store' } }
+ const summary = await restoreAgents(h.deps)
+ expect(asks).toEqual(['first'])
+ expect(summary.held).toEqual(['first', 'second'])
+ expect(summary.failed).toEqual([])
+ expect(h.rows.get('first')?.launch).toEqual(heldLaunch('store'))
+ expect(h.rows.get('second')?.launch).toEqual(heldLaunch('store'))
+ })
+
+ it.each(['removed', 'stopped', 'moved', 'rebound'] as const)('a held restore cannot undo a session %s while preparation was in flight', async change => {
+ const entry = gridRow('gridded', { launch: HELD })
+ const h = harness([entry], { alivePanes: ['%47'] })
+ withModels(h)
+ h.deps.only = new Set(['gridded'])
+ h.deps.buildLaunch = async () => {
+ if (change === 'removed') h.rows.delete('gridded')
+ else {
+ const row = h.rows.get('gridded')!
+ h.rows.set('gridded', { ...row, ...(change === 'stopped' ? { launch: undefined } : change === 'rebound'
+ ? { sessionId: 'new-session' } : { runtimes: [{ backend: 'tmux', paneId: '%99' }], primaryRuntimeKey: 'tmux\u0000%99' }) })
+ }
+ return { argv: ['must-not-run'] }
+ }
+ const summary = await restoreAgents(h.deps)
+ expect(summary.restored).toEqual([])
+ expect(h.calls.filter(call => call.startsWith('respawn:'))).toEqual([])
+ expect(h.paneCreates).toBe(0)
+ })
+
+ it('keeps an unconfirmed workspace held with its exact reason while other workspaces can launch', async () => {
+ const h = harness([gridRow('first', { launch: HELD }), gridRow('second', { launch: HELD })], { alivePanes: ['%45', '%46'] })
+ withModels(h)
+ h.deps.only = new Set(['first', 'second'])
+ const original = h.deps.buildLaunch
+ h.deps.buildLaunch = async (entry, opts) => entry.agentId === 'first'
+ ? { held: 'store', holdScope: 'workspace', detail: 'Workspace preparation is unconfirmed; review required.' }
+ : original(entry, opts)
+ h.probes.set('%46', [identity(8)])
+ const summary = await restoreAgents(h.deps)
+ expect(summary.held).toEqual(['first'])
+ expect(summary.restored).toEqual(['second'])
+ expect(h.rows.get('first')?.launch).toMatchObject({ state: 'held', service: 'store', detail: 'Workspace preparation is unconfirmed; review required.' })
+ expect(h.calls).toContain('respawn:%45:wait Workspace preparation is unconfirmed; review required.')
+ await settled(h, 1, 1)
+ })
+
it('never fails or skips a held agent: the next restore holds it again, its pane gone with a reboot', async () => {
const h = harness([gridRow('gridded', { launch: HELD, resumeOnly: true })])
withModels(h)
@@ -473,7 +775,7 @@ describe('restoreAgents — held until the service a launch asks is ready', () =
expect(h.launches).toEqual([{ agentId: 'gridded' }])
})
- it('holds an agent whose fresh relaunch needs a service that cannot be asked, in its pane, never failed', async () => {
+ it.each([false, true])('holds an agent whose service and waiting pane are unavailable (throwing reply %s)', async throws => {
const h = harness([gridRow('gridded')])
withModels(h, [undefined as never, 'held'])
h.probes.set('%0', [null, null])
@@ -482,15 +784,25 @@ describe('restoreAgents — held until the service a launch asks is ready', () =
await settled(h, 1)
expect(h.calls).toContain(`respawn:%0:wait ${HELD.state === 'held' ? HELD.detail : ''}`)
expect(h.rows.get('gridded')?.launch).toEqual(HELD)
- // A waiting pane that cannot be had is the one failure left.
+ // A waiting pane that cannot be had preserves the conversation and both reasons.
const stuck = harness([gridRow('gridded')])
withModels(stuck, [undefined as never, 'held'])
- stuck.deps.respawn = async () => ({ ok: false })
+ const respawn = stuck.deps.respawn
+ let dispatched = false
+ stuck.deps.respawn = async (...args) => { if (dispatched) { if (throws) throw new Error('test uncertain reply'); return { ok: false } }; dispatched = true; return respawn(...args) }
stuck.probes.set('%0', [null, null])
stuck.states.set('%0', [{ dead: true }])
await restoreAgents(stuck.deps)
await settled(stuck, 1)
- expect(stuck.rows.get('gridded')?.launch).toMatchObject({ state: 'failed', error: 'ENGINE_DID_NOT_START', detail: expect.stringContaining('unknown reason') })
+ expect(stuck.rows.get('gridded')).toMatchObject({ sessionId: 'session-gridded', launch: { state: 'held', service: 'models', detail: expect.stringContaining(throws ? 'test uncertain reply' : 'unknown reason') } })
+ expect(stuck.calls.some(call => /unbind:|inheritName:/.test(call))).toBe(false)
+ // Even a missing waiting shell is recoverable once preparation can be asked again.
+ stuck.deps.only = new Set(['gridded'])
+ stuck.deps.respawn = respawn
+ stuck.probes.set('%1', [identity(12)])
+ expect((await restoreAgents(stuck.deps)).restored).toEqual(['gridded'])
+ await settled(stuck, 2, 1)
+ expect(stuck.rows.get('gridded')?.sessionId).toBe('session-gridded')
})
it('holds a terminal whose adopted engine needs a service to come back, too', async () => {
@@ -515,7 +827,7 @@ describe('restoreAgents — waiting for the engine', () => {
h.states.set('%0', [{ dead: true }])
await restoreAgents(h.deps)
await settled(h, 1)
- expect(h.respawns).toBe(0)
+ expect(h.respawns).toBe(1)
expect(h.launches).toEqual([{ agentId: 'agent-a', resumeSessionId: 'session-a' }])
expect(h.rows.get('agent-a')?.launch).toMatchObject({ state: 'failed', error: 'RESUME_FAILED' })
expect(h.calls).not.toContain('unbind:session-a')
@@ -536,13 +848,13 @@ describe('restoreAgents — waiting for the engine', () => {
await restoreAgents(h.deps)
await settled(h, 1, 1)
- expect(h.respawns).toBe(1)
+ expect(h.respawns).toBe(2)
expect(h.launches).toEqual([
{ agentId: 'agent-a', resumeSessionId: 'session-a' },
{ agentId: 'agent-a' },
])
- const tail = h.calls.slice(5)
- expect(tail.slice(0, 3)).toEqual(['inheritName:session-a->agent-a', 'unbind:session-a', 'respawn:%0:claude'])
+ const tail = h.calls.slice(7)
+ expect(tail.slice(0, 4)).toEqual(['inheritName:session-a->agent-a', 'unbind:session-a', 'hold:tmux\u0000%0', 'respawn:%0:claude'])
expect(tail).toContain('updateIdentity:agent-a:9')
expect(h.rows.get('agent-a')?.launch).toEqual({ state: 'starting' })
})
@@ -570,10 +882,10 @@ describe('restoreAgents — waiting for the engine', () => {
await restoreAgents(h.deps)
await settled(h, 1, 1)
- expect(h.respawns).toBe(1)
+ expect(h.respawns).toBe(2)
expect(h.launches.map((l) => l.resumeSessionId ?? 'fresh')).toEqual(['session-a', 'fresh'])
- const tail = h.calls.slice(5)
- expect(tail.slice(0, 4)).toEqual(['updateIdentity:agent-a:7', 'inheritName:session-a->agent-a', 'unbind:session-a', 'respawn:%0:claude'])
+ const tail = h.calls.slice(7)
+ expect(tail.slice(0, 5)).toEqual(['updateIdentity:agent-a:7', 'inheritName:session-a->agent-a', 'unbind:session-a', 'hold:tmux\u0000%0', 'respawn:%0:claude'])
expect(tail).toContain('updateIdentity:agent-a:8')
expect(tail).toContain('clearRemainOnExit:%0')
// remain-on-exit was NOT cleared before the first engine died — that is what kept the pane.
@@ -587,7 +899,7 @@ describe('restoreAgents — waiting for the engine', () => {
h.states.set('%0', [{ dead: true }])
await restoreAgents(h.deps)
await settled(h, 1)
- expect(h.respawns).toBe(0)
+ expect(h.respawns).toBe(1)
expect(h.rows.get('agent-a')?.launch).toMatchObject({ state: 'failed', error: 'ENGINE_DID_NOT_START' })
})
@@ -596,7 +908,7 @@ describe('restoreAgents — waiting for the engine', () => {
h.states.set('%0', [{ dead: true }, { dead: true }])
await restoreAgents(h.deps)
await settled(h, 1)
- expect(h.respawns).toBe(1)
+ expect(h.respawns).toBe(2)
expect(h.rows.get('agent-a')?.launch).toMatchObject({ state: 'failed', error: 'ENGINE_DID_NOT_START' })
})
@@ -605,7 +917,7 @@ describe('restoreAgents — waiting for the engine', () => {
h.states.set('%0', [{ dead: true }])
await restoreAgents(h.deps)
await settled(h, 1)
- expect(h.respawns).toBe(0)
+ expect(h.respawns).toBe(1)
expect(h.rows.get('agent-a')?.launch).toMatchObject({ state: 'failed', error: 'ENGINE_DID_NOT_START' })
})
@@ -636,7 +948,7 @@ describe('restoreAgents — waiting for the engine', () => {
h.states.set('%0', ['unknown', 'unknown', 'unknown'])
await restoreAgents(h.deps)
await settled(h, 1, 1)
- expect(h.respawns).toBe(0)
+ expect(h.respawns).toBe(1)
expect(h.calls.some((call) => call.startsWith('unbind:'))).toBe(false)
expect(h.calls).toContain('triggerHint:%0')
})
@@ -679,11 +991,8 @@ describe('restoreAgents — terminals', () => {
expect(summary).toEqual({ restored: ['term-1'], skipped: [], failed: [], held: [], unsurveyed: [] })
expect(h.launches).toEqual([{ agentId: 'term-1' }])
expect(h.calls).toEqual([
- 'clearIdentity:term-1@tx',
- 'createPane:term-1@tx',
- 'updateRuntimes:term-1:%0@tx',
- 'setLaunch:term-1:ready@tx',
- 'clearRemainOnExit:%0@tx',
+ 'createPane:term-1', 'updateRuntimes:term-1:%0@tx', 'setLaunch:term-1:held@tx',
+ 'clearIdentity:term-1', 'respawn:%0:terminal', 'setLaunch:term-1:ready', 'clearRemainOnExit:%0',
])
expect(h.rows.get('term-1')?.launch).toEqual({ state: 'ready' })
})
@@ -720,7 +1029,7 @@ describe('restoreAgents — terminals', () => {
h.states.set('%0', [{ dead: false, engineExit: 1 }, { dead: false }, { dead: false }, { dead: false }])
await restoreAgents(h.deps)
await settled(h, 1, 1)
- expect(h.respawns).toBe(1)
+ expect(h.respawns).toBe(2)
expect(h.launches).toEqual([{ agentId: 'agent-a', resumeSessionId: 'session-a' }, { agentId: 'agent-a' }])
})
@@ -730,7 +1039,7 @@ describe('restoreAgents — terminals', () => {
expect(summary).toEqual({ restored: ['term-1'], skipped: [], failed: [], held: [], unsurveyed: [] })
expect(h.calls[0]).toBe('releaseEngine:term-1')
expect(h.launches).toEqual([{ agentId: 'term-1' }])
- expect(h.launched[0].launch.argv[0]).toBe('terminal')
+ expect(h.launched[1].launch.argv[0]).toBe('terminal')
expect(h.rows.get('term-1')).toMatchObject({ engine: 'terminal', launch: { state: 'ready' } })
})
@@ -742,10 +1051,10 @@ describe('restoreAgents — terminals', () => {
expect(summary).toEqual({ restored: ['term-1'], skipped: [], failed: [], held: [], unsurveyed: [] })
expect(h.calls).not.toContain('releaseEngine:term-1')
expect(h.launches).toEqual([{ agentId: 'term-1', resumeSessionId: 'ses_kept' }])
- expect(h.launched[0].launch.argv).toEqual([engine, '--resume', 'ses_kept'])
+ expect(h.launched[1].launch.argv).toEqual([engine, '--resume', 'ses_kept'])
await settled(h, 1, 1)
expect(h.rows.get('term-1')).toMatchObject({ engine, terminalHost: true, sessionId: 'ses_kept' })
- expect(h.respawns).toBe(0)
+ expect(h.respawns).toBe(1)
})
it('reopens the terminal, never a fresh engine, when the conversation it was resuming is refused', async () => {
@@ -789,7 +1098,7 @@ it('restores a confirmed strict-resume pane by exact resume, and never falls bac
expect(h.paneCreates).toBe(1)
expect(h.launches).toEqual([{ agentId: 'agent-a', resumeSessionId: 'session-a' }])
await settled(h, 1)
- expect(h.respawns).toBe(0)
+ expect(h.respawns).toBe(1)
expect(h.rows.get('agent-a')?.launch).toMatchObject({ state: 'failed', error: 'RESUME_FAILED' })
expect(h.calls).not.toContain('unbind:session-a')
})
@@ -803,3 +1112,108 @@ it('archives an engine that exited while the daemon was down without overwriting
expect(h.paneCreates).toBe(0)
expect(h.respawns).toBe(0)
})
+
+
+describe('missing held panes against the durable registry', () => {
+ it.each([['cycle', false], ['chain failure', false], ['cycle', true], ['chain failure', true], ['outside selection', true]] as const)('preserves every row through a recycled route %s (held pass %s)', async (mode, only) => {
+ const old = mode === 'cycle' ? ['%1', '%0'] : mode === 'chain failure' ? ['%2', '%0', '%1'] : ['%3', '%0']
+ const entries = old.map(paneId => realRegistry.openPendingAgent({ engine: 'claude', runtimes: [{ backend: 'tmux', paneId }], cwd: '/tmp' })!)
+ try {
+ for (const entry of entries) realRegistry.setLaunch(entry.agentId, heldLaunch('store'))
+ const h = harness(entries)
+ h.deps.registry = realRegistry
+ if (only) h.deps.only = new Set((mode === 'outside selection' ? entries.slice(0, 1) : entries).map(entry => entry.agentId))
+ h.deps.buildLaunch = async () => ({ held: 'store' })
+ h.deps.log = vi.fn()
+ if (mode === 'chain failure') {
+ const create = h.deps.createPane
+ h.deps.createPane = async (entry, launch, control) => entry.agentId === entries[2].agentId
+ ? { ok: false, reason: 'test allocation failed' } : create(entry, launch, control)
+ }
+ const result = await restoreAgents(h.deps)
+ expect(realRegistry.list().map(entry => entry.agentId).sort()).toEqual(entries.map(entry => entry.agentId).sort())
+ expect(entries.map(entry => realRegistry.byAgent(entry.agentId)?.tmuxPane)).toEqual(mode === 'cycle' ? ['%0', '%1'] : old)
+ expect(entries.every(entry => realRegistry.byAgent(entry.agentId)?.launch?.state === 'held')).toBe(true)
+ expect(entries.every(entry => realRegistry.byAgent(entry.agentId)?.active === false)).toBe(true)
+ expect(h.respawns).toBe(0)
+ if (mode !== 'cycle') expect(h.deps.log).toHaveBeenCalledWith(expect.stringContaining('left intact for review'))
+ if (mode === 'chain failure') expect(result.failed).toHaveLength(1)
+ // The synchronous batch has released durable writes before its returned Promise settles.
+ const committing = realRegistry.transaction(() => realRegistry.setLaunch(entries[0].agentId, heldLaunch('store')))
+ expect(() => realRegistry.setClosePlan(entries[0].agentId, null)).not.toThrow()
+ await committing
+ } finally { for (const entry of entries) realRegistry.removeAgent(entry.agentId) }
+ })
+
+ it('an allocated waiting row stays inactive while a service answer is outstanding', async () => {
+ const entry = realRegistry.openPendingAgent({ engine: 'claude', runtimes: [{ backend: 'tmux', paneId: '%44' }] })!
+ let finish!: (value: RestoreLaunchResult) => void
+ try {
+ realRegistry.setLaunch(entry.agentId, heldLaunch('store'))
+ const h = harness([entry])
+ h.deps.registry = realRegistry
+ h.deps.only = new Set([entry.agentId])
+ h.deps.buildLaunch = vi.fn(() => new Promise<RestoreLaunchResult>(done => { finish = done }))
+ const restoring = restoreAgents(h.deps)
+ await vi.waitFor(() => expect(h.deps.buildLaunch).toHaveBeenCalledOnce())
+ expect(realRegistry.byAgent(entry.agentId)).toMatchObject({ active: false, launch: { state: 'held' }, tmuxPane: '%0' })
+ finish({ held: 'store' })
+ await restoring
+ expect(realRegistry.byAgent(entry.agentId)?.active).toBe(false)
+ } finally { realRegistry.removeAgent(entry.agentId) }
+ })
+
+ it('an unrelated live pane pin cannot block missing held recovery', async () => {
+ const h = harness([row({ launch: heldLaunch('store') }), row({ agentId: 'pinned', runtimes: [{ backend: 'tmux', paneId: '%91' }] })], { alivePanes: ['%91'] })
+ h.deps.only = new Set(['agent-a'])
+ h.deps.cancelled = id => id === 'pinned'
+ h.probes.set('%0', [identity(8)])
+ expect((await restoreAgents(h.deps)).restored).toEqual(['agent-a'])
+ await settled(h, 1, 1)
+ })
+
+ it('an overlapping core pane operation retries after the sole prepared notice', async () => {
+ const h = harness([row({ launch: heldLaunch('store') })])
+ const operations = createPaneOperations()
+ h.deps.paneAllocations = operations.runMany
+ h.deps.paneBusy = operations.busy
+ let finish!: () => void
+ const previous = operations.run('agent-a', () => new Promise<void>(done => { finish = done }))
+ h.probes.set('%0', [identity(8)])
+ const held = createHeldLaunches({ registry: h.deps.registry, restore: only => restoreAgents({ ...h.deps, only }), log: () => {} })
+ await held.boot(async () => {})
+ expect(await held.restoreHeld('store')).toMatchObject({ retry: true })
+ expect(h.paneCreates).toBe(0)
+ finish()
+ await previous
+ await vi.waitFor(() => expect(h.rows.get('agent-a')?.processIdentity).toEqual(identity(8)), { timeout: 2_000 })
+ expect(h.paneCreates).toBe(1)
+ })
+
+ it('Stop cancels undispatched allocation work and joins only the bounded in-flight group', async () => {
+ const entries = Array.from({ length: 8 }, (_, i) => row({ agentId: `a${i}`, launch: heldLaunch('store'), runtimes: [{ backend: 'tmux', paneId: `%${i + 40}` }] }))
+ const h = harness(entries)
+ const operations = createPaneOperations()
+ h.deps.paneAllocations = operations.runMany
+ h.deps.paneBusy = operations.busy
+ h.deps.only = new Set(entries.map(entry => entry.agentId))
+ let stopped = false
+ h.deps.cancelled = () => stopped
+ const replies: Array<() => void> = []
+ h.deps.createPane = async entry => {
+ await new Promise<void>(done => { replies.push(done) })
+ return { ok: true, runtime: { backend: 'tmux', paneId: `%${entry.agentId.slice(1)}` } }
+ }
+ const restoring = restoreAgents(h.deps)
+ await vi.waitFor(() => expect(replies).toHaveLength(4))
+ expect(entries.every(entry => operations.busy(entry.agentId))).toBe(true)
+ stopped = true
+ const joined = operations.settle('a0')
+ for (const reply of replies) reply()
+ await restoring
+ await joined
+ expect(replies).toHaveLength(4)
+ expect(h.rows.get('a0')?.runtimes).toEqual([{ backend: 'tmux', paneId: '%0' }])
+ expect(h.respawns).toBe(0)
+ })
+})
diff --git a/cli/src/lib/restoreAgents.ts b/cli/src/lib/restoreAgents.ts
index 9b6f6e2f9..a8272348c 100644
--- a/cli/src/lib/restoreAgents.ts
+++ b/cli/src/lib/restoreAgents.ts
@@ -10,10 +10,12 @@
* Dependency-injected like restartAgent.ts: cli.ts owns the tmux, registry and reconciler wiring,
* and this owns the ordering, which is the part worth testing without a daemon:
*
- * 1. Every missing pane is recreated inside ONE registry transaction. A new tmux server hands out
+ * 1. Missing panes are allocated as waiting shells, then their routes commit synchronously together.
+ * A new tmux server hands out
* pane ids from `%0` again, so a restored pane's id can equal another stale row's dead pane —
* and `registry.save()` evicts whichever row loses that collision. Deferring the save until
- * every row holds its new pane is what keeps the second row alive.
+ * safe route assignments have been checked is what keeps the second row alive. Failed allocations
+ * never make another row surrender its route; all such conversations remain held.
* 2. The new route is HELD in the reconciler until the engine process is bound here. Otherwise the
* reconciler's discovery half sees an unclaimed engine process and mints a fresh agentId for it.
* 3. The row keeps `launch: starting` and only gets its process identity from here. The reconcile
@@ -36,7 +38,7 @@
import { isTerminalEngine, type AgentEngine } from '../engines/types.js'
import type { AgentLaunch, ProcessIdentity, RegisteredSession } from './registry.js'
-import type { TerminalRuntimeRef, TmuxRuntimeRef } from './terminalTypes.js'
+import type { TerminalDispatchControl, TerminalRuntimeRef, TmuxRuntimeRef } from './terminalTypes.js'
import { terminalRouteKey } from './terminalRuntime.js'
import { resumesConversation } from './resumeCapability.js'
@@ -46,7 +48,7 @@ export interface RestoreLaunch {
}
/** The launch, why there is none, or the service its launch asks that could not be asked (`held`). */
-export type RestoreLaunchResult = RestoreLaunch | { error: string; detail: string } | { held: string }
+export type RestoreLaunchResult = RestoreLaunch | { cancelled: true } | { error: string; detail: string } | { held: string; detail?: string; holdScope?: 'workspace' }
/** What a held agent's row says: the service it waits for, and why, in the words its pane shows. */
export function heldLaunch(service: string, label = service === 'models' ? 'the models service' : service === 'store' ? 'the Store' : service): AgentLaunch {
@@ -57,6 +59,16 @@ export function heldLaunch(service: string, label = service === 'models' ? 'the
export const GRID_CREDENTIAL_REQUIRED = 'GRID_CREDENTIAL_REQUIRED'
export interface RestoreAgentsDeps {
+ /** Fresh inventory for each boot/held pass; no tmux snapshot survives a restore. */
+ survey?: () => Pick<RestoreAgentsDeps, 'livePane' | 'liveProcess'>
+ /** Stop/restart own the agent from the moment their job begins, before the registry changes. */
+ cancelled?: (agentId: string) => boolean
+ revision?: (agentId: string) => number
+ /** Stop joins only this short dispatch/commit phase. Never wrap service preparation in it. */
+ paneOperation?: <T>(agentId: string, operation: () => Promise<T>) => Promise<T>
+ /** A missing-pane group reserves every possible stale route owner until its synchronous commit. */
+ paneBusy?: (agentId: string) => boolean
+ paneAllocations?: <T>(agentIds: readonly string[], operation: () => Promise<T>) => Promise<T>
retainStopped?: (entry: RegisteredSession, paneAlive: boolean) => void
/** Keeps a conversation the restore had to leave for a new one as a stopped harness (keepAbandonedConversation.ts). */
keepAbandoned?: (left: RegisteredSession) => void
@@ -88,13 +100,13 @@ export interface RestoreAgentsDeps {
liveProcess: (entry: RegisteredSession, runtime: TmuxRuntimeRef) => Promise<ProcessIdentity | null | 'unknown'>
/** The pane's launch — engine argv plus whatever puts it back on its grid / profile. A grid the
* machine cannot honour (unsupported engine, tmux too old, config dir unwritable) is a refusal. */
- buildLaunch: (entry: RegisteredSession, opts: { resumeSessionId?: string }) => Promise<RestoreLaunchResult>
- createPane: (entry: RegisteredSession, launch: RestoreLaunch) => Promise<
+ buildLaunch: (entry: RegisteredSession, opts: { resumeSessionId?: string; current(): boolean }) => Promise<RestoreLaunchResult>
+ createPane: (entry: RegisteredSession, launch: RestoreLaunch, control?: TerminalDispatchControl) => Promise<
| { ok: true; runtime: TmuxRuntimeRef }
| { ok: false; reason: string }
>
/** `tmux respawn-pane` over the restored pane — the resume → fresh fallback. */
- respawn: (runtime: TmuxRuntimeRef, launch: RestoreLaunch) => Promise<{ ok: boolean; reason?: string }>
+ respawn: (runtime: TmuxRuntimeRef, launch: RestoreLaunch, control?: TerminalDispatchControl) => Promise<{ ok: boolean; reason?: string }>
/** A pane was rebuilt on this conversation: its engine is a new one (core/transcripts/relaunch.ts). */
engineStarted?: (sessionId: string) => void
/** One probe of the pane for a recognizable engine process. */
@@ -104,12 +116,12 @@ export interface RestoreAgentsDeps {
* a restore is the same news as `dead`. */
paneState: (runtime: TmuxRuntimeRef) => Promise<{ dead: boolean; engineExit?: number | null } | 'gone' | 'unknown'>
clearRemainOnExit: (runtime: TmuxRuntimeRef) => Promise<void>
- holdRoute: (routeKey: string, autoReleaseMs: number) => void
+ holdRoute: (routeKey: string, autoReleaseMs: number) => void | (() => void)
releaseRoute: (routeKey: string) => void
triggerHint: (runtime: TmuxRuntimeRef, engine: AgentEngine) => Promise<void>
log: (message: string) => void
/** The service a launch of this row asks for its part (a grid's or a saved API's: `models`), or null. */
- needs?: (entry: RegisteredSession) => string | null
+ needs?: (entry: RegisteredSession) => string | readonly string[] | null
/** Boot: hold every row whose launch asks a service rather than ask it now (`heldLaunch`). */
defer?: boolean
/** Restore only these agents, every other row as it is: a pass over the held ones. */
@@ -128,6 +140,8 @@ export interface RestoreAgentsDeps {
}
export interface RestoreSummary {
+ /** Core contention, not a service outage: retry after a short delay without another ready notice. */
+ retry?: true
/** Agents whose pane was recreated; their engine process is bound in the background. */
restored: string[]
skipped: Array<{ agentId: string; reason: string }>
@@ -200,6 +214,28 @@ function tmuxRuntime(entry: RegisteredSession): TmuxRuntimeRef | null {
return runtime ?? null
}
+/** A service or tmux answer cannot act on a newer binding, launch, route or in-progress Stop. */
+function restoreOwner(deps: RestoreAgentsDeps, entry: RegisteredSession, committing = false): () => boolean {
+ const identity = (row: RegisteredSession | undefined) => row && JSON.stringify([
+ row.registeredAt, row.boundAt, row.sessionId, row.engine, row.cwd, row.dsh, row.dshRuntime,
+ row.runtimes.map(terminalRouteKey).sort(), row.launch,
+ ])
+ const owned = identity(entry)
+ const revision = deps.revision?.(entry.agentId)
+ return () => identity(deps.registry.byAgent(entry.agentId)) === owned
+ && (committing || (!deps.cancelled?.(entry.agentId) && deps.revision?.(entry.agentId) === revision))
+}
+
+/** A successful dispatch commits before a joining Stop captures its target. Other ownership changes still win. */
+async function inPane<T>(deps: RestoreAgentsDeps, entry: RegisteredSession, current: () => boolean,
+ work: (owns: () => boolean) => Promise<T>, cancelled: T): Promise<T> {
+ const run = async () => {
+ if (!current()) return cancelled
+ return work(restoreOwner(deps, deps.registry.byAgent(entry.agentId)!, !!deps.paneOperation))
+ }
+ return deps.paneOperation ? deps.paneOperation(entry.agentId, run) : run()
+}
+
function defaultSleep(ms: number): Promise<void> {
return new Promise((resolve) => {
const timer = setTimeout(resolve, ms)
@@ -227,21 +263,128 @@ async function waitForSettle(deps: RestoreAgentsDeps, runtime: TmuxRuntimeRef, s
return 'settled'
}
+interface MissingPane {
+ entry: RegisteredSession
+ runtime: TmuxRuntimeRef
+ alive?: true
+ current: () => boolean
+}
+
+/** Allocate waiting shells before a held pass asks services. Recycled pane IDs are committed as one
+ * synchronous set, never by saving a partial permutation over another row's stale route. */
+async function allocateWaitingPanes(deps: RestoreAgentsDeps, missing: MissingPane[], summary: RestoreSummary): Promise<void> {
+ const needed = missing.filter(item => !item.alive)
+ if (!needed.length) return
+ // An outside-selection row can still own a recycled ID. Stop and hook admission join the same
+ // group for all these rows; unrelated durable registry writes are never held back while tmux runs.
+ const ids: string[] = []
+ for (const row of deps.registry.list()) {
+ const runtime = tmuxRuntime(row)
+ if (runtime && (!deps.livePane || await deps.livePane(runtime) !== true)) ids.push(row.agentId)
+ }
+ for (const item of needed) if (!ids.includes(item.entry.agentId)) ids.push(item.entry.agentId)
+ if (ids.some(id => deps.paneBusy?.(id))) {
+ summary.retry = true
+ for (const item of needed) missing.splice(missing.indexOf(item), 1)
+ return
+ }
+ const waiting = (entry: RegisteredSession): Extract<AgentLaunch, { state: 'held' }> => {
+ if (entry.launch?.state === 'held') return entry.launch
+ const needs = deps.needs?.(entry)
+ const service = deps.defer ? typeof needs === 'string' ? needs : needs?.[0] : null
+ return service ? heldLaunch(service) as Extract<AgentLaunch, { state: 'held' }>
+ : { state: 'held', service: 'core', detail: 'Restoring this harness.' }
+ }
+ const work = async () => {
+ const created = new Map<MissingPane, { runtime: TmuxRuntimeRef; owns: () => boolean }>()
+ let next = 0
+ const worker = async () => {
+ while (next < needed.length) {
+ // Stop bounds its join to commands already in flight, not N serial tmux timeouts.
+ if (ids.some(id => deps.cancelled?.(id))) { summary.retry = true; return }
+ const item = needed[next++]
+ if (!item.current()) continue
+ const owns = restoreOwner(deps, item.entry, true)
+ const launch = waiting(item.entry)
+ const allocated = await deps.createPane(item.entry, deps.waitingLaunch?.(item.entry, launch) ?? { argv: [] }, { current: item.current })
+ .catch(error => ({ ok: false as const, reason: error instanceof Error ? error.message : String(error) }))
+ if (!allocated.ok) {
+ if (owns()) summary.failed.push({ agentId: item.entry.agentId, reason: allocated.reason })
+ continue
+ }
+ created.set(item, { runtime: allocated.runtime, owns })
+ }
+ }
+ await Promise.all(Array.from({ length: Math.min(4, needed.length) }, worker))
+ const safe = new Map([...created].filter(([, result]) => result.owns()))
+ // Fixed point: A cannot take B's old route when B cannot move because C's allocation failed.
+ // Include outside-selection rows and duplicate replies; no asynchronous work follows this read.
+ const rows = deps.registry.list()
+ const proposed = [...safe.values()].map(value => terminalRouteKey(value.runtime))
+ let changed = true
+ while (changed) {
+ changed = false
+ for (const [item, result] of safe) {
+ const key = terminalRouteKey(result.runtime)
+ const duplicate = proposed.filter(route => route === key).length > 1
+ const blocked = rows.some(row => row.agentId !== item.entry.agentId && row.runtimes.some(route => terminalRouteKey(route) === key)
+ && ![...safe.keys()].some(other => other.entry.agentId === row.agentId))
+ if (duplicate || blocked) { safe.delete(item); changed = true }
+ }
+ }
+ await deps.registry.transaction(() => {
+ for (const [item, result] of safe) {
+ deps.registry.updateRuntimes(item.entry.agentId, [result.runtime], terminalRouteKey(result.runtime))
+ deps.registry.setLaunch(item.entry.agentId, waiting(item.entry))
+ }
+ })
+ for (const item of needed) {
+ const accepted = safe.get(item)
+ const row = deps.registry.byAgent(item.entry.agentId)
+ if (accepted && row) {
+ item.entry = { ...row }
+ item.runtime = accepted.runtime
+ item.alive = true
+ item.current = restoreOwner(deps, item.entry)
+ } else {
+ const allocated = created.get(item)
+ if (allocated) deps.log(`[restore] agent ${item.entry.agentId} · waiting pane ${allocated.runtime.paneId} could not be committed without changing another owner; left intact for review`)
+ missing.splice(missing.indexOf(item), 1)
+ if (item.current()) {
+ const reason = allocated ? `Waiting for safe pane recovery. Pane ${allocated.runtime.paneId} could not be assigned without changing another harness; it was left intact for review.`
+ : 'Waiting for pane recovery. The pane could not be allocated yet.'
+ deps.registry.setLaunch(item.entry.agentId, { ...waiting(item.entry), detail: reason })
+ summary.held.push(item.entry.agentId)
+ }
+ }
+ }
+ }
+ if (deps.paneAllocations) await deps.paneAllocations(ids, work)
+ else await work()
+}
+
/**
* Recreate every missing pane, then return. Binding each pane's engine process continues in the
* background; the summary says which agents that is happening for.
*/
-export async function restoreAgents(deps: RestoreAgentsDeps): Promise<RestoreSummary> {
+export async function restoreAgents(input: RestoreAgentsDeps): Promise<RestoreSummary> {
+ const deps = { ...input, ...input.survey?.() }
const summary: RestoreSummary = { restored: [], skipped: [], failed: [], held: [], unsurveyed: [] }
const patience = { left: true }
/** `alive`: a held agent's waiting pane, which its launch goes into rather than a new one. */
- const missing: Array<{ entry: RegisteredSession; runtime: TmuxRuntimeRef; alive?: true }> = []
+ const missing: MissingPane[] = []
// Per row, because a survey that gives up on the first bad one gives up on every row behind it —
// one pane whose `tmux list-panes` timed out, or one archive that could not be written, and the
// whole desk comes back empty. A row that cannot be surveyed is reported and the rest go on.
- for (const entry of deps.registry.list()) {
+ for (const saved of deps.registry.list()) {
+ const entry = { ...saved }
if (deps.only && !deps.only.has(entry.agentId)) continue
+ const current = restoreOwner(deps, entry)
+ if (!current()) {
+ if (entry.launch?.state === 'held') summary.retry = true
+ continue
+ }
try {
const runtime = tmuxRuntime(entry)
if (!runtime) { summary.skipped.push({ agentId: entry.agentId, reason: 'no tmux pane' }); continue }
@@ -250,7 +393,7 @@ export async function restoreAgents(deps: RestoreAgentsDeps): Promise<RestoreSum
// launch goes into that pane, or a new one if the pane went (a reboot).
if (entry.launch?.state === 'held') {
const alive = deps.livePane ? await surveyed(deps, patience, () => deps.livePane!(runtime)) : false
- missing.push({ entry, runtime, ...(alive ? { alive: true as const } : {}) })
+ if (current()) missing.push({ entry, runtime, current, ...(alive ? { alive: true as const } : {}) })
continue
}
// A pane is alive as long as tmux has it, whatever runs in it: every pane is a shell with the
@@ -259,8 +402,10 @@ export async function restoreAgents(deps: RestoreAgentsDeps): Promise<RestoreSum
// here rather than a second pane being opened beside the first. A bare terminal has no engine
// process to look for at all.
const paneAlive = deps.livePane ? await surveyed(deps, patience, () => deps.livePane!(runtime)) : false
+ if (!current()) continue
if (paneAlive) {
const engineLive = isTerminalEngine(entry.engine) ? null : await surveyed(deps, patience, () => deps.liveProcess(entry, runtime))
+ if (!current()) continue
if (engineLive) {
// Still running. A row that lost its identity without losing its pane (a reboot the boot
// clock misread; a tmux server that outlived the daemon) is re-identified right here, so the
@@ -294,10 +439,12 @@ export async function restoreAgents(deps: RestoreAgentsDeps): Promise<RestoreSum
// the engine refuses falls back to the shell, never a fresh engine (`relaunchFresh`).
if (entry.terminalHost && !resumesConversation(entry.engine, entry.sessionId)) {
if (!isTerminalEngine(entry.engine)) deps.registry.releaseEngine(entry.agentId)
- missing.push({ entry: deps.registry.byAgent(entry.agentId) ?? entry, runtime })
+ const shell = deps.registry.byAgent(entry.agentId) ?? entry
+ missing.push({ entry: { ...shell }, runtime, current: restoreOwner(deps, shell) })
continue
}
const live = await surveyed(deps, patience, () => deps.liveProcess(entry, runtime))
+ if (!current()) continue
if (live) {
// Still running. A row that lost its identity without losing its pane (a reboot the boot
// clock misread; a tmux server that outlived the daemon) is re-identified right here, so the
@@ -321,7 +468,7 @@ export async function restoreAgents(deps: RestoreAgentsDeps): Promise<RestoreSum
deps.log(`[restore] ${entry.engine} · agent ${entry.agentId} · skipped · ${reason}`)
continue
}
- missing.push({ entry, runtime })
+ missing.push({ entry, runtime, current })
} catch (error) {
const reason = error instanceof Error ? error.message : String(error)
if (error instanceof Unsurveyed) summary.unsurveyed.push(entry.agentId)
@@ -330,17 +477,22 @@ export async function restoreAgents(deps: RestoreAgentsDeps): Promise<RestoreSum
}
}
if (!missing.length) return summary
+ await allocateWaitingPanes(deps, missing, summary)
const budgetMs = deps.budgetMs ?? DEFAULT_BUDGET_MS
const watches: Array<() => Promise<void>> = []
/** The services this pass could not ask: every later agent that needs one is held without asking. */
- const unavailable = new Set<string>()
+ const unavailable = new Map<string, string | undefined>()
/** Held in its waiting pane: the one it has, or a new one. False when no pane could be opened for it. */
- const hold = async (entry: RegisteredSession, runtime: TmuxRuntimeRef, alive: boolean, service: string): Promise<boolean> => {
- const launch = heldLaunch(service) as Extract<AgentLaunch, { state: 'held' }>
+ const hold = async (entry: RegisteredSession, runtime: TmuxRuntimeRef, alive: boolean, current: () => boolean, service: string, detail?: string): Promise<boolean> => inPane(deps, entry, current, async owns => {
+ const launch = { ...heldLaunch(service), ...(detail ? { detail } : {}) } as Extract<AgentLaunch, { state: 'held' }>
let pane = runtime
if (!alive) {
- const created = await deps.createPane(entry, deps.waitingLaunch?.(entry, launch) ?? { argv: [] })
+ const created = await deps.createPane(entry, deps.waitingLaunch?.(entry, launch) ?? { argv: [] }, { current })
+ if (!owns()) {
+ if (created.ok) deps.log(`[restore] agent ${entry.agentId} · waiting pane ${created.runtime.paneId} allocated after ownership changed; left intact for review`)
+ return false
+ }
if (!created.ok) {
summary.failed.push({ agentId: entry.agentId, reason: created.reason })
deps.log(`[restore] ${entry.engine} · agent ${entry.agentId} · could not open a pane to wait in · ${created.reason}`)
@@ -348,17 +500,21 @@ export async function restoreAgents(deps: RestoreAgentsDeps): Promise<RestoreSum
}
pane = created.runtime
deps.registry.updateRuntimes(entry.agentId, [pane], terminalRouteKey(pane))
+ } else if (entry.launch?.state === 'held' && entry.launch.detail !== launch.detail && deps.waitingLaunch) {
+ // A grid harness can finish waiting for models and then wait for Store preparation. Its pane
+ // must show the current reason as well as its row, including an unconfirmed workspace write.
+ await deps.respawn(pane, deps.waitingLaunch(entry, launch), { current })
+ if (!owns()) return false
}
deps.registry.setLaunch(entry.agentId, launch)
summary.held.push(entry.agentId)
deps.log(`[restore] ${entry.engine} · agent ${entry.agentId} · held in pane ${pane.paneId} · waiting for ${service}`)
return true
- }
- // Every missing pane at once, in one transaction (see the module doc). A pass over held agents opens no
- // pane but the ones they wait in, which are theirs already: it holds no saves back while it asks a service.
- const inPass = (apply: () => Promise<void>): Promise<void> => deps.only ? apply() : deps.registry.transaction(apply)
- await inPass(async () => {
- for (const { entry, runtime: dead, alive } of missing) {
+ }, false)
+ // Waiting panes already own their committed routes. No service or engine preparation holds saves.
+ {
+ for (const { entry, runtime: dead, alive, current } of missing) {
+ if (!current() || (deps.only && entry.launch?.state !== 'held')) continue
// No process survives its pane; clear it now or discovery would refuse to adopt the new one
// into this agent (route adoption requires either no identity or a matching pid).
deps.registry.clearProcessIdentity(entry.agentId)
@@ -371,15 +527,19 @@ export async function restoreAgents(deps: RestoreAgentsDeps): Promise<RestoreSum
continue
}
// Never asked at boot, and asked at most once a pass: the core's readiness never waits on a service.
- const needed = deps.needs?.(entry) ?? null
- if (needed && (deps.defer || unavailable.has(needed))) {
- await hold(entry, dead, !!alive, needed)
+ const needed = deps.needs?.(entry) ?? []
+ const services = typeof needed === 'string' ? [needed] : needed
+ const waitingFor = deps.defer ? services[0] : services.find(service => unavailable.has(service))
+ if (waitingFor) {
+ await hold(entry, dead, !!alive, current, waitingFor, unavailable.get(waitingFor))
continue
}
- const launch = await deps.buildLaunch(entry, resumeSessionId ? { resumeSessionId } : {})
+ const launch = await deps.buildLaunch(entry, { ...(resumeSessionId ? { resumeSessionId } : {}), current })
+ // Stop/close and a newer binding win over a preparation that was already in flight.
+ if (!current() || 'cancelled' in launch) continue
if ('held' in launch) {
- unavailable.add(launch.held)
- await hold(entry, dead, !!alive, launch.held)
+ if (launch.holdScope !== 'workspace') unavailable.set(launch.held, launch.detail)
+ await hold(entry, dead, !!alive, current, launch.held, launch.detail)
continue
}
if ('error' in launch) {
@@ -389,39 +549,56 @@ export async function restoreAgents(deps: RestoreAgentsDeps): Promise<RestoreSum
if (alive) await deps.killPane?.(dead)
continue
}
- // A held agent's launch goes into the pane it waited in.
- const created: { ok: true; runtime: TmuxRuntimeRef } | { ok: false; reason: string } = alive
- ? await deps.respawn(dead, launch).then((spawned) => spawned.ok ? { ok: true as const, runtime: dead } : { ok: false as const, reason: spawned.reason ?? 'the pane could not be reused' })
- : await deps.createPane(entry, launch)
- if (!created.ok) {
- summary.failed.push({ agentId: entry.agentId, reason: created.reason })
- deps.log(`[restore] ${entry.engine} · agent ${entry.agentId} · could not open a pane · ${created.reason}`)
- continue
- }
- // A new engine on the conversation: a turn it left open is over (core/transcripts/relaunch.ts).
- if (resumeSessionId) deps.engineStarted?.(resumeSessionId)
- const key = terminalRouteKey(created.runtime)
- // A terminal is up the moment its pane is — no engine to wait for, no route to hold.
- if (isTerminalEngine(entry.engine)) {
- deps.registry.updateRuntimes(entry.agentId, [created.runtime], key)
- deps.registry.setLaunch(entry.agentId, { state: 'ready' })
- await deps.clearRemainOnExit(created.runtime)
- summary.restored.push(entry.agentId)
- deps.log(`[restore] terminal · agent ${entry.agentId} · pane ${dead.paneId} → ${created.runtime.paneId}`)
- continue
- }
- deps.holdRoute(key, budgetMs + HOLD_SLACK_MS)
- deps.registry.updateRuntimes(entry.agentId, [created.runtime], key)
- deps.registry.setLaunch(entry.agentId, { state: 'starting' })
- summary.restored.push(entry.agentId)
- // The grid is named because the pane gives nothing away: the engine looks exactly like one on
- // its own login. The key is never printed.
- deps.log(`[restore] ${entry.engine} · agent ${entry.agentId} · pane ${dead.paneId} → ${created.runtime.paneId}`
- + (resumeSessionId ? ` · resuming ${resumeSessionId.slice(0, 8)}` : ' · fresh session')
- + (entry.gridLaunch ? ` · grid ${entry.gridLaunch.networkName}` : ''))
- watches.push(() => watchRestoredPane(deps, entry, created.runtime, !!resumeSessionId, budgetMs))
+ await inPane(deps, entry, current, async initialOwner => {
+ const owns = initialOwner
+ const pane = dead
+ const existing = !!alive
+ const dispatchCurrent = () => owns() && !deps.cancelled?.(entry.agentId)
+ if (!dispatchCurrent()) return
+ let release: (() => void) | undefined
+ if (existing && !isTerminalEngine(entry.engine)) {
+ const route = terminalRouteKey(pane)
+ release = deps.holdRoute(route, budgetMs + HOLD_SLACK_MS) ?? (() => deps.releaseRoute(route))
+ }
+ let watching = false
+ try {
+ const control = { current: dispatchCurrent, onDispatch: () => {
+ // Before the engine can hook/attach, not after tmux's asynchronous reply.
+ if (resumeSessionId) deps.engineStarted?.(resumeSessionId)
+ } }
+ const created = existing
+ ? await deps.respawn(pane, launch, control).then(spawned => spawned.ok
+ ? { ok: true as const, runtime: pane } : { ok: false as const, reason: spawned.reason ?? 'the pane could not be reused' })
+ : await deps.createPane(entry, launch, control)
+ if (!owns()) return
+ if (!created.ok) {
+ if (!dispatchCurrent()) return
+ summary.failed.push({ agentId: entry.agentId, reason: created.reason })
+ deps.log(`[restore] ${entry.engine} · agent ${entry.agentId} · could not open a pane · ${created.reason}`)
+ return
+ }
+ const key = terminalRouteKey(created.runtime)
+ if (!isTerminalEngine(entry.engine)) release ??= deps.holdRoute(key, budgetMs + HOLD_SLACK_MS) ?? (() => deps.releaseRoute(key))
+ if (isTerminalEngine(entry.engine)) {
+ deps.registry.setLaunch(entry.agentId, { state: 'ready' })
+ await deps.clearRemainOnExit(created.runtime)
+ summary.restored.push(entry.agentId)
+ deps.log(`[restore] terminal · agent ${entry.agentId} · pane ${dead.paneId} → ${created.runtime.paneId}`)
+ return
+ }
+ deps.registry.setLaunch(entry.agentId, { state: 'starting' })
+ summary.restored.push(entry.agentId)
+ deps.log(`[restore] ${entry.engine} · agent ${entry.agentId} · pane ${dead.paneId} → ${created.runtime.paneId}`
+ + (resumeSessionId ? ` · resuming ${resumeSessionId.slice(0, 8)}` : ' · fresh session')
+ + (entry.gridLaunch ? ` · grid ${entry.gridLaunch.networkName}` : ''))
+ const currentWatch = restoreOwner(deps, deps.registry.byAgent(entry.agentId)!)
+ const releaseWatch = release!
+ watching = true
+ watches.push(() => watchRestoredPane(deps, entry, created.runtime, !!resumeSessionId, budgetMs, currentWatch, releaseWatch))
+ } finally { if (!watching) release?.() }
+ }, undefined)
}
- })
+ }
for (const watch of watches) void watch()
return summary
}
@@ -432,30 +609,39 @@ async function watchRestoredPane(
runtime: TmuxRuntimeRef,
resuming: boolean,
budgetMs: number,
+ current: () => boolean,
+ release: () => void,
): Promise<void> {
const { agentId, engine } = entry
const key = terminalRouteKey(runtime)
const sleep = deps.sleep ?? defaultSleep
const fail = (error: string, detail: string): void => {
+ if (!current()) return
deps.registry.setLaunch(agentId, { state: 'failed', error, detail })
deps.log(`[restore] ${engine} · agent ${agentId} · failed · ${detail}`)
}
/** Its fresh launch asks a service that could not be asked: held in this pane, never failed. */
- const holdHere = async (service: string): Promise<false> => {
- const launch = heldLaunch(service) as Extract<AgentLaunch, { state: 'held' }>
- const spawned = await deps.respawn(runtime, deps.waitingLaunch?.(entry, launch) ?? { argv: [] })
+ const holdHere = async ({ held: service, detail }: Extract<RestoreLaunchResult, { held: string }>): Promise<false> => inPane(deps, entry, current, async owns => {
+ if (!current()) return false
+ const launch = { ...heldLaunch(service), ...(detail ? { detail } : {}) } as Extract<AgentLaunch, { state: 'held' }>
+ const spawned = await deps.respawn(runtime, deps.waitingLaunch?.(entry, launch) ?? { argv: [] }, { current })
+ .catch(error => ({ ok: false, reason: error instanceof Error ? error.message : String(error) }))
+ if (!owns()) return false
if (!spawned.ok) {
- fail('ENGINE_DID_NOT_START', `${engine} could not wait for ${service} in its pane: ${spawned.reason ?? 'unknown reason'}`)
+ const detail = `${launch.detail} Its waiting pane could not be shown: ${spawned.reason ?? 'unknown reason'}. Pane recovery is still pending.`
+ deps.registry.setLaunch(agentId, { ...launch, detail })
+ deps.log(`[restore] ${engine} · agent ${agentId} · held · ${detail}`)
return false
}
deps.registry.setLaunch(agentId, launch)
deps.log(`[restore] ${engine} · agent ${agentId} · held · waiting for ${service}`)
- return false
- }
+ return false as const
+ }, false as const)
const settleMs = deps.settleMs ?? DEFAULT_SETTLE_MS
let mayRetryFresh = resuming
/** The pane's engine is gone. True when a fresh relaunch is now under way, false when this is the end. */
const relaunchFresh = async (): Promise<boolean> => {
+ if (!current()) return false
if (entry.resumeOnly) {
fail('RESUME_FAILED', `${engine} could not resume the saved conversation. See the terminal output, or start a new conversation separately.`)
return false
@@ -469,53 +655,67 @@ async function watchRestoredPane(
if (entry.terminalHost) {
mayRetryFresh = false
deps.log(`[restore] ${engine} · agent ${agentId} · did not come back up resuming its session — back to the terminal`)
- deps.keepAbandoned?.({ ...entry })
- deps.registry.releaseEngine(agentId)
- const launch = await deps.buildLaunch(deps.registry.byAgent(agentId) ?? { ...entry, engine: 'terminal' }, {})
- if ('held' in launch) return holdHere(launch.held)
+ const shell = { ...entry, engine: 'terminal' as const, sessionId: '', subscriptionModel: null }
+ const launch = await deps.buildLaunch(shell, { current })
+ if (!current() || 'cancelled' in launch) return false
+ if ('held' in launch) return holdHere(launch)
if ('error' in launch) {
fail(launch.error, launch.detail)
return false
}
- const spawned = await deps.respawn(runtime, launch)
- if (!spawned.ok) {
- fail('ENGINE_DID_NOT_START', `The terminal could not be reopened: ${spawned.reason ?? 'unknown reason'}`)
+ return inPane(deps, entry, current, async () => {
+ deps.keepAbandoned?.({ ...entry })
+ deps.registry.releaseEngine(agentId)
+ current = restoreOwner(deps, deps.registry.byAgent(agentId)!)
+ const owns = restoreOwner(deps, deps.registry.byAgent(agentId)!, !!deps.paneOperation)
+ const spawned = await deps.respawn(runtime, launch, { current })
+ if (!owns()) return false
+ if (!spawned.ok) {
+ fail('ENGINE_DID_NOT_START', `The terminal could not be reopened: ${spawned.reason ?? 'unknown reason'}`)
+ return false
+ }
+ deps.registry.setLaunch(agentId, { state: 'ready' })
+ await deps.clearRemainOnExit(runtime)
return false
- }
- deps.registry.setLaunch(agentId, { state: 'ready' })
- await deps.clearRemainOnExit(runtime)
- return false
+ }, false)
}
// A resume id the engine no longer honours is not worth a dead agent: the row's name comes
// along to the agent itself, the stale binding goes, and the engine gets one fresh start.
mayRetryFresh = false
deps.log(`[restore] ${engine} · agent ${agentId} · did not come back up resuming its session — retrying fresh`)
- // Unbound below and replaced by the fresh start's own, the conversation the agent was in is kept as
- // a stopped harness first, to read and to resume once the engine can again.
- deps.keepAbandoned?.({ ...entry })
- deps.registry.inheritName(entry.sessionId, agentId)
- deps.registry.unbindSession(entry.sessionId)
- const launch = await deps.buildLaunch(entry, {})
- if ('held' in launch) return holdHere(launch.held)
+ const launch = await deps.buildLaunch(entry, { current })
+ if (!current() || 'cancelled' in launch) return false
+ if ('held' in launch) return holdHere(launch)
if ('error' in launch) {
fail(launch.error, launch.detail)
return false
}
- const spawned = await deps.respawn(runtime, launch)
- if (!spawned.ok) {
- fail('ENGINE_DID_NOT_START', `${engine} could not be relaunched fresh: ${spawned.reason ?? 'unknown reason'}`)
- return false
- }
- // The fresh start gets the full budget again; the hold's auto-release must outlast it.
- deps.holdRoute(key, budgetMs + HOLD_SLACK_MS)
- return true
+ return inPane(deps, entry, current, async () => {
+ // Preparation is confirmed before archiving or unbinding. A service outage preserves the
+ // conversation held here, including when a refused resume falls back to a fresh launch.
+ deps.keepAbandoned?.({ ...entry })
+ deps.registry.inheritName(entry.sessionId, agentId)
+ deps.registry.unbindSession(entry.sessionId)
+ current = restoreOwner(deps, deps.registry.byAgent(agentId)!)
+ const owns = restoreOwner(deps, deps.registry.byAgent(agentId)!, !!deps.paneOperation)
+ // Renew before dispatch, so discovery cannot bind the new engine before its tmux reply.
+ release = deps.holdRoute(key, budgetMs + HOLD_SLACK_MS) ?? (() => deps.releaseRoute(key))
+ const spawned = await deps.respawn(runtime, launch, { current })
+ if (!owns()) return false
+ if (!spawned.ok) {
+ fail('ENGINE_DID_NOT_START', `${engine} could not be relaunched fresh: ${spawned.reason ?? 'unknown reason'}`)
+ return false
+ }
+ return true
+ }, false)
}
try {
const startedAt = Date.now()
let delayMs = 50
while (Date.now() - startedAt < budgetMs) {
- if (!deps.registry.byAgent(agentId)) return
+ if (!current()) return
const identity = await deps.probeProcess(runtime, engine)
+ if (!current()) return
if (identity) {
deps.registry.updateProcessIdentity(agentId, identity)
// A resume the engine rejects does not fail to start — it starts, prints why, and exits a
@@ -523,19 +723,22 @@ async function watchRestoredPane(
// it over; a pane let go at first sight of the process vanished with the engine and took
// the agent with it (measured: claude resuming a conversation another client still held).
const settled = await waitForSettle(deps, runtime, settleMs)
+ if (!current()) return
if (settled === 'gone') {
if (!await relaunchFresh()) return
delayMs = 50
continue
}
await deps.clearRemainOnExit(runtime)
+ if (!current()) return
// Release BEFORE the hint: the pass it triggers is the one that must see this route again.
- deps.releaseRoute(key)
+ release()
await deps.triggerHint(runtime, engine)
deps.log(`[restore] ${engine} · agent ${agentId} · engine up · ${Date.now() - startedAt}ms`)
return
}
const state = await deps.paneState(runtime)
+ if (!current()) return
if (state === 'gone') {
fail('ENGINE_DID_NOT_START', `${engine}'s restored pane disappeared before its engine process became ready.`)
return
@@ -553,6 +756,6 @@ async function watchRestoredPane(
} catch (error) {
deps.log(`[restore] ${engine} · agent ${agentId} · watch failed · ${error instanceof Error ? error.message : error}`)
} finally {
- deps.releaseRoute(key)
+ release()
}
}
diff --git a/cli/src/lib/stopAgentService.spec.ts b/cli/src/lib/stopAgentService.spec.ts
index 070b052ba..31713a07a 100644
--- a/cli/src/lib/stopAgentService.spec.ts
+++ b/cli/src/lib/stopAgentService.spec.ts
@@ -36,6 +36,18 @@ it('saves history before removing the runtime, joins concurrent stops, and clear
it('missing identities are harmless and never allocate or signal anything', async () => {
await createStopAgentService(deps)('missing'); expect(deps.forgetSession).not.toHaveBeenCalled(); expect(terminateDeletedAgent).not.toHaveBeenCalled()
})
+it('cancels immediately, then joins the core pane commit before capturing the runtime to stop', async () => {
+ let committed!: () => void
+ deps.settlePane = vi.fn(() => new Promise<void>(done => { committed = done }))
+ const stopping = createStopAgentService(deps)(row.agentId)
+ expect(deps.stopJobs.has(row.agentId)).toBe(true)
+ await vi.waitFor(() => expect(deps.settlePane).toHaveBeenCalledWith(row.agentId))
+ expect(captureResumeIdentity).not.toHaveBeenCalled()
+ row.runtimes = [{ backend: 'tmux', paneId: '%90' }]
+ committed()
+ await stopping
+ expect(deps.tmuxBackend!.kill).toHaveBeenCalledWith({ backend: 'tmux', paneId: '%90' })
+})
it('storage failure leaves the live process and registry untouched', async () => {
vi.spyOn(stoppedAgents, 'save').mockImplementation(() => { throw new Error('disk full') })
await expect(createStopAgentService(deps)(row.agentId)).rejects.toThrow('disk full')
diff --git a/cli/src/lib/stopAgentService.ts b/cli/src/lib/stopAgentService.ts
index f1d1ad09b..ad6ce575a 100644
--- a/cli/src/lib/stopAgentService.ts
+++ b/cli/src/lib/stopAgentService.ts
@@ -10,6 +10,7 @@ import { terminalRouteKey } from './terminalRuntime.js'
import { checkPidRuntime, terminateDeletedAgent } from './deleteAgentFallback.js'
export interface StopAgentServiceDeps {
+ settlePane?: (agentId: string) => Promise<void>
registry: Pick<typeof liveRegistry, 'resolve'>
stoppedAgents: StoppedAgentStore
restartJobs: AgentRestartCoordinator
@@ -62,6 +63,7 @@ export function createStopAgentService(deps: StopAgentServiceDeps) {
if (existing) return existing
restartJobs.cancel(sessionId)
const job = Promise.resolve().then(async () => {
+ await deps.settlePane?.(sessionId)
const live = registry.resolve(sessionId)
if (!live) return
// A row still starting has no process yet, and the one it gains while this stop runs is the engine
diff --git a/cli/src/lib/terminalAgentReconciler.spec.ts b/cli/src/lib/terminalAgentReconciler.spec.ts
index 693001e9f..79229dc98 100644
--- a/cli/src/lib/terminalAgentReconciler.spec.ts
+++ b/cli/src/lib/terminalAgentReconciler.spec.ts
@@ -412,12 +412,14 @@ describe('restart route hold', () => {
probe: async () => probe([{ instanceId: 'tmux:default', result: { state: 'available', roots: [] } }]),
})
const routeKey = terminalRouteKey(tmux)
- reconciler.holdRoute(routeKey)
+ const releaseOld = reconciler.holdRoute(routeKey)
+ const releaseCurrent = reconciler.holdRoute(routeKey)
+ releaseOld()
await reconciler.trigger()
expect(onDormant).not.toHaveBeenCalled()
expect(validate).not.toHaveBeenCalled()
- reconciler.releaseRoute(routeKey)
+ releaseCurrent()
await reconciler.trigger()
await reconciler.trigger()
diff --git a/cli/src/lib/terminalAgentReconciler.ts b/cli/src/lib/terminalAgentReconciler.ts
index 7dd86a9db..fbb4ad270 100644
--- a/cli/src/lib/terminalAgentReconciler.ts
+++ b/cli/src/lib/terminalAgentReconciler.ts
@@ -184,7 +184,7 @@ export class TerminalAgentReconciler {
* `finally`, but a future refactor that drops that `finally` must not leave a route permanently
* invisible to reconciliation.
*/
- holdRoute(routeKey: string, autoReleaseMs = 30_000): void {
+ holdRoute(routeKey: string, autoReleaseMs = 30_000): () => void {
this.heldRoutes.add(routeKey)
this.routeTouched.set(routeKey, ++this.routeSeq)
const existing = this.heldRouteTimers.get(routeKey)
@@ -192,6 +192,8 @@ export class TerminalAgentReconciler {
const timer = setTimeout(() => this.releaseRoute(routeKey), autoReleaseMs)
timer.unref?.()
this.heldRouteTimers.set(routeKey, timer)
+ // A cancelled restore cannot release the newer Stop/restart that took this route over.
+ return () => { if (this.heldRouteTimers.get(routeKey) === timer) this.releaseRoute(routeKey) }
}
/** Resume normal reconciliation for a route held by `holdRoute`. Idempotent. */
diff --git a/cli/src/lib/terminalTypes.ts b/cli/src/lib/terminalTypes.ts
index bd5b10ba8..346818e17 100644
--- a/cli/src/lib/terminalTypes.ts
+++ b/cli/src/lib/terminalTypes.ts
@@ -56,7 +56,13 @@ export type TerminalActionResult =
| { state: 'failed'; dispatch: 'not_started' | 'rejected'; reason: string }
| { state: 'unknown'; dispatch: 'possibly_executed'; reason: string }
-export interface TerminalCreateRequest {
+/** Optional core authority, checked after backend waits immediately before a command is sent. */
+export interface TerminalDispatchControl {
+ current?: () => boolean
+ onDispatch?: () => void
+}
+
+export interface TerminalCreateRequest extends TerminalDispatchControl {
cwd?: string
label?: string
/** argv (binary first) to run instead of the backend's default shell, e.g. an engine CLI launch. */
@@ -77,7 +83,7 @@ export interface TerminalCreateRequest {
* grid must not look to the user like the agent was replaced. Only the process is replaced, because
* its environment is the thing being changed and a process's environment cannot be edited in place.
*/
-export interface TerminalRespawnRequest {
+export interface TerminalRespawnRequest extends TerminalDispatchControl {
cwd?: string
command: string[]
env?: Record<string, string>
diff --git a/cli/src/lib/tmuxBackend.spec.ts b/cli/src/lib/tmuxBackend.spec.ts
index 9c49d67f0..fc2970ae1 100644
--- a/cli/src/lib/tmuxBackend.spec.ts
+++ b/cli/src/lib/tmuxBackend.spec.ts
@@ -69,6 +69,35 @@ afterEach(async () => {
})
describe('TmuxBackend lifecycle', () => {
+ it.each(['create', 'respawn'] as const)('rechecks core ownership after the feature wait before %s dispatch', async operation => {
+ let release!: () => void
+ let current = true
+ const pending = new Promise<void>(done => { release = done })
+ const features = vi.fn(async () => { await pending; return { paneOptions: true, sessionEnv: true, respawnEnv: true, controlNotifyGuard: true } })
+ const backend = new TmuxBackend(undefined, () => 'private-test-owner', () => {}, features as never)
+ const onDispatch = vi.fn()
+ const request = { command: ['never-executed'], current: () => current, onDispatch }
+ const result = operation === 'create' ? backend.create(request) : backend.respawn({ backend: 'tmux', paneId: '%42' }, request)
+ await vi.waitFor(() => expect(features).toHaveBeenCalled())
+ current = false
+ release()
+ expect(await result).toMatchObject({ state: 'failed', dispatch: 'not_started', reason: 'The harness changed before pane dispatch' })
+ expect(onDispatch).not.toHaveBeenCalled()
+ })
+
+ it('rechecks ownership inside the tmux notification gate before allocating a pane', async () => {
+ assumeTmuxVersion({ major: 3, minor: 4 })
+ const leave = await tmuxControlGate.enter('attach')
+ let current = true
+ const onDispatch = vi.fn()
+ const result = new TmuxBackend(undefined, () => 'private-test-owner', () => {}).create({ current: () => current, onDispatch })
+ await vi.waitFor(() => expect(tmuxControlGate.state.waiting).toBe(1))
+ current = false
+ leave()
+ expect(await result).toMatchObject({ state: 'failed', dispatch: 'not_started' })
+ expect(onDispatch).not.toHaveBeenCalled()
+ })
+
it.each(['tmux', 'ps'] as const)('does not declare a running pane gone when the %s probe fails', async failed => {
const dir = mkdtempSync(join(tmpdir(), 'tmux-backend-probe-'))
dirs.push(dir)
diff --git a/cli/src/lib/tmuxBackend.ts b/cli/src/lib/tmuxBackend.ts
index 254b84cf8..cd27f28e0 100644
--- a/cli/src/lib/tmuxBackend.ts
+++ b/cli/src/lib/tmuxBackend.ts
@@ -182,6 +182,8 @@ export class TmuxBackend implements TerminalBackend<TmuxRuntimeRef> {
// A new session is a notification to every control client: on a tmux before 3.7, not while one
// attaches (tmuxControlGate.ts).
const result = await inTmuxRoom('notify', () => new Promise<{ error: ExecError | null; stdout: string; stderr: string }>((resolve) => {
+ if (request.current?.() === false) { resolve({ error: Object.assign(new Error('The harness changed before pane dispatch'), { code: 'HARNESS_CANCELLED' }), stdout: '', stderr: '' }); return }
+ request.onDispatch?.()
run('tmux', args, { timeout: 5_000 }, (error, stdout, stderr) => resolve({
error: error as ExecError | null,
stdout,
@@ -189,6 +191,7 @@ export class TmuxBackend implements TerminalBackend<TmuxRuntimeRef> {
}))
}), features)
if (result.error) {
+ if (result.error.code === 'HARNESS_CANCELLED') return terminalActionNotStarted(result.error.message)
if (result.error.code === 'ENOENT') return terminalActionNotStarted('tmux is unavailable')
// tmux says exactly why it refused — "duplicate session", "protocol version mismatch",
// a .tmux.conf error, a directory it cannot enter. Dropping stderr here turned every one of
@@ -256,12 +259,15 @@ export class TmuxBackend implements TerminalBackend<TmuxRuntimeRef> {
// A respawn replaces the pane's start command, which carries its tag before tmux 3.0 (`create`).
args.push('-t', runtime.paneId, ...this.ownedCommand(features, this.owner(), request.command))
const result = await new Promise<{ error: NodeJS.ErrnoException | null; stderr: string }>((resolve) => {
+ if (request.current?.() === false) { resolve({ error: Object.assign(new Error('The harness changed before pane dispatch'), { code: 'HARNESS_CANCELLED' }), stderr: '' }); return }
+ request.onDispatch?.()
run('tmux', args, { timeout: 5_000 }, (error, _stdout, stderr) => resolve({
error: error as NodeJS.ErrnoException | null,
stderr,
}))
})
if (!result.error) return TERMINAL_ACTION_SUCCEEDED
+ if (result.error.code === 'HARNESS_CANCELLED') return terminalActionNotStarted(result.error.message)
if (result.error.code === 'ENOENT') return terminalActionNotStarted('tmux is unavailable')
// `-k` means the old process may already be gone even though the new one never started, so this
// cannot be reported as "nothing happened".
diff --git a/cli/src/scm/scmLaunch.spec.ts b/cli/src/scm/scmLaunch.spec.ts
index 7941dd8b9..9c30b48e3 100644
--- a/cli/src/scm/scmLaunch.spec.ts
+++ b/cli/src/scm/scmLaunch.spec.ts
@@ -113,7 +113,7 @@ describe('the SCM launch record on the registry row', () => {
// An SCM whose workspace binding travels in the environment: its env goes over the DSH's.
vi.spyOn(scmProjects, 'scmLaunchEnv').mockImplementation(record => record ? { SCM_WORKSPACE: 'bound' } : undefined)
- const built = await buildLaunchOverrides({ ...deps(), dshLaunch: () => ({ env: { SCM_WORKSPACE: 'not-this-one', HARNESS_DSH: 'x' }, args: ['--dsh'] }) },
+ const built = await buildLaunchOverrides({ ...deps(), dshLaunch: async () => ({ ok: true, launch: { env: { SCM_WORKSPACE: 'not-this-one', HARNESS_DSH: 'x' }, args: ['--dsh'] } }) },
'claude', { ...row, dsh: 'x', cwd: '/tmp/demo' }, row.agentId)
expect(built).toMatchObject({ ok: true, overrides: {
env: { HARNESS_DSH: 'x', SCM_WORKSPACE: 'bound' },
diff --git a/cli/src/services/AGENTS.md b/cli/src/services/AGENTS.md
index 16ab47e7e..fb17e2a6d 100644
--- a/cli/src/services/AGENTS.md
+++ b/cli/src/services/AGENTS.md
@@ -142,8 +142,8 @@ master too old to run it starts it beside itself, still in its own process (`src
never retried as a new launch. `e2e/shell.e2e.ts` keeps an attached terminal working across an edge crash.
- The gateway owns account/backend HTTP and the single writer of `machines.json` (`gateway/accountHttp.ts`).
The core retains its reported list for stale replies during a restart, bound to the current account.
- The Store prepares bundled harnesses before reporting `prepared`; the core waits at most five seconds
- before restore. The lean bundle shares one asset file, loaded by the Store and never by the core.
+ The Store prepares bundled harnesses before reporting `prepared`; package agents wait held until
+ preparation is available, after the core reports ready. The lean bundle shares one asset file, loaded by the Store and never by the core.
- A service that writes turns into agents (a team's question, the orchestrator's guidance) delivers each
under an id of its own through `core.turns.deliver`, hears what became of it through `onDelivery`, and
takes one back with `cancelDelivery` (core/deliveries.ts). In its own process `services/turnsLink.ts`
diff --git a/cli/src/services/inline.spec.ts b/cli/src/services/inline.spec.ts
index db30b336f..2074e8660 100644
--- a/cli/src/services/inline.spec.ts
+++ b/cli/src/services/inline.spec.ts
@@ -21,7 +21,7 @@ import { startRecaps } from './recaps.js'
import { startSearch } from './search.js'
import { startShell } from './shell.js'
import { startSharing } from './sharing.js'
-import { startStore } from './store.js'
+import { startStoreInCore } from './store.js'
import { startUsage } from './usage.js'
import { startViewers } from './viewers.js'
import { startWifi } from './wifi.js'
@@ -30,6 +30,6 @@ import { startWorkspaces } from './workspaces.js'
describe('the services the core runs in its own process only when they do not run in theirs', () => {
it('are their own starts, unchanged: the same services either way', () => {
- expect({ ...inline }).toEqual({ engineTranscriptFor, liveFor, runtimeFor, screenFor, submissionFor, nativeControlFor, modelControlFor, questionControlFor, startCommandBar, startDevices, startHandoff, startGateway, startModels, startMonitor, startOrchestrator, startProjects, startRecaps, startSearch, startSharing, startShell, startStore, startTeamsInCore, startUsage, startViewers, startWifi, startWindowNames, startWorkspaces })
+ expect({ ...inline }).toEqual({ engineTranscriptFor, liveFor, runtimeFor, screenFor, submissionFor, nativeControlFor, modelControlFor, questionControlFor, startCommandBar, startDevices, startHandoff, startGateway, startModels, startMonitor, startOrchestrator, startProjects, startRecaps, startSearch, startSharing, startShell, startStoreInCore, startTeamsInCore, startUsage, startViewers, startWifi, startWindowNames, startWorkspaces })
})
})
diff --git a/cli/src/services/inline.ts b/cli/src/services/inline.ts
index 2e52bb869..c6abb70b8 100644
--- a/cli/src/services/inline.ts
+++ b/cli/src/services/inline.ts
@@ -33,7 +33,7 @@ export { startRecaps } from './recaps.js'
export { startSearch } from './search.js'
export { startShell } from './shell.js'
export { startSharing } from './sharing.js'
-export { startStore } from './store.js'
+export { startStoreInCore } from './store.js'
export { startUsage } from './usage.js'
export { startViewers } from './viewers.js'
export { startWifi } from './wifi.js'
diff --git a/cli/src/services/store.spec.ts b/cli/src/services/store.spec.ts
index c29601078..4eef4ebaf 100644
--- a/cli/src/services/store.spec.ts
+++ b/cli/src/services/store.spec.ts
@@ -1,7 +1,11 @@
import { describe, expect, it, vi } from 'vitest'
import type { DshInstallProgress } from '../dsh/install.js'
import { fakeCore } from '../testing/fakeCore.js'
-import { STORE_REQUESTS, startStore, type StoreDeps } from './store.js'
+import { storeLaunchPort } from './storeLaunch.js'
+import { emptyPorts } from '../core/api.js'
+import { STORE_REQUESTS, startStore, startStoreInCore, type StoreDeps } from './store.js'
+
+vi.mock('./storeLaunch.js', () => ({ storeLaunchPort: vi.fn() }))
const ASKER = { local: true, owner: true }
@@ -23,6 +27,36 @@ describe('the store service', () => {
const { deps } = setup()
expect(deps.prepare).toHaveBeenCalledOnce()
})
+ it('installs the same launch port in the explicit inline mode', () => {
+ const ports = emptyPorts()
+ expect(Object.keys(startStoreInCore(fakeCore(), ports)).sort()).toEqual([...STORE_REQUESTS].sort())
+ expect(ports.store).toMatchObject({ dshMaterialize: expect.any(Function), dshLaunch: expect.any(Function) })
+ })
+ it('wakes waiting workspaces on every confirmed inline outcome, including a released failure', async () => {
+ const request = { dsh: 'test/package', workspace: '/unused', engine: 'claude' as const, key: 'agent', account: {} }
+ const confirmed = { ok: false as const, error: 'DSH_MATERIALIZE_FAILED', detail: 'init failed' }
+ const uncertain = { ...confirmed, unavailable: 'store' as const }
+ const launch = { dshMaterialize: vi.fn(async () => confirmed), dshLaunch: vi.fn(async () => confirmed) }
+ vi.mocked(storeLaunchPort).mockReturnValue(launch)
+ const prepared = vi.fn()
+ const ports = emptyPorts()
+ for (const notify of [undefined, prepared]) {
+ startStoreInCore(fakeCore(), ports, notify)
+ await ports.store!.dshMaterialize(request)
+ await ports.store!.dshLaunch(request)
+ }
+ expect(prepared).toHaveBeenCalledTimes(2)
+ launch.dshMaterialize.mockResolvedValueOnce(uncertain)
+ launch.dshLaunch.mockResolvedValueOnce(uncertain)
+ await ports.store!.dshMaterialize(request)
+ await ports.store!.dshLaunch(request)
+ expect(prepared).toHaveBeenCalledTimes(2)
+ launch.dshMaterialize.mockResolvedValueOnce({ ok: true, created: [], kept: [], warnings: [] } as never)
+ launch.dshLaunch.mockResolvedValueOnce({ ok: true, launch: { env: {}, args: [] } } as never)
+ await ports.store!.dshMaterialize(request)
+ await ports.store!.dshLaunch(request)
+ expect(prepared).toHaveBeenCalledTimes(4)
+ })
it('answers exactly the requests it declares', () => {
expect(Object.keys(setup().requests).sort()).toEqual([...STORE_REQUESTS].sort())
// Started as the daemon starts it, with the real catalog and installs behind it.
diff --git a/cli/src/services/store.ts b/cli/src/services/store.ts
index 517f09a60..6fa97da54 100644
--- a/cli/src/services/store.ts
+++ b/cli/src/services/store.ts
@@ -1,15 +1,16 @@
/**
* The Harness Store on this machine: the harnesses (DSHs) installed here, and installing, updating and
* removing one (`dsh_list`, `dsh_install`, `dsh_update`, `dsh_remove`; store/spec/README.md § Wire).
- * The core never calls it, so it has no port: it only answers the apps. What each request reads off its
- * payload and replies is dsh/wire.ts.
+ * Its launch port prepares package workspaces and runtime context; core owns every session and pane.
+ * What each app request reads off its payload and replies is dsh/wire.ts.
*
* Install and update take minutes for a toolchain. Their handlers return a promise, so the socket never
* holds anything else for them, and they say how they are going as `dsh_install_status` pushes, which
* the apps show in the create dialog. Agents already running from a harness that is removed keep running:
* their processes hold what they need.
*/
-import type { CoreApi, ServiceRequests } from '../core/api.js'
+import type { CoreApi, CorePorts, ServiceRequests } from '../core/api.js'
+import { storeLaunchPort } from './storeLaunch.js'
import { ensureBundledCoreHarnesses } from '../dsh/builtins.js'
import { refreshDshRegistry } from '../dsh/catalog.js'
import { removeDsh } from '../dsh/install.js'
@@ -59,3 +60,21 @@ export function startStore(core: CoreApi, deps: StoreDeps = DEFAULTS): ServiceRe
},
}
}
+
+export function startStoreInCore(core: CoreApi, ports: CorePorts, prepared?: () => void): ServiceRequests {
+ const requests = startStore(core)
+ const launch = storeLaunchPort()
+ ports.store = {
+ dshMaterialize: async request => {
+ const answer = await launch.dshMaterialize(request)
+ if (answer.ok || !answer.unavailable) prepared?.()
+ return answer
+ },
+ dshLaunch: async request => {
+ const answer = await launch.dshLaunch(request)
+ if (answer.ok || !answer.unavailable) prepared?.()
+ return answer
+ },
+ }
+ return requests
+}
diff --git a/cli/src/services/storeLaunch.spec.ts b/cli/src/services/storeLaunch.spec.ts
new file mode 100644
index 000000000..536f5b6f1
--- /dev/null
+++ b/cli/src/services/storeLaunch.spec.ts
@@ -0,0 +1,60 @@
+import { afterEach, describe, expect, it, vi } from 'vitest'
+import { installedDsh } from '../dsh/installed.js'
+import { materializeWorkspace } from '../dsh/materialize.js'
+import { forkRuntimeKey, prepareHarnessLaunch } from '../dsh/runtime.js'
+import type { PrepareDsh } from '../dsh/preparation.js'
+import { storeLaunchPort } from './storeLaunch.js'
+
+vi.mock('../dsh/installed.js', () => ({ installedDsh: vi.fn(), dshRootDir: () => '/unused' }))
+vi.mock('../dsh/materialize.js', () => ({ materializeWorkspace: vi.fn() }))
+vi.mock('../dsh/runtime.js', () => ({ forkRuntimeKey: vi.fn(() => 'source-runtime'), prepareHarnessLaunch: vi.fn() }))
+const run: PrepareDsh = async (_workspace, _input, action) => action()
+const request = { dsh: 'test/draw', workspace: '/workspace', engine: 'codex' as const, key: 'agent', account: { privateGrid: 'private' } }
+const pkg = { id: request.dsh } as NonNullable<ReturnType<typeof installedDsh>>
+
+describe('the Store owns package preparation', () => {
+ afterEach(() => vi.clearAllMocks())
+ it('refuses missing packages without writing anything', async () => {
+ const port = storeLaunchPort(() => undefined, run)
+ const refused = { ok: false, error: 'DSH_NOT_INSTALLED', detail: 'test/draw is not installed on this machine' }
+ expect(await port.dshMaterialize(request)).toEqual(refused)
+ expect(await port.dshLaunch(request)).toEqual(refused)
+ expect(materializeWorkspace).not.toHaveBeenCalled()
+ expect(prepareHarnessLaunch).not.toHaveBeenCalled()
+ })
+ it('materializes only at create, and carries account, engine and fork source into runtime preparation', async () => {
+ vi.mocked(installedDsh).mockReturnValue(pkg)
+ vi.mocked(materializeWorkspace).mockResolvedValue({ created: ['template/a'], kept: [], warnings: ['kept user content'], initLines: ['x'.repeat(2 * 1024 * 1024)] })
+ const launch = { env: { HARNESS_PRIVATE_GRID: 'private' }, args: ['--context'] }
+ vi.mocked(prepareHarnessLaunch).mockReturnValue(launch)
+ const port = storeLaunchPort(undefined, run)
+ expect(await port.dshMaterialize(request)).toEqual({ ok: true, created: ['template/a'], kept: [], warnings: ['kept user content'] })
+ expect(materializeWorkspace).toHaveBeenCalledWith(pkg, request.workspace, request.account, request.engine)
+ expect(await port.dshLaunch(request)).toEqual({ ok: true, launch })
+ expect(prepareHarnessLaunch).toHaveBeenLastCalledWith(pkg, request.workspace, request.engine, request.key, request.account, null)
+ expect(await port.dshLaunch({ ...request, forkOf: { agentId: 'source', dshRuntime: null } })).toEqual({ ok: true, launch })
+ expect(forkRuntimeKey).toHaveBeenCalledWith({ cwd: request.workspace, agentId: 'source', dshRuntime: null })
+ expect(prepareHarnessLaunch).toHaveBeenLastCalledWith(pkg, request.workspace, request.engine, request.key, request.account, 'source-runtime')
+ expect(materializeWorkspace).toHaveBeenCalledOnce()
+ })
+ it('returns package errors without bringing down the service, with both historical error forms', async () => {
+ const port = storeLaunchPort(() => pkg, run)
+ for (const error of [new Error('disk full'), 'unreadable']) {
+ vi.mocked(materializeWorkspace).mockRejectedValueOnce(error)
+ vi.mocked(prepareHarnessLaunch).mockImplementationOnce(() => { throw error })
+ const detail = error instanceof Error ? error.message : error
+ expect(await port.dshMaterialize(request)).toEqual({ ok: false, error: 'DSH_MATERIALIZE_FAILED', detail })
+ expect(await port.dshLaunch(request)).toEqual({ ok: false, error: 'DSH_RUNTIME_FAILED', detail, thrown: String(error) })
+ }
+ })
+ it('holds an uncertain workspace without converting it into a package error', async () => {
+ const prepare: PrepareDsh = async () => { throw new Error('Previous workspace preparation is unconfirmed') }
+ const port = storeLaunchPort(() => pkg, prepare)
+ for (const answer of [await port.dshMaterialize(request), await port.dshLaunch(request)]) {
+ expect(answer).toEqual({ ok: false, error: 'DSH_UNAVAILABLE', unavailable: 'store', holdScope: 'workspace', detail: 'Previous workspace preparation is unconfirmed' })
+ }
+ expect(materializeWorkspace).not.toHaveBeenCalled()
+ expect(prepareHarnessLaunch).not.toHaveBeenCalled()
+ })
+
+})
diff --git a/cli/src/services/storeLaunch.ts b/cli/src/services/storeLaunch.ts
new file mode 100644
index 000000000..bbc7b4327
--- /dev/null
+++ b/cli/src/services/storeLaunch.ts
@@ -0,0 +1,47 @@
+/** Package files and scripts run in the Store. Core never loads this implementation to launch a session. */
+import type { StorePort } from '../core/api.js'
+import { join } from 'node:path'
+import { dshRootDir, installedDsh as lookup } from '../dsh/installed.js'
+import { materializeWorkspace } from '../dsh/materialize.js'
+import { forkRuntimeKey, prepareHarnessLaunch } from '../dsh/runtime.js'
+import { dshPreparations, type PrepareDsh } from '../dsh/preparation.js'
+
+const detail = (error: unknown) => error instanceof Error ? error.message : String(error)
+
+export function storeLaunchPort(installedDsh: typeof lookup = lookup,
+ prepare: PrepareDsh = dshPreparations(join(dshRootDir(), '.preparations'))): StorePort {
+ const missing = (id: string) => ({ ok: false as const, error: 'DSH_NOT_INSTALLED', detail: `${id} is not installed on this machine` })
+ return {
+ async dshMaterialize(request) {
+ const { dsh, workspace, engine, account } = request
+ const installed = installedDsh(dsh)
+ if (!installed) return missing(dsh)
+ try {
+ return await prepare(workspace, { kind: 'materialize', ...request, package: installed }, async () => {
+ try {
+ const { created, kept, warnings } = await materializeWorkspace(installed, workspace, account, engine)
+ return { ok: true as const, created, kept, warnings }
+ }
+ catch (error) { return { ok: false as const, error: 'DSH_MATERIALIZE_FAILED', detail: detail(error) } }
+ }, true)
+ } catch (error) {
+ return { ok: false, error: 'DSH_UNAVAILABLE', unavailable: 'store', holdScope: 'workspace', detail: detail(error) }
+ }
+ },
+ async dshLaunch(request) {
+ const { dsh, workspace, engine, key, account, forkOf } = request
+ const installed = installedDsh(dsh)
+ if (!installed) return missing(dsh)
+ try {
+ return await prepare(workspace, { kind: 'launch', ...request, package: installed }, async () => {
+ try {
+ const sourceKey = forkOf ? forkRuntimeKey({ cwd: workspace, ...forkOf }) : null
+ return { ok: true as const, launch: prepareHarnessLaunch(installed, workspace, engine, key, account, sourceKey) }
+ } catch (error) { return { ok: false as const, error: 'DSH_RUNTIME_FAILED', detail: detail(error), thrown: String(error) } }
+ })
+ } catch (error) {
+ return { ok: false, error: 'DSH_UNAVAILABLE', unavailable: 'store', holdScope: 'workspace', detail: detail(error) }
+ }
+ },
+ }
+}
diff --git a/cli/src/services/storeProcess.spec.ts b/cli/src/services/storeProcess.spec.ts
index 8912255d2..8e985f10d 100644
--- a/cli/src/services/storeProcess.spec.ts
+++ b/cli/src/services/storeProcess.spec.ts
@@ -41,7 +41,7 @@ describe('the Store in its own process', () => {
const { options, api, handle, service } = setup()
expect(handle).toBe(service)
expect(options).toMatchObject({ name: 'store', socketPath: '/data/daemon-1.sock', machineId: 'm', token: 't' })
- expect(Object.keys(options.requests).sort()).toEqual([...STORE_REQUESTS].sort())
+ expect(Object.keys(options.requests).sort()).toEqual([...STORE_REQUESTS, 'dshMaterialize', 'dshLaunch'].sort())
await expect(api.account.accessToken()).rejects.toThrow('store holds no credential')
})
@@ -74,6 +74,67 @@ describe('the Store in its own process', () => {
runStoreService({ dataDir: '/data', socketPath: '/data/daemon-1.sock', machineId: 'm', token: 't' })
const options = vi.mocked(runServiceProcess).mock.calls.at(-1)![0]
expect(options.name).toBe('store')
- expect(Object.keys(options.requests).sort()).toEqual([...STORE_REQUESTS].sort())
+ expect(Object.keys(options.requests).sort()).toEqual([...STORE_REQUESTS, 'dshMaterialize', 'dshLaunch'].sort())
})
})
+
+describe('the Store launch port on its process wire', () => {
+ const request = { dsh: 'test/draw', workspace: '/workspace', engine: 'claude', key: 'agent', account: {} }
+ const setup = () => {
+ const launch = { dshMaterialize: vi.fn(async () => ({ ok: true as const, created: [], kept: [], warnings: [] })),
+ dshLaunch: vi.fn(async () => ({ ok: true as const, launch: { env: {}, args: [] } })) }
+ runStoreService({ dataDir: '/data', socketPath: '/socket', machineId: 'm', token: 't', start: () => ({}), launch })
+ return { launch, requests: vi.mocked(runServiceProcess).mock.calls.at(-1)![0].requests }
+ }
+ it('checks context, private grid and fork identity, and strips unrelated data', async () => {
+ const { launch, requests } = setup()
+ for (const account of [{}, { privateGrid: null }, { privateGrid: '' }, { privateGrid: 'private' }]) {
+ expect(await requests.dshMaterialize!({ ...request, account, secret: 'not forwarded' }, ASKER)).toMatchObject({ ok: true })
+ expect(launch.dshMaterialize).toHaveBeenLastCalledWith({ dsh: request.dsh, workspace: request.workspace, key: request.key, engine: request.engine, account })
+ }
+ for (const forkOf of [undefined, { agentId: 'source', dshRuntime: null }, { agentId: 'source', dshRuntime: 'runtime' }]) {
+ expect(await requests.dshLaunch!({ ...request, forkOf }, ASKER)).toMatchObject({ ok: true })
+ expect(launch.dshLaunch).toHaveBeenLastCalledWith({ ...request, ...(forkOf ? { forkOf } : {}) })
+ }
+ })
+ it('rejects malformed requests before package work starts', async () => {
+ const { launch, requests } = setup()
+ const bad = [{ dsh: '' }, { dsh: 1 }, { workspace: null }, { engine: 'terminal' }, { engine: 'unknown' },
+ { account: null }, { account: [] }, { account: { privateGrid: 42 } }]
+ for (const over of bad) {
+ expect(await requests.dshMaterialize!({ ...request, ...over }, ASKER)).toMatchObject({ error: 'INVALID_DSH' })
+ expect(await requests.dshLaunch!({ ...request, ...over }, ASKER)).toMatchObject({ error: 'INVALID_DSH' })
+ }
+ for (const over of [{ key: '' }, { forkOf: null }, { forkOf: [] }, { forkOf: { agentId: '' } },
+ { forkOf: { agentId: 'source' } }, { forkOf: { agentId: 'source', dshRuntime: 3 } }]) {
+ expect(await requests.dshLaunch!({ ...request, ...over }, ASKER)).toMatchObject({ error: 'INVALID_DSH' })
+ }
+ expect(launch.dshMaterialize).not.toHaveBeenCalled()
+ expect(launch.dshLaunch).not.toHaveBeenCalled()
+ })
+ it('notifies held launches after a completed preparation and tolerates the core going away', async () => {
+ const { launch, requests } = setup()
+ const options = vi.mocked(runServiceProcess).mock.calls.at(-1)![0]
+ const query = vi.fn(async () => ({}))
+ options.onConnected!({ query })
+ query.mockClear()
+ await requests.dshMaterialize!(request, ASKER)
+ await requests.dshLaunch!(request, ASKER)
+ expect(query.mock.calls).toEqual([['prepared'], ['prepared']])
+ query.mockRejectedValue(new Error('core gone'))
+ await requests.dshMaterialize!(request, ASKER)
+ await requests.dshLaunch!(request, ASKER)
+ launch.dshMaterialize.mockResolvedValueOnce({ ok: false, error: 'DSH_UNAVAILABLE', unavailable: 'store', detail: 'unconfirmed' } as never)
+ launch.dshLaunch.mockResolvedValueOnce({ ok: false, error: 'DSH_UNAVAILABLE', unavailable: 'store', detail: 'unconfirmed' } as never)
+ await requests.dshMaterialize!(request, ASKER)
+ await requests.dshLaunch!(request, ASKER)
+ expect(query).toHaveBeenCalledTimes(4)
+ query.mockResolvedValue({})
+ launch.dshMaterialize.mockResolvedValueOnce({ ok: false, error: 'DSH_MATERIALIZE_FAILED', detail: 'init failed' } as never)
+ launch.dshLaunch.mockResolvedValueOnce({ ok: false, error: 'DSH_RUNTIME_FAILED', detail: 'runtime failed' } as never)
+ await requests.dshMaterialize!(request, ASKER)
+ await requests.dshLaunch!(request, ASKER)
+ expect(query).toHaveBeenCalledTimes(6)
+ })
+
+})
diff --git a/cli/src/services/storeProcess.ts b/cli/src/services/storeProcess.ts
index 03906266c..ed648a50e 100644
--- a/cli/src/services/storeProcess.ts
+++ b/cli/src/services/storeProcess.ts
@@ -13,10 +13,13 @@
* core keeps the installed index for two seconds (dsh/installed.ts), and the create that follows an
* install must find what was just installed.
*/
-import type { CoreApi, ServiceRequest, ServiceRequests } from '../core/api.js'
+import type { CoreApi, ServiceRequest, ServiceRequests, StorePort } from '../core/api.js'
+import type { DshMaterializeRequest, DshLaunchRequest } from '../dsh/launchWire.js'
+import { PROCESS_ENGINES, type AgentEngine } from '../engines/types.js'
import { runServiceProcess, type CoreConnection, type ServiceProcess } from './process.js'
import { processCoreApi } from './processCoreApi.js'
import { startStore } from './store.js'
+import { storeLaunchPort } from './storeLaunch.js'
export interface StoreServiceOptions {
dataDir: string
@@ -27,6 +30,29 @@ export interface StoreServiceOptions {
run?: typeof runServiceProcess
/** Swapped in tests for a Store that clones and installs nothing. */
start?: (core: CoreApi) => ServiceRequests
+ launch?: StorePort
+}
+
+const record = (value: unknown): value is Record<string, unknown> => !!value && typeof value === 'object' && !Array.isArray(value)
+const text = (value: unknown): value is string => typeof value === 'string' && value.length > 0
+
+/** Internal port calls accept only the context package preparation actually reads. */
+export function dshMaterializeRequestIn(value: Record<string, unknown>): DshMaterializeRequest | null {
+ if (!text(value.dsh) || !text(value.workspace) || !text(value.key) || !PROCESS_ENGINES.some(engine => engine === value.engine)) return null
+ if (!record(value.account)) return null
+ const name = value.account.privateGrid
+ if (name !== undefined && name !== null && typeof name !== 'string') return null
+ return { dsh: value.dsh, workspace: value.workspace, key: value.key, engine: value.engine as AgentEngine,
+ account: name === undefined ? {} : { privateGrid: name } }
+}
+
+export function dshLaunchRequestIn(value: Record<string, unknown>): DshLaunchRequest | null {
+ const base = dshMaterializeRequestIn(value)
+ if (!base) return null
+ if (value.forkOf === undefined) return base
+ const fork = value.forkOf
+ if (!record(fork) || !text(fork.agentId) || !(fork.dshRuntime === null || text(fork.dshRuntime))) return null
+ return { ...base, forkOf: { agentId: fork.agentId, dshRuntime: fork.dshRuntime } }
}
/** The requests that change what is installed here. */
@@ -40,13 +66,28 @@ export function runStoreService(options: StoreServiceOptions): ServiceProcess {
clients: { ...base.clients, dshInstallStatus: (status) => { void core?.query('installStatus', { status }).catch(() => {}) } },
}
const answers = (options.start ?? startStore)(api)
+ const launch = options.launch ?? storeLaunchPort()
/** Answered once the core has heard that what is installed changed: whatever it was, it may have. */
const changing = (handle: ServiceRequest): ServiceRequest => async (payload, asker) => {
const answer = await handle(payload, asker)
await core?.query('installed').catch(() => {})
return answer
}
- const requests: ServiceRequests = Object.fromEntries(Object.entries(answers).map(([type, handle]) => [type, CHANGES.includes(type) ? changing(handle) : handle]))
+ const requests: Record<string, ServiceRequest> = Object.fromEntries(Object.entries(answers).map(([type, handle]) => [type, CHANGES.includes(type) ? changing(handle) : handle]))
+ requests.dshMaterialize = async payload => {
+ const request = dshMaterializeRequestIn(payload)
+ if (!request) return { ok: false, error: 'INVALID_DSH', detail: 'Invalid harness workspace request' }
+ const answer = await launch.dshMaterialize(request)
+ if (answer.ok || !answer.unavailable) void core?.query('prepared').catch(() => {})
+ return { ...answer }
+ }
+ requests.dshLaunch = async payload => {
+ const request = dshLaunchRequestIn(payload)
+ if (!request) return { ok: false, error: 'INVALID_DSH', detail: 'Invalid harness launch request' }
+ const answer = await launch.dshLaunch(request)
+ if (answer.ok || !answer.unavailable) void core?.query('prepared').catch(() => {})
+ return { ...answer }
+ }
return (options.run ?? runServiceProcess)({
name: 'store',
socketPath: options.socketPath,
diff --git a/cli/src/testing/launchShapes.ts b/cli/src/testing/launchShapes.ts
index c051f51b9..ad72392f8 100644
--- a/cli/src/testing/launchShapes.ts
+++ b/cli/src/testing/launchShapes.ts
@@ -2,12 +2,19 @@
* The core's launch paths, wired as core/main.ts wires them, over a machine a spec chooses: create, every relaunch
* (restart, resume, restore and fork share `relaunchOverrides`), retarget's check before it touches a pane and the
* line it logs after, the socket's saved-API target, the variables a pane leaving a grid has cleared, and the
- * engines a model picker may offer a grid model to. For engines/launchShapes.golden.spec.ts, which pins what each
- * launch shape starts with and writes. The composition, not the spec, follows where each part of a launch is built
+ * engines a model picker may offer a grid model to; and a fork, and a harness package's (DSH) part of each launch. For
+ * engines/launchShapes.golden.spec.ts and engines/dshLaunchShapes.golden.spec.ts, which pin what each launch shape
+ * starts with and writes. The composition, not the spec, follows where each part of a launch is built
* (docs/design/2026-10-08-launch-port.md).
*/
import { createLaunchHelpers, gridLaunchThrough } from '../core/agents/launch.js'
import { createAgentCreator, type CreateAgentDeps } from '../core/agents/create.js'
+import { createAgentForker, type ForkAgentDeps } from '../core/agents/fork.js'
+import { installedDsh } from '../dsh/installed.js'
+import { dshThrough } from '../core/agents/dshThrough.js'
+import { createStoreLink } from '../core/storeLink.js'
+import { storeLaunchPort } from '../services/storeLaunch.js'
+import { dshLaunchRequestIn, dshMaterializeRequestIn } from '../services/storeProcess.js'
import { gridLaunchAnswerIn } from '../core/modelsLink.js'
import { ApiConnections } from '../lib/apiConnections.js'
import { prepareApiInstructions } from '../lib/apiInstructions.js'
@@ -29,13 +36,18 @@ export interface LaunchWorld {
readCodexConfig: (path: string) => string | null
/** What a launch records on its row once built. */
setGridLaunch: (agentId: string, record: unknown) => void
+ /** This account's private grid, as the socket knows it (BackendSocket.gridName). */
+ gridName?: () => string | null
}
/** What `create` needs besides the launch: the spec's stubs for the pane, the registry and the rest. */
-export type CreateRest = Omit<CreateAgentDeps, 'gridLaunchMachine' | 'prepareApiTools' | 'buildGridLaunch'>
+export type CreateRest = Omit<CreateAgentDeps, 'gridLaunchMachine' | 'prepareApiTools' | 'buildGridLaunch' | 'dshLaunch'>
+/** What `fork` needs besides the launch. */
+export type ForkRest = Omit<ForkAgentDeps, 'prepareApiTools' | 'relaunchOverrides' | 'gridName' | 'dshLaunch'>
export function launchShapes(world: LaunchWorld) {
const savedApis = new ApiConnections(world.dataDir)
+ const gridName = world.gridName ?? (() => null)
const prepareApiTools = (cwd: string | null | undefined, engine: string): void => {
if (!cwd) return
try { prepareApiInstructions(savedApis, cwd, engine) }
@@ -56,6 +68,19 @@ export function launchShapes(world: LaunchWorld) {
return answer
},
}))
+ const store = storeLaunchPort()
+ const link = createStoreLink({ clients: { dshInstallStatus: () => {} } } as never, () => {}, async (type, payload) => {
+ if (type === 'dshMaterialize') {
+ const request = dshMaterializeRequestIn(wire(payload))
+ if (!request) throw new Error('Store could not read the workspace request')
+ return wire(await store.dshMaterialize(request))
+ }
+ const request = dshLaunchRequestIn(wire(payload))
+ if (!request) throw new Error('Store could not read the launch request')
+ return wire(await store.dshLaunch(request))
+ })
+ const dshLaunch = dshThrough({ store: () => link.port, nameOf: id => installedDsh(id)?.manifest.name,
+ account: () => ({ privateGrid: gridName() }) })
const launchOverridesDeps: LaunchOverridesDeps = {
machine: world.machine,
gridLaunch,
@@ -63,14 +88,16 @@ export function launchShapes(world: LaunchWorld) {
tmuxSupportsSessionEnv: world.tmuxSupportsSessionEnv,
installCodexHooks: () => {},
readCodexConfig: world.readCodexConfig,
+ dshLaunch: dshLaunch.relaunch,
}
const helpers = createLaunchHelpers({
prepareApiTools, launchOverridesDeps,
setGridLaunch: world.setGridLaunch as never, setTail: () => {},
})
return {
- create: (rest: CreateRest) => createAgentCreator({ ...rest, gridLaunchMachine: world.machine, buildGridLaunch: gridLaunch, prepareApiTools }),
+ create: (rest: CreateRest) => createAgentCreator({ ...rest, gridLaunchMachine: world.machine, buildGridLaunch: gridLaunch, prepareApiTools, dshLaunch }),
relaunch: (session: RegisteredSession, source?: LaunchSource) => helpers.relaunchOverrides(session, source),
+ fork: (rest: ForkRest) => createAgentForker({ ...rest, prepareApiTools, relaunchOverrides: helpers.relaunchOverrides, gridName, dshLaunch }),
validate: (engine: AgentEngine, source: LaunchSource) => validateLaunchOverrides(launchOverridesDeps, engine, source),
/** The line retarget logs once a move onto a grid succeeded. */
retargetLine: (engine: AgentEngine, overrides: LaunchOverrides): string | null => overrides.gridLaunchRecord
diff --git a/docs/research/2026-10-09-daemon-separation-progress.md b/docs/research/2026-10-09-daemon-separation-progress.md
new file mode 100644
index 000000000..4966477c5
--- /dev/null
+++ b/docs/research/2026-10-09-daemon-separation-progress.md
@@ -0,0 +1,35 @@
+# Daemon separation continuation, 2026-10-09
+
+The architectural requirements and remaining order are in the [handoff](2026-10-08-daemon-separation-handoff.md). No release is authorized.
+
+## Crash resume
+
+[PR #1072](https://github.com/autonomous-ai/openharness/pull/1072) merged as `9ad4bb087`. The main Codex machine test reproduced the interrupted `!slow 8000` prompt being replayed after a stale attach consumed the relaunch boundary. Core now retains that boundary until installation or session cleanup; a stale, failed or delayed worker answer cannot consume it. An interrupted turn closes before new live records arrive, including when the old shell survives.
+
+Regression specs were committed before the fix. Independent review found retained-tail, delayed-attach, automatic-retry and lifecycle-cleanup gaps, all corrected and reviewed again. Final local evidence: typecheck; 1,643 core tests at 100% statements and branches per file; 265 harnessd tests at 100% with one existing skip; 123 architecture/resume/attach specs; all six machine cases, plus 44 terminal/compaction/engine-reader cases on the identical production implementation. Two initial new e2e cases failed because private process identity and cwd were read from the public agent list; the corrected tests read the disposable registry. The failed combined run is not a passing suite. [Final automatic CI](https://github.com/autonomous-ai/openharness/actions/runs/37862113864) passed every selected check, including `ci/required`.
+
+Time accounting (UTC): request first measured October 8 at 23:26:41; initial implementation and review through 23:44; test-only corrections through 23:55; merged October 9 at 00:00. Local gates took 55 seconds; final combined acceptance 302 seconds and corrected machine acceptance 101 seconds. Diagnosis, implementation, review, validation and waiting overlapped; their individual durations are not additive. Final CI occupied about four minutes of the waiting interval. The merge helper verified both the reviewed target tree and tested full tree. Publication time: zero; nothing released.
+
+## L3: Store launch preparation
+
+[PR #1073](https://github.com/autonomous-ai/openharness/pull/1073) is in progress. The 61-case DSH golden was re-recorded on `1987fa238` in its own commit before the move. Host tmux and Node paths are placeholders, both platforms are pinned, and execution uses `TZ=UTC TMPDIR=/tmp`. The fixture stays unchanged after moving requests and answers through JSON and the production validators.
+
+Core retains the installed index, compatibility checks, trust decisions, session state and pane ownership. Store owns workspace initialization and runtime preparation. Boot does not wait for Store. A grid package declares both dependencies; after a service cannot answer, later dependent agents in the same pass wait without repeating its deadline. Restore checks current held ownership after preparation and preserves the precise reason in the row and waiting pane.
+
+Store reserves the canonical workspace durably before modifying it. An interrupted or unconfirmed operation prevents another engine, package or new create label from rerunning initialization there. This is a hold for explicit review, not a claim that arbitrary package scripts can be rolled back. User files are preserved. Confirmed initialization can be recovered after a lost reply; runtime inputs are revalidated at each launch. Runtime files are replaced atomically so an existing live session never reads a truncated context. A workspace-specific hold does not prevent other workspaces from launching.
+
+Validation and independent review passed, with the final rejection-path verification and automatic PR checks recorded in the PR body. Four deliberately broken Store contributions (create account, relaunch account, fork source and package argv) are rejected by assertions in the unchanged golden. The new mutation script distinguishes assertion failures from setup/import failures. A small baseline desk workload uses four agents, two active agents and two windows, with ten-second measurement phases; this is a comparison, not a new performance threshold.
+
+Independent review also caught lifecycle races across preparation, tmux dispatch and process verification. Stop now cancels preparation immediately and joins only an already dispatched core pane operation before capturing its target. Hook admission waits for the same route commit. Boot restore, restart and retarget share a generation from startup; old asynchronous answers cannot revive a stopped, rebound or replaced session, or release a newer reconciler hold.
+
+Each held pass gets a fresh tmux inventory. Missing waiting panes are allocated with at most four commands in flight; Stop prevents further dispatch. Core reserves the possible stale route owners while allocating, then commits only a safe set of routes synchronously, after rejecting collision chains against the full current registry. No service wait occurs inside a registry transaction. A waiting pane whose ownership cannot be confirmed stays intact with its exact ID logged for review. This is conservative recovery, not deletion of an ambiguous pane.
+
+The original golden's timezone override was corrected in a separate pre-move checkout (`5e950feef`), rerun under UTC, and merged with the move; its fixture bytes did not change. The complete core gate passed with 1,682 tests at 100% statements and branches per covered production file. Harnessd passed 265 tests with one existing skip; architecture/goldens/recovery passed 234; resume passed 292 at 100%; portability passed at its per-file 100% gates. The isolated Store/fork/held-boot lane passed 16 selected cases and crash/race/lifecycle passed 25. Initial resume attempts failed because the test PATH omitted macOS `lsof`, and a 2,050-file fixture and cleanup exceeded default bounds under concurrent coverage. The passing rerun restored `/usr/sbin`, used one resume worker and declared 45-second test/cleanup bounds. A portability loopback cleanup also passed under the explicit cleanup bound after concurrent e2e load ended. The earlier failed run is retained as failed evidence.
+
+The same staged allocation now covers boot and held retries. Accepted waiting routes commit with `launch: held` and `active: false`. Discovery never archives or forgets a held conversation because its waiting shell is absent. Only missing route owners are reserved, and transient core contention schedules a coalesced retry without relying on another service-ready notice. Cycles, cascading allocation failures, out-of-selection collisions, unrelated pins and bounded Stop joins are covered with disposable fixtures, including the real registry.
+
+A final fallback correction preserves `held` even when showing the waiting shell fails or rejects. The row keeps the conversation and both reasons, and the regression proves a later missing-pane allocation can recover it. Independent review approved the full change and this exact final delta; no reviewer edits or test runs were used as implementation evidence.
+
+L3 timing through the final local gates (UTC): implementation began after the crash fix merged at 00:00 and continued through 01:16; independent review ran alongside implementation and validation, with final approval at 01:14. Validation ran from the baseline measurement at 00:11 through final local checks after 01:16, including failed attempts above. The final six-file e2e run occupied 325 seconds; the successful type/core/recovery/resume/portability run occupied roughly four minutes with independent checks overlapped. Waiting for automatic CI and the merge are recorded separately in the PR body. Publication: zero. These phase intervals overlap and are not added to claim the total request duration.
+
+The closure is 58,498 lines in 340 files versus 58,533 in 339 before L3. This is a reference; the added core recovery controls carry the safety guarantees above.