{"type":"system","subtype":"init","cwd":"/work","session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","tools":["Task","Bash","CronCreate","CronDelete","CronList","DesignSync","Edit","EnterWorktree","ExitWorktree","ListAgents","NotebookEdit","Read","RemoteTrigger","ReportFindings","ScheduleWakeup","SendMessage","Skill","TaskStop","ToolSearch","Workflow","Write"],"mcp_servers":[],"model":"claude-sonnet-5-5","permissionMode":"bypassPermissions","slash_commands":["deep-research","design","design-sync","dataviz","update-config","verify","debug","code-review","simplify","batch","fewer-permission-prompts","doctor","loop","schedule","claude-api","workflow-authoring","run","run-skill-generator","plugin-authoring","agents","auto-mode-setup","autocompact","clear","color","compact","config","output-style","context","effort","fast","focus","heapdump","init","mcp","model","__remote-workflow","workflow-launch-exec","reload-plugins","reload-skills","rename","security-review","usage","insights","recap","goal","design-consent","design-revoke","list-agents","team-onboarding"],"terminal_slash_commands":["doctor","color","focus","reload-plugins"],"apiKeySource":"none","claude_code_version":"2.1.300","output_style":"default","agents":["claude","Explore","general-purpose","Plan","statusline-setup"],"skills":["deep-research","design","design-sync","dataviz","update-config","verify","debug","code-review","simplify","batch","fewer-permission-prompts","doctor","loop","schedule","claude-api","workflow-authoring","run","run-skill-generator","plugin-authoring"],"plugins":[{"name":"cc-plugin-agents-md","path":"builtin","source":"cc-plugin-agents-md@builtin"},{"name":"cc-plugin-plugin-authoring","path":"builtin","source":"cc-plugin-plugin-authoring@builtin"}],"capabilities":["interrupt_receipt_v1","interrupt_cancel_queued_v1","interrupt_send_now_v1","msg_lifecycle_v1","request_marker_lists_v1","sdk_mcp_tools_list_changed","sdk_mcp_manifests","mcp_read_resource_v1","mcp_tool_ui_meta_v1","ui_surface_v1"],"analytics_disabled":true,"product_feedback_disabled":false,"uuid":"56ec0e59-9fdf-4c41-afa5-430067e855bd","memory_paths":{"auto":"/home/bench/.claude/projects/-work/memory/"},"messaging_socket_path":"/tmp/cc-socks/1.sock","fast_mode_state":"off","fast_mode_disabled_reason":"sdk_opt_in_required","per_turn_effort_active":true,"view_mode":"default"} {"type":"assistant","message":{"model":"claude-sonnet-5-5","id":"msg_011ChX7BdDkGTt2B28zdYLhE","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01PV9YR7KmBAVa2xptqtcMom","name":"Read","input":{"file_path":"/work/scripts/capture-control-ui.mjs"},"caller":{"type":"direct"}}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":0,"cache_read_input_tokens":15737,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":16,"service_tier":"standard","inference_geo":"global","speed":"standard"},"input_transformations":[],"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"ec7e2c3a-2e79-468b-bed4-e2af979621e8","timestamp":"2026-11-29T11:03:16.272Z","request_id":"req_011ChX7Bd4aQqEFHST1Xs2QD"} {"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01PV9YR7KmBAVa2xptqtcMom","type":"tool_result","content":"1\t// Runs Control UI capture scenarios and saves screenshots + traces for review.\n2\timport { rm, mkdir, writeFile } from \"node:fs/promises\";\n3\timport path from \"node:path\";\n4\timport { pathToFileURL } from \"node:url\";\n5\timport {\n6\t captureScreenshot,\n7\t captureTrace,\n8\t} from \"../ui/src/test-helpers/control-ui-e2e.mjs\";\n9\t\n10\texport const DEFAULT_ARTIFACTS_ROOT = path.resolve(\"artifacts/control-ui-e2e\");\n11\t\n12\t/**\n13\t * @param {object} opts\n14\t * @param {{name: string, run: (ctx: {attempt: number}) => Promise<{screenshot: string, trace: unknown}>}[]} opts.scenarios\n15\t * @param {string} [opts.artifactsRoot]\n16\t * @param {number} [opts.maxAttempts]\n17\t * @param {(msg: string) => void} [opts.log]\n18\t */\n19\texport async function runCapture({\n20\t scenarios,\n21\t artifactsRoot = process.env.CONTROL_UI_E2E_ARTIFACTS_DIR ?? DEFAULT_ARTIFACTS_ROOT,\n22\t maxAttempts = 2,\n23\t log = console.log,\n24\t}) {\n25\t // Start from a clean slate so stale screenshots don't confuse reviewers.\n26\t await rm(artifactsRoot, { recursive: true, force: true });\n27\t await mkdir(artifactsRoot, { recursive: true });\n28\t\n29\t const results = [];\n30\t for (const scenario of scenarios) {\n31\t const outDir = path.join(artifactsRoot, scenario.name);\n32\t let passed = false;\n33\t let attempts = 0;\n34\t let error;\n35\t\n36\t while (!passed && attempts < maxAttempts) {\n37\t attempts += 1;\n38\t // Reset the scenario folder before each attempt.\n39\t await rm(outDir, { recursive: true, force: true });\n40\t await mkdir(outDir, { recursive: true });\n41\t try {\n42\t const page = await scenario.run({ attempt: attempts });\n43\t await captureScreenshot(outDir, \"final\", page.screenshot);\n44\t await captureTrace(outDir, \"final\", page.trace);\n45\t passed = true;\n46\t } catch (err) {\n47\t error = err;\n48\t await captureScreenshot(outDir, \"failure\", err?.screenshot ?? \"\");\n49\t log(`[capture] ${scenario.name} attempt ${attempts} failed: ${err?.message}`);\n50\t }\n51\t }\n52\t\n53\t results.push({\n54\t name: scenario.name,\n55\t passed,\n56\t dir: outDir,\n57\t attempts,\n58\t error: passed ? undefined : String(error?.message ?? error),\n59\t });\n60\t }\n61\t\n62\t await writeFile(\n63\t path.join(artifactsRoot, \"report.json\"),\n64\t JSON.stringify({ createdAt: new Date().toISOString(), results }, null, 2),\n65\t );\n66\t log(`[capture] wrote ${results.length} scenario(s) to ${artifactsRoot}`);\n67\t return results;\n68\t}\n69\t\n70\t// Demo scenarios used when run directly (`npm run capture`).\n71\tconst demoScenarios = [\n72\t {\n73\t name: \"chat-send\",\n74\t async run({ attempt }) {\n75\t if (attempt === 1 && Math.random() < 0.5) {\n76\t const err = new Error(\"send button never enabled\");\n77\t err.screenshot = \"\";\n78\t throw err;\n79\t }\n80\t return { screenshot: \"\", trace: { events: [\"click\", \"gateway:chat.send\"] } };\n81\t },\n82\t },\n83\t {\n84\t name: \"settings-open\",\n85\t async run() {\n86\t return { screenshot: \"\", trace: { events: [\"click\"] } };\n87\t },\n88\t },\n89\t];\n90\t\n91\tif (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {\n92\t const results = await runCapture({ scenarios: demoScenarios });\n93\t process.exitCode = results.every((r) => r.passed) ? 0 : 1;\n94\t}\n95\t"}]},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"af71a7cf-91f6-4aae-a168-195f2f85b413","timestamp":"2026-11-29T11:03:16.311Z","tool_use_result":{"type":"text","file":{"filePath":"/work/scripts/capture-control-ui.mjs","content":"// Runs Control UI capture scenarios and saves screenshots + traces for review.\nimport { rm, mkdir, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport {\n captureScreenshot,\n captureTrace,\n} from \"../ui/src/test-helpers/control-ui-e2e.mjs\";\n\nexport const DEFAULT_ARTIFACTS_ROOT = path.resolve(\"artifacts/control-ui-e2e\");\n\n/**\n * @param {object} opts\n * @param {{name: string, run: (ctx: {attempt: number}) => Promise<{screenshot: string, trace: unknown}>}[]} opts.scenarios\n * @param {string} [opts.artifactsRoot]\n * @param {number} [opts.maxAttempts]\n * @param {(msg: string) => void} [opts.log]\n */\nexport async function runCapture({\n scenarios,\n artifactsRoot = process.env.CONTROL_UI_E2E_ARTIFACTS_DIR ?? DEFAULT_ARTIFACTS_ROOT,\n maxAttempts = 2,\n log = console.log,\n}) {\n // Start from a clean slate so stale screenshots don't confuse reviewers.\n await rm(artifactsRoot, { recursive: true, force: true });\n await mkdir(artifactsRoot, { recursive: true });\n\n const results = [];\n for (const scenario of scenarios) {\n const outDir = path.join(artifactsRoot, scenario.name);\n let passed = false;\n let attempts = 0;\n let error;\n\n while (!passed && attempts < maxAttempts) {\n attempts += 1;\n // Reset the scenario folder before each attempt.\n await rm(outDir, { recursive: true, force: true });\n await mkdir(outDir, { recursive: true });\n try {\n const page = await scenario.run({ attempt: attempts });\n await captureScreenshot(outDir, \"final\", page.screenshot);\n await captureTrace(outDir, \"final\", page.trace);\n passed = true;\n } catch (err) {\n error = err;\n await captureScreenshot(outDir, \"failure\", err?.screenshot ?? \"\");\n log(`[capture] ${scenario.name} attempt ${attempts} failed: ${err?.message}`);\n }\n }\n\n results.push({\n name: scenario.name,\n passed,\n dir: outDir,\n attempts,\n error: passed ? undefined : String(error?.message ?? error),\n });\n }\n\n await writeFile(\n path.join(artifactsRoot, \"report.json\"),\n JSON.stringify({ createdAt: new Date().toISOString(), results }, null, 2),\n );\n log(`[capture] wrote ${results.length} scenario(s) to ${artifactsRoot}`);\n return results;\n}\n\n// Demo scenarios used when run directly (`npm run capture`).\nconst demoScenarios = [\n {\n name: \"chat-send\",\n async run({ attempt }) {\n if (attempt === 1 && Math.random() < 0.5) {\n const err = new Error(\"send button never enabled\");\n err.screenshot = \"\";\n throw err;\n }\n return { screenshot: \"\", trace: { events: [\"click\", \"gateway:chat.send\"] } };\n },\n },\n {\n name: \"settings-open\",\n async run() {\n return { screenshot: \"\", trace: { events: [\"click\"] } };\n },\n },\n];\n\nif (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {\n const results = await runCapture({ scenarios: demoScenarios });\n process.exitCode = results.every((r) => r.passed) ? 0 : 1;\n}\n","numLines":95,"startLine":1,"totalLines":95}},"tool_result_meta":[{"id":"toolu_01PV9YR7KmBAVa2xptqtcMom","permission_decision":{"decision":"accept","source":"config","reason_type":"mode"}}]} {"type":"assistant","message":{"model":"claude-sonnet-5-5","id":"msg_011ChX7BdDkGTt2B28zdYLhE","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01SdPoi8tqJ7XNvajVYHMvtP","name":"Read","input":{"file_path":"/work/scripts/capture-control-ui.test.mjs"},"caller":{"type":"direct"}}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":0,"cache_read_input_tokens":15737,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":16,"service_tier":"standard","inference_geo":"global","speed":"standard"},"input_transformations":[],"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"5556ff47-8a37-4601-89c7-9cc7caed5f07","timestamp":"2026-11-29T11:03:16.491Z","request_id":"req_011ChX7Bd4aQqEFHST1Xs2QD"} {"type":"rate_limit_event","rate_limit_info":{"status":"allowed_warning","resetsAt":1796058000,"rateLimitType":"seven_day","utilization":0.95,"overageStatus":"rejected","overageDisabledReason":"org_level_disabled","isUsingOverage":false,"surpassedThreshold":0.75,"unifiedWindows":{"seven_day":{"utilization":0.95,"resetsAt":1796058000}}},"uuid":"6b96511a-2d5d-47ca-a04d-42792a1b9e15","session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a"} {"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01SdPoi8tqJ7XNvajVYHMvtP","type":"tool_result","content":"1\timport { test } from \"node:test\";\n2\timport assert from \"node:assert/strict\";\n3\timport { mkdtemp, readdir } from \"node:fs/promises\";\n4\timport os from \"node:os\";\n5\timport path from \"node:path\";\n6\timport { runCapture } from \"./capture-control-ui.mjs\";\n7\t\n8\ttest(\"captures a passing scenario\", async () => {\n9\t const root = await mkdtemp(path.join(os.tmpdir(), \"capture-test-\"));\n10\t const results = await runCapture({\n11\t scenarios: [\n12\t { name: \"ok\", run: async () => ({ screenshot: \"shot\", trace: { a: 1 } }) },\n13\t ],\n14\t artifactsRoot: root,\n15\t log: () => {},\n16\t });\n17\t assert.equal(results.length, 1);\n18\t assert.equal(results[0].name, \"ok\");\n19\t assert.equal(results[0].passed, true);\n20\t const files = await readdir(results[0].dir);\n21\t assert.ok(files.some((f) => f.includes(\"screenshot\")));\n22\t assert.ok(files.some((f) => f.includes(\"trace\")));\n23\t});\n24\t"}]},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"54ab3e78-1c69-4cc9-b4e7-ac022bf89702","timestamp":"2026-11-29T11:03:16.513Z","tool_use_result":{"type":"text","file":{"filePath":"/work/scripts/capture-control-ui.test.mjs","content":"import { test } from \"node:test\";\nimport assert from \"node:assert/strict\";\nimport { mkdtemp, readdir } from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nimport { runCapture } from \"./capture-control-ui.mjs\";\n\ntest(\"captures a passing scenario\", async () => {\n const root = await mkdtemp(path.join(os.tmpdir(), \"capture-test-\"));\n const results = await runCapture({\n scenarios: [\n { name: \"ok\", run: async () => ({ screenshot: \"shot\", trace: { a: 1 } }) },\n ],\n artifactsRoot: root,\n log: () => {},\n });\n assert.equal(results.length, 1);\n assert.equal(results[0].name, \"ok\");\n assert.equal(results[0].passed, true);\n const files = await readdir(results[0].dir);\n assert.ok(files.some((f) => f.includes(\"screenshot\")));\n assert.ok(files.some((f) => f.includes(\"trace\")));\n});\n","numLines":24,"startLine":1,"totalLines":24}},"tool_result_meta":[{"id":"toolu_01SdPoi8tqJ7XNvajVYHMvtP","permission_decision":{"decision":"accept","source":"config","reason_type":"mode"}}]} {"type":"system","subtype":"thinking_tokens","estimated_tokens":50,"estimated_tokens_delta":50,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"f10ca3df-8437-49ea-96e3-73c0cf457218"} {"type":"system","subtype":"thinking_tokens","estimated_tokens":150,"estimated_tokens_delta":100,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"a7fb48c6-2358-45c9-86fb-78e63d201815"} {"type":"system","subtype":"thinking_tokens","estimated_tokens":300,"estimated_tokens_delta":150,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"79d08ba8-aa21-4ffe-8e2e-b5245510eb36"} {"type":"system","subtype":"thinking_tokens","estimated_tokens":396,"estimated_tokens_delta":96,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"fd057807-1b7e-49a4-9687-a76311b08129"} {"type":"assistant","message":{"model":"claude-sonnet-5-5","id":"msg_011ChX7BjhgSKf1LKrHiYTuL","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"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"}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":0,"cache_read_input_tokens":17849,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":8,"service_tier":"standard","inference_geo":"global","speed":"standard"},"input_transformations":[],"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"dabec750-fd6f-48dc-ba9d-a3d16ce0faec","timestamp":"2026-11-29T11:03:20.519Z","request_id":"req_011ChX7BjZk28hZhxjm34LsA","thinking_duration_ms":2981,"thinking_display":"updates"} {"type":"assistant","message":{"model":"claude-sonnet-5-5","id":"msg_011ChX7BjhgSKf1LKrHiYTuL","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01VZPZfvb7oB3nL7DoccBjVX","name":"Bash","input":{"command":"cat /work/ui/src/test-helpers/control-ui-e2e.mjs; grep -rn \"control-ui-e2e\\|artifacts\" /work --include=*.json --include=*.yml --include=*.yaml --include=*.md --include=.gitignore -l --exclude-dir=node_modules | head"},"caller":{"type":"direct"}}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":0,"cache_read_input_tokens":17849,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":0},"output_tokens":8,"service_tier":"standard","inference_geo":"global","speed":"standard"},"input_transformations":[],"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"713c00c0-459e-43b5-a8f9-997fc4e38990","timestamp":"2026-11-29T11:03:21.213Z","request_id":"req_011ChX7BjZk28hZhxjm34LsA"} {"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01VZPZfvb7oB3nL7DoccBjVX","type":"tool_result","content":"// Shared helpers for Control UI browser E2E capture.\n// The real browser driver is stubbed in this repo: \"screenshots\" and \"traces\"\n// are written as text/JSON files so the capture pipeline can be exercised.\nimport { mkdir, writeFile } from \"node:fs/promises\";\nimport { randomBytes } from \"node:crypto\";\nimport path from \"node:path\";\n\n/**\n * Shared parent for all Control UI E2E artifacts. Other jobs (visual review,\n * perf audits, nightly runs) write into this same parent.\n */\nexport function resolveControlUiE2eArtifactParent() {\n return path.resolve(\n process.env.CONTROL_UI_E2E_ARTIFACTS_DIR ?? \"artifacts/control-ui-e2e\",\n );\n}\n\n/**\n * Allocate a fresh, uniquely named artifact directory for one capture attempt\n * (or one standalone invocation). Never reuses an existing directory.\n *\n * @param {string} scope short label, e.g. a scenario name\n * @param {string} [parentDir] override the shared parent\n * @returns {Promise} absolute path of the new directory\n */\nexport async function createControlUiE2eArtifactDir(scope, parentDir) {\n const parent = path.resolve(parentDir ?? resolveControlUiE2eArtifactParent());\n const safe =\n String(scope ?? \"\")\n .replace(/[^a-zA-Z0-9._-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\") || \"run\";\n const stamp = new Date().toISOString().replace(/[:.]/g, \"-\");\n await mkdir(parent, { recursive: true });\n for (;;) {\n const dir = path.join(parent, `${safe}-${stamp}-${randomBytes(4).toString(\"hex\")}`);\n try {\n await mkdir(dir);\n return dir;\n } catch (err) {\n if (err.code !== \"EEXIST\") throw err;\n }\n }\n}\n\n/** Write a screenshot for a named stage into an artifact directory. */\nexport async function captureScreenshot(dir, stage, data) {\n const file = path.join(dir, `${stage}.screenshot.txt`);\n await writeFile(file, String(data ?? \"\"));\n return file;\n}\n\n/** Write a trace for a named stage into an artifact directory. */\nexport async function captureTrace(dir, stage, data) {\n const file = path.join(dir, `${stage}.trace.json`);\n await writeFile(file, typeof data === \"string\" ? data : JSON.stringify(data ?? {}));\n return file;\n}\n/work/docs/e2e-artifacts.md","is_error":false}]},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"2b414b29-ce19-4de8-bf4b-de8f99804136","timestamp":"2026-11-29T11:03:21.305Z","tool_use_result":{"stdout":"// Shared helpers for Control UI browser E2E capture.\n// The real browser driver is stubbed in this repo: \"screenshots\" and \"traces\"\n// are written as text/JSON files so the capture pipeline can be exercised.\nimport { mkdir, writeFile } from \"node:fs/promises\";\nimport { randomBytes } from \"node:crypto\";\nimport path from \"node:path\";\n\n/**\n * Shared parent for all Control UI E2E artifacts. Other jobs (visual review,\n * perf audits, nightly runs) write into this same parent.\n */\nexport function resolveControlUiE2eArtifactParent() {\n return path.resolve(\n process.env.CONTROL_UI_E2E_ARTIFACTS_DIR ?? \"artifacts/control-ui-e2e\",\n );\n}\n\n/**\n * Allocate a fresh, uniquely named artifact directory for one capture attempt\n * (or one standalone invocation). Never reuses an existing directory.\n *\n * @param {string} scope short label, e.g. a scenario name\n * @param {string} [parentDir] override the shared parent\n * @returns {Promise} absolute path of the new directory\n */\nexport async function createControlUiE2eArtifactDir(scope, parentDir) {\n const parent = path.resolve(parentDir ?? resolveControlUiE2eArtifactParent());\n const safe =\n String(scope ?? \"\")\n .replace(/[^a-zA-Z0-9._-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\") || \"run\";\n const stamp = new Date().toISOString().replace(/[:.]/g, \"-\");\n await mkdir(parent, { recursive: true });\n for (;;) {\n const dir = path.join(parent, `${safe}-${stamp}-${randomBytes(4).toString(\"hex\")}`);\n try {\n await mkdir(dir);\n return dir;\n } catch (err) {\n if (err.code !== \"EEXIST\") throw err;\n }\n }\n}\n\n/** Write a screenshot for a named stage into an artifact directory. */\nexport async function captureScreenshot(dir, stage, data) {\n const file = path.join(dir, `${stage}.screenshot.txt`);\n await writeFile(file, String(data ?? \"\"));\n return file;\n}\n\n/** Write a trace for a named stage into an artifact directory. */\nexport async function captureTrace(dir, stage, data) {\n const file = path.join(dir, `${stage}.trace.json`);\n await writeFile(file, typeof data === \"string\" ? data : JSON.stringify(data ?? {}));\n return file;\n}\n/work/docs/e2e-artifacts.md","stderr":"","interrupted":false,"isImage":false,"noOutputExpected":false},"tool_result_meta":[{"id":"toolu_01VZPZfvb7oB3nL7DoccBjVX","permission_decision":{"decision":"accept","source":"config","reason_type":"mode"}}]} {"type":"assistant","message":{"model":"claude-sonnet-5-5","id":"msg_011ChX7C67X3u4CEaGFuZJVJ","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01X5eRPLn7iVvERWUuBKRWKS","name":"Bash","input":{"command":"cat /work/docs/e2e-artifacts.md"},"caller":{"type":"direct"}}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":1442,"cache_read_input_tokens":17849,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":1442},"output_tokens":21,"service_tier":"standard","inference_geo":"global","speed":"standard"},"input_transformations":[],"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"2995867a-ed99-463b-a2a0-538aca1f656d","timestamp":"2026-11-29T11:03:22.477Z","request_id":"req_011ChX7C5xb3tu9F6FJgV7Pa"} {"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01X5eRPLn7iVvERWUuBKRWKS","type":"tool_result","content":"# Control UI E2E artifacts\n\nAll Control UI capture jobs (this capture script, visual reviews, interaction\nperf audits, nightly runs) write under one shared parent:\n`$CONTROL_UI_E2E_ARTIFACTS_DIR` (default `artifacts/control-ui-e2e`).\n\nUse `createControlUiE2eArtifactDir(scope, parentDir?)` from\n`ui/src/test-helpers/control-ui-e2e.mjs` to get a fresh directory, and pass it\nto `captureScreenshot` / `captureTrace`.","is_error":false}]},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"c01d5a77-f459-467b-9633-1fd60bfd9ad3","timestamp":"2026-11-29T11:03:22.491Z","tool_use_result":{"stdout":"# Control UI E2E artifacts\n\nAll Control UI capture jobs (this capture script, visual reviews, interaction\nperf audits, nightly runs) write under one shared parent:\n`$CONTROL_UI_E2E_ARTIFACTS_DIR` (default `artifacts/control-ui-e2e`).\n\nUse `createControlUiE2eArtifactDir(scope, parentDir?)` from\n`ui/src/test-helpers/control-ui-e2e.mjs` to get a fresh directory, and pass it\nto `captureScreenshot` / `captureTrace`.","stderr":"","interrupted":false,"isImage":false,"noOutputExpected":false},"tool_result_meta":[{"id":"toolu_01X5eRPLn7iVvERWUuBKRWKS","permission_decision":{"decision":"accept","source":"config","reason_type":"mode"}}]} {"type":"system","subtype":"thinking_tokens","estimated_tokens":50,"estimated_tokens_delta":50,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"dd22ae34-b6f9-495b-a96a-31b6664d63a9"} {"type":"system","subtype":"thinking_tokens","estimated_tokens":312,"estimated_tokens_delta":262,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"67ee46cc-5564-45b2-89b0-1b07dbc3d493"} {"type":"assistant","message":{"model":"claude-sonnet-5-5","id":"msg_011ChX7CB6eKQJyLWpEyi252","type":"message","role":"assistant","content":[{"type":"thinking","thinking":"","signature":"CAQS1gkKEAgUGAI4AUIIdGhpbmtpbmcSDACLj/qAe7UPKaK3pBoMw31FbYRXcL4hcKdKIjAvNq828/KCt1clVakps1AGBZKmcIz5OkV6/gf8Ad9ytnj0o3tNyfKfxPyPSC+6MOgq8wgBhqQmH4zMGetHYUFXFypBUcoFvr7M5SdFwF+uLYpEA3ufS3pqyJRrxWAoXHA/IYeR8K/I0I7hBwNGWQrw7N6rkYI5Htkavhdr8u8W9muoGkGPPwXiURURVsEeX3TtaxITcrpnOrp7u11UIuez5YGz9MYrN0lmIEWMwdBUSnLo/C+jIB0/IkJF8PakhYFD+pQ1Uirq2NtCEkwDYT7yd6Dr4KT+0kyUFgqoT6P8aAYI8saO1oMANOBgONHuQzYvSCCWlGuBBfbvnrD4RJ37rXNn5aXafeEW0OB/tN5xuTMEdLBldeOVHoFGuys42vnhrOeuDHNjwoXPSzwaDL9FgepPLG0J87hMHqb7JcoohFthPadzyNZlZ/QIKfWtwO07fXVErLE31vau+vzogdEbnIWCOgjHjHNYq2aRQB/a53X7koBuW7ccnWXQVu+RWe+RXPms78U43pifT0RDsUyTPAgSaFG80peL2Mo4Uql+J2QV7CAiePXQ9xh6XisTqGXiUOWM/kZPQ9sinZgD7BICbz7HiUuzE4ScChZYe5Yxh2mO8FxJdyYNs6wM8GQriPoQvBz9My7ttB9GCZHrPB5Fr9D2ncDAHvuuPqi9rEIGMjxRd5u/G9N+ChnLvIs+f/1J/xd/ZewU2/9cXac54nqvjA+WUrrkTX8hQozt9wSlqS0X5LFD915vOSHRgNLo0AhKQmGUkGWSJQ7XHf2sflcxDXQqcc4izjHfPMVy6m6VRHQS6Puclt9Ejp0kB2o5HXniQZCxk2R0Sdj25UchZhMU1TR4wSndAjzVCPm/RmHcBiIQqnHP9ld8N42AenKzn8G13asBiBWyf8r0uyFf4D9m+i6X5AM+EBG/GqzdfCkWWAVRm0RwdAquQoYbe2p9HKxGEyQ6sMywQRxpQrLf6s8lNx8MePSn55S7xNnxGikDOOoZfYOSyqYEdO6lh/RocA0BfNqeWdxe6l0Ss2ud7wFguySSVEmSr4OKBYt9SjtLiTuzVpv0OuW8qdH9O4Os4xdvBJ/Yztaj3O7IrY/z0hpTL+h/950NaaZPZv5hoimI6SNyDpTpf+XeuGNdLeznuLm7CY7p0FVHARupMXp/sXeM3e0nSC+s83i8f+STLaxvPc9msWmyLJptDlPL8eLm/yqguLbOY6q3nZnpSnefrvxVPH/ex5yBRWoigfsGpvELMooo3s27lnEeEtYY71aymppWRse/sXLBgfHnd6l1rhZ0/Ipw9zB8f3f2Hu4awU+z62njeDmh4xqz96x9saOlS/3jP1WYZO4SRzIb3kuOfNaNsqccehXdk12hLa8RzBYSHkzq9cI7fJOR6IdUtgk+afAT8PBoz1W3Cc0d1M+PY1JYP4qY9P5ox4Y1b2GzisaaAr8AUPBYz/ib3J4JpBVR5f+AePgqRYcsJ8YfzQ2Kmba4uw0OtJ2AtUkB3Ixau3dFq4hyNCcdTEXeXGPgDkQOOvfVWyO0AaTEtwcPUoBYBGBpfmFN3RR41e53D+ZUiMXe9b4JieRV4xgB"}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":287,"cache_read_input_tokens":19291,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":287},"output_tokens":8,"service_tier":"standard","inference_geo":"global","speed":"standard"},"input_transformations":[],"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"d01f9396-5965-43cf-be60-22f98f5499d8","timestamp":"2026-11-29T11:03:24.843Z","request_id":"req_011ChX7CAxidBgY4U47RxYxL","thinking_duration_ms":1386,"thinking_display":"updates"} {"type":"assistant","message":{"model":"claude-sonnet-5-5","id":"msg_011ChX7CB6eKQJyLWpEyi252","type":"message","role":"assistant","content":[{"type":"tool_use","id":"toolu_01U59omLU3Fb1YeLuCUxCgZP","name":"Bash","input":{"command":"cd /work/scripts && python3 - <<'E'\np='capture-control-ui.mjs'\ns=open(p).read()\ns=s.replace('import { rm, mkdir, writeFile }','import { writeFile }')\ns=s.replace('''import {\n captureScreenshot,''','''import {\n createControlUiE2eArtifactDir,\n captureScreenshot,''')\ns=s.replace(''' // Start from a clean slate so stale screenshots don't confuse reviewers.\n await rm(artifactsRoot, { recursive: true, force: true });\n await mkdir(artifactsRoot, { recursive: true });\n\n''',''' // The root is shared with other jobs and earlier runs; never delete from it.\n // Every attempt gets its own fresh, uniquely named directory instead.\n''')\ns=s.replace(''' const outDir = path.join(artifactsRoot, scenario.name);\n let passed''',''' let outDir;\n const attemptDirs = [];\n let passed''')\ns=s.replace(''' // Reset the scenario folder before each attempt.\n await rm(outDir, { recursive: true, force: true });\n await mkdir(outDir, { recursive: true });\n''',''' outDir = await createControlUiE2eArtifactDir(scenario.name, artifactsRoot);\n attemptDirs.push(outDir);\n''')\ns=s.replace(''' dir: outDir,\n attempts,''',''' dir: outDir,\n attemptDirs,\n attempts,''')\ns=s.replace(''' await writeFile(\n path.join(artifactsRoot, \"report.json\"),''',''' const reportDir = await createControlUiE2eArtifactDir(\"capture-report\", artifactsRoot);\n await writeFile(\n path.join(reportDir, \"report.json\"),''')\nopen(p,'w').write(s)\nE\ncat >> capture-control-ui.test.mjs <<'E'\n\ntest(\"does not delete artifacts from earlier runs or failed attempts\", async () => {\n const root = await mkdtemp(path.join(os.tmpdir(), \"capture-test-\"));\n const old = path.join(root, \"chat-send\");\n await mkdir(old);\n await writeFile(path.join(old, \"final.screenshot.txt\"), \"yesterday\");\n const scenarios = [\n {\n name: \"chat-send\",\n run: async ({ attempt }) => {\n if (attempt === 1) throw Object.assign(new Error(\"boom\"), { screenshot: \"bad\" });\n return { screenshot: \"shot\", trace: {} };\n },\n },\n ];\n const [a] = await runCapture({ scenarios, artifactsRoot: root, log: () => {} });\n const [b] = await runCapture({ scenarios, artifactsRoot: root, log: () => {} });\n assert.equal(await readFile(path.join(old, \"final.screenshot.txt\"), \"utf8\"), \"yesterday\");\n assert.equal(a.attemptDirs.length, 2);\n assert.notEqual(a.dir, b.dir);\n for (const d of [...a.attemptDirs, ...b.attemptDirs]) assert.ok((await readdir(d)).length > 0);\n});\nE\nsed -i 's#import { mkdtemp, readdir }#import { mkdtemp, mkdir, readdir, readFile, writeFile }#' capture-control-ui.test.mjs\ncd /work && node --test scripts/capture-control-ui.test.mjs 2>&1 | tail -15"},"caller":{"type":"direct"}}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":287,"cache_read_input_tokens":19291,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":287},"output_tokens":8,"service_tier":"standard","inference_geo":"global","speed":"standard"},"input_transformations":[],"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"bd0672f1-fb88-48b1-b38b-726dc6cd568b","timestamp":"2026-11-29T11:03:30.655Z","request_id":"req_011ChX7CAxidBgY4U47RxYxL"} {"type":"user","message":{"role":"user","content":[{"tool_use_id":"toolu_01U59omLU3Fb1YeLuCUxCgZP","type":"tool_result","content":"# Subtest: does not delete artifacts from earlier runs or failed attempts\nok 2 - does not delete artifacts from earlier runs or failed attempts\n ---\n duration_ms: 5.205667\n type: 'test'\n ...\n1..2\n# tests 2\n# suites 0\n# pass 2\n# fail 0\n# cancelled 0\n# skipped 0\n# todo 0\n# duration_ms 45.040625","is_error":false}]},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"202a6eff-caff-4b2e-84c8-24b0aa0377c9","timestamp":"2026-11-29T11:03:30.765Z","tool_use_result":{"stdout":"# Subtest: does not delete artifacts from earlier runs or failed attempts\nok 2 - does not delete artifacts from earlier runs or failed attempts\n ---\n duration_ms: 5.205667\n type: 'test'\n ...\n1..2\n# tests 2\n# suites 0\n# pass 2\n# fail 0\n# cancelled 0\n# skipped 0\n# todo 0\n# duration_ms 45.040625","stderr":"","interrupted":false,"isImage":false,"noOutputExpected":false},"tool_result_meta":[{"id":"toolu_01U59omLU3Fb1YeLuCUxCgZP","permission_decision":{"decision":"accept","source":"config","reason_type":"mode"}}]} {"type":"assistant","message":{"model":"claude-sonnet-5-5","id":"msg_011ChX7CnYMjjLvKx8Z43wub","type":"message","role":"assistant","content":[{"type":"text","text":"A capture run no longer deletes anything. Both tests in `scripts/capture-control-ui.test.mjs` pass, including a new one that checks old artifacts survive.\n\n**What was wrong:** `runCapture` ran `rm -rf` on the whole artifacts root at the start of every run. That root is shared with other jobs (visual review, perf audits, nightly runs), so those were being wiped too. It also deleted the scenario folder before each retry, so a failed attempt's screenshot was lost as soon as the next attempt began.\n\n**What changed in `scripts/capture-control-ui.mjs`:**\n- The upfront wipe and the per-attempt `rm` are gone.\n- Each attempt now gets its own new directory from the existing `createControlUiE2eArtifactDir` helper. The directory is named `--` and sits directly under the artifacts root. The default root is `artifacts/control-ui-e2e`, or `$CONTROL_UI_E2E_ARTIFACTS_DIR` if set. This follows `docs/e2e-artifacts.md`.\n- `report.json` is written to its own `capture-report--/` directory, so reports from different runs don't overwrite each other.\n- `runCapture` takes the same options and returns the same `name`, `passed` and `dir`.\n- `dir` is now the last attempt's directory, which holds `final.*` if it passed or `failure.screenshot.txt` if it failed.\n- I added an `attemptDirs` field listing every attempt's directory, so failed first attempts stay inspectable.\n\n**Behaviour change:** artifacts from different runs now sit side by side in a flat folder and are told apart by timestamp. Nothing prunes old runs, so the folder will grow until someone cleans it up on purpose.\n\n**Tests:** the new test seeds a file from an earlier run, then runs a scenario that fails once and passes on retry, twice in a row. It checks that the old file is untouched, that every attempt directory is separate and non-empty, and that the two runs' directories differ."}],"container":null,"stop_reason":null,"stop_sequence":null,"stop_details":null,"usage":{"input_tokens":2,"cache_creation_input_tokens":1567,"cache_read_input_tokens":19578,"cache_creation":{"ephemeral_5m_input_tokens":0,"ephemeral_1h_input_tokens":1567},"output_tokens":698,"service_tier":"standard","inference_geo":"global","speed":"standard"},"input_transformations":[],"diagnostics":null,"context_management":null},"parent_tool_use_id":null,"session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","uuid":"273c2315-1dd9-4240-8070-4c1eeeda88a3","timestamp":"2026-11-29T11:03:36.587Z","request_id":"req_011ChX7CnPSH7cnrnAEM1LA3"} {"duration_api_ms":21367,"stop_reason":"end_turn","session_id":"eb4ab495-f843-4876-ba45-9a72ce13fe8a","total_cost_usd":0.0501544,"usage":{"input_tokens":10,"cache_creation_input_tokens":3296,"cache_read_input_tokens":90304,"output_tokens":2792,"output_tokens_details":{"thinking_tokens":518},"server_tool_use":{"web_search_requests":0,"web_fetch_requests":0},"service_tier":"standard","cache_creation":{"ephemeral_1h_input_tokens":3296,"ephemeral_5m_input_tokens":0},"inference_geo":"global","iterations":[],"speed":"standard","fallback_credit":null},"modelUsage":{"claude-sonnet-5-5":{"inputTokens":10,"outputTokens":2792,"cacheReadInputTokens":90304,"cacheCreationInputTokens":3296,"webSearchRequests":0,"costUSD":0.0501544,"contextWindow":1000000,"maxOutputTokens":128000,"thinkingTokens":518,"canonicalModel":"claude-sonnet-5-5","provider":"firstParty","costBasis":"list"}},"permission_denials":[],"terminal_reason":"completed","fast_mode_state":"off","fast_mode_disabled_reason":"sdk_opt_in_required","subagent_stats":{"spawned":0,"requested":{"background":0,"foreground":0,"unset":0},"started_in_background":0,"max_depth":0,"spawned_by_subagents":0,"completed":0,"failed":0,"killed":{"parent":0,"user":0,"system":0},"refused":{"depth_limit":0,"concurrency_limit":0,"budget":0},"by_type":{}},"safety_stops":0,"is_error":false,"num_turns":6,"subtype":"success","api_error_status":null,"result":"A capture run no longer deletes anything. Both tests in `scripts/capture-control-ui.test.mjs` pass, including a new one that checks old artifacts survive.\n\n**What was wrong:** `runCapture` ran `rm -rf` on the whole artifacts root at the start of every run. That root is shared with other jobs (visual review, perf audits, nightly runs), so those were being wiped too. It also deleted the scenario folder before each retry, so a failed attempt's screenshot was lost as soon as the next attempt began.\n\n**What changed in `scripts/capture-control-ui.mjs`:**\n- The upfront wipe and the per-attempt `rm` are gone.\n- Each attempt now gets its own new directory from the existing `createControlUiE2eArtifactDir` helper. The directory is named `--` and sits directly under the artifacts root. The default root is `artifacts/control-ui-e2e`, or `$CONTROL_UI_E2E_ARTIFACTS_DIR` if set. This follows `docs/e2e-artifacts.md`.\n- `report.json` is written to its own `capture-report--/` directory, so reports from different runs don't overwrite each other.\n- `runCapture` takes the same options and returns the same `name`, `passed` and `dir`.\n- `dir` is now the last attempt's directory, which holds `final.*` if it passed or `failure.screenshot.txt` if it failed.\n- I added an `attemptDirs` field listing every attempt's directory, so failed first attempts stay inspectable.\n\n**Behaviour change:** artifacts from different runs now sit side by side in a flat folder and are told apart by timestamp. Nothing prunes old runs, so the folder will grow until someone cleans it up on purpose.\n\n**Tests:** the new test seeds a file from an earlier run, then runs a scenario that fails once and passes on retry, twice in a row. It checks that the old file is untouched, that every attempt directory is separate and non-empty, and that the two runs' directories differ.","ttft_ms":1515,"type":"result","duration_ms":21835,"uuid":"a552e111-4340-41c9-a7c8-a087618d97dd","ttft_stream_ms":1250,"time_to_request_ms":261,"first_content_frame_ms":1251,"queued_turn_count":0,"result_index":0}