graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
Merge origin/release/v0.0.300 into local desktop WIP
justrachb4c481d40b97
diff --cc apps/native/app/globals.cssindex a89f229d,2c483a2c..c79556dc--- a/apps/native/app/globals.css+++ b/apps/native/app/globals.css@@@ -64,16 -64,14 +64,16 @@@--shadow-overlay: var(--shadow-overlay);/* type */- --font-sans: var(--font-inter), ui-sans-serif, system-ui, sans-serif;- --font-mono: var(--font-mono-face), ui-monospace, "SF Mono", monospace;+ --font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;+ --font-mono: var(--font-geist-mono), ui-monospace, "SF Mono", monospace;- /* radii — chips 6, controls 8, cards 10, windows 14, pills 999 */- --radius-chip: 6px;- --radius-control: 8px;- --radius-card: 10px;- --radius-window: 14px;+ /* radii — see docs/design.md. chips 8, controls 12, cards 16,+ * windows 24, composer 32, pills 999 */+ --radius-chip: 8px;+ --radius-control: 12px;+ --radius-card: 16px;+ --radius-window: 24px;+ --radius-composer: 32px;/* easing — strong curves; built-ins are too weak */--ease-out-strong: cubic-bezier(0.23, 1, 0.32, 1);diff --cc apps/native/components/site/SessionNotice.tsxindex 0fa3d973,6e51ff0d..3edfc11e--- a/apps/native/components/site/SessionNotice.tsx+++ b/apps/native/components/site/SessionNotice.tsx@@@ -1,7 -1,9 +1,9 @@@+ import motion from "./transcript-motion.module.css";+/** Engine-generated context has its own identity, even when its wire role is user. */export default function SessionNotice({ text }: { text: string }) {- return <details data-session-notice className="min-w-0 rounded-lg border border-line px-3 py-2 text-[12.5px] leading-relaxed text-ink-2">+ return <details data-session-notice className="min-w-0 rounded-control border border-line px-3 py-2 text-[12.5px] leading-relaxed text-ink-2"><summary className="cursor-pointer select-none">Session notification</summary>- <p className="mt-2 whitespace-pre-wrap [overflow-wrap:anywhere]">{text}</p>+ <p className={`${motion.reveal} mt-2 whitespace-pre-wrap [overflow-wrap:anywhere]`}>{text}</p></details>;}diff --cc apps/native/electron/main.cjsindex b4af242a,1e783d78..a2921878--- a/apps/native/electron/main.cjs+++ b/apps/native/electron/main.cjs@@@ -18,14 -18,11 +18,15 @@@ const { chromiumSample } = require('./hconst fs = require('node:fs/promises');const { Terminals } = require('./terminal.cjs');const { installWindowState } = require('./window-state.cjs');+const { createNotch, notchStore } = require('./notch.cjs');++const { pollCodexUsage } = require('./notch-usage.cjs');const root = process.env.GRAFF_CWD || app.getPath('home');const resources = process.env.GRAFF_ELECTRON_RESOURCES || process.resourcesPath;-app.setName('Codegraff');-app.setPath('userData', process.env.GRAFF_ELECTRON_PROFILE || (process.env.GRAFF_ELECTRON_SMOKE ? (process.env.GRAFF_SMOKE_PROFILE || path.join(require('node:os').tmpdir(), `codegraff-smoke-${process.pid}`)) : path.join(app.getPath('appData'), 'Codegraff Electron')));+const developmentBuild = require('node:fs').existsSync(path.join(resources, 'codegraff-development'));+const appName = developmentBuild ? 'Codegraff Dev' : 'Codegraff';+app.setName(appName);- app.setPath('userData', process.env.GRAFF_ELECTRON_SMOKE ? (process.env.GRAFF_SMOKE_PROFILE || path.join(require('node:os').tmpdir(), `codegraff-smoke-${process.pid}`)) : path.join(app.getPath('appData'), developmentBuild ? 'Codegraff Dev' : 'Codegraff Electron'));++app.setPath('userData', process.env.GRAFF_ELECTRON_PROFILE || (process.env.GRAFF_ELECTRON_SMOKE ? (process.env.GRAFF_SMOKE_PROFILE || path.join(require('node:os').tmpdir(), `codegraff-smoke-${process.pid}`)) : path.join(app.getPath('appData'), developmentBuild ? 'Codegraff Dev' : 'Codegraff Electron')));if (process.env.GRAFF_ELECTRON_SMOKE) process.env.GRAFF_THEMES_DIR = path.join(app.getPath('userData'), 'themes');let win, browser, backend, automation, computer, profiler;let terminals;@@@ -55,35 -51,40 +55,49 @@@ function trusted(event)if (event.sender !== win?.webContents || event.senderFrame !== win.webContents.mainFrame ||new URL(event.senderFrame.url).origin !== backend.origin) throw new Error('Untrusted IPC sender');}+let notch;+ let stopPromise;function stop() {- if (quitting) return; quitting = true;- let unsafe = false;- try { testDesktop?.assertSafe(); } catch (error) { console.error(error); unsafe = true; }- notch?.hide();- terminals?.closeAll();- profiler?.stop(); browser?.closeAll(); automation?.server.close(); backend?.stop();- testDesktop?.cleanup();- if (unsafe) app.exit(1);+ if (stopPromise) return stopPromise;+ return stopPromise = (async () => {+ let unsafe = false;+ try { testDesktop?.assertSafe(); } catch (error) { console.error(error); unsafe = true; }++ notch?.hide();+ terminals?.closeAll();+ profiler?.stop(); browser?.closeAll(); automation?.server.close(); await backend?.stop();+ testDesktop?.cleanup();+ if (unsafe) app.exit(1);+ })();}- app.on('before-quit', stop);+ let stopped = false;+ app.on('before-quit', event => {+ if (stopped) return;+ event.preventDefault();+ void stop().finally(() => { stopped = true; app.quit(); });+ });app.on('window-all-closed', () => app.quit());process.on('SIGTERM', () => app.quit());process.on('SIGINT', () => app.quit());app.whenReady().then(async () => {+ if (app.isPackaged && !developmentBuild && !process.env.GRAFF_ELECTRON_SMOKE) {+ void require('./mcp-install.cjs').installMcp(path.join(resources, 'graff'), app.getPath('home'), { once: true })+ .catch(error => dialog.showErrorBox('MCP setup incomplete', `${error.message}\nRetry from Tools → Configure MCP clients.`));+ }await require('./shell-path.cjs').restoreShellPath();+ if (app.isPackaged && !process.env.GRAFF_ELECTRON_SMOKE) {+ void require('./engine-launcher.cjs').installEngine(path.join(resources, 'graff'), app.getPath('home'))+ .then(() => require('./mcp-install.cjs').installMcp(path.join(resources, 'graff'), app.getPath('home'), { once: true, version: app.getVersion() }))+ .catch(error => dialog.showErrorBox('Command setup incomplete', `${error.message}\nRetry from Tools → Install codegraff terminal command.`));+ }app.setAccessibilitySupportEnabled(true);+ const passkeysConfigured = require('./webauthn.cjs').configureWebAuthn(app, resources);const token = randomBytes(32).toString('hex');+ const liveGlass = process.platform === 'darwin' && !testDesktop;+ let glassOn = false;win = createWindow({ width: 1440, height: 920, minWidth: 900, minHeight: 600,- title: 'Codegraff', titleBarStyle: 'hiddenInset', trafficLightPosition: { x: 14, y: 11 }, backgroundColor: '#fafaf9', show: false,+ title: appName, titleBarStyle: 'hiddenInset', trafficLightPosition: { x: 14, y: 11 },+ transparent: liveGlass, backgroundColor: liveGlass ? '#00000000' : '#fafaf9', show: false,webPreferences: { preload: path.join(__dirname, 'preload.cjs'), partition: 'persist:app',contextIsolation: true, sandbox: true, nodeIntegration: false, backgroundThrottling: !process.env.GRAFF_ELECTRON_SMOKE } });const projects = require('./project-store.cjs').projectStore(app.getPath('userData'));@@@ -98,33 -99,6 +112,40 @@@if (mainFrame && !inPlace) { workspaceRequests.loading(); browser.closeAll(); terminals.closeAll(); }});computer = new ComputerUse(resources, win);+ if (process.platform === 'darwin') {+ try {+ const native = require(path.join(resources, 'native/activity.node'));+ notch = createNotch({+ native: {+ updateNotch: json => native.updateNotch(json),+ hideNotch: () => native.hideNotch(),+ inspectNotch: () => native.inspectNotch(),+ },+ store: notchStore(app.getPath('userData')),+ allow: !testDesktop,+ activate: id => {+ if (!win || win.isDestroyed()) return;+ if (win.isMinimized()) win.restore();+ win.show();+ win.focus();+ if (id > 0) win.webContents.send('notch-select', id);+ },+ });+ if (typeof native.onNotchClick === 'function') native.onNotchClick(id => notch.clicked(Number(id)));++ if (notch && !testDesktop) {++ const tick = () => {++ pollCodexUsage().then(cells => notch.setExtra(cells)).catch(() => notch.setExtra([]));++ };++ tick();++ setInterval(tick, 60_000);++ }+ } catch { /* unpackaged trees without the dylib keep the React app only */ }+ }+ ipcMain.on('notch', (event, snapshot) => {+ trusted(event);+ if (!snapshot || typeof snapshot !== 'object' || JSON.stringify(snapshot).length > 16000) return;+ notch?.update(snapshot);+ });const sampleTree = intervalSampler(process.pid, () => browser.liveCount);const sampleAgents = agentSampler();profiler = new Profiler(async () => {@@@ -205,21 -176,24 +226,24 @@@{ label: 'File', submenu: [['New chat', 'CmdOrCtrl+N', 'new'], ['New tab', 'CmdOrCtrl+T', 'new'],['Close chat', 'CmdOrCtrl+W', 'close'], ['Reopen closed chat', 'CmdOrCtrl+Shift+T', 'reopen'],- ['Toggle terminal', 'CmdOrCtrl+J', 'terminal'], ['Open workspace…', 'CmdOrCtrl+O', 'workspace'], ['Split right', 'CmdOrCtrl+D', 'split-right'],+ ['Toggle terminal', 'CmdOrCtrl+J', 'terminal'], ['Focus prompt', 'CmdOrCtrl+L', 'focus-prompt'], ['Open workspace…', 'CmdOrCtrl+O', 'workspace'], ['Split right', 'CmdOrCtrl+D', 'split-right'],['Split down', 'CmdOrCtrl+Shift+D', 'split-down'], ['Zoom split', 'CmdOrCtrl+Shift+Enter', 'split-zoom'],].map(([label, accelerator, action]) => ({ label, accelerator, click: () => win.webContents.send('desktop-action', action) })) },- { label: 'Tools', submenu: [{ label: 'Configure MCP clients…', enabled: app.isPackaged, click: async () => {+ { label: 'Tools', submenu: [{ label: 'Configure MCP clients…', enabled: app.isPackaged && !developmentBuild, click: async () => {try {const detail = await require('./mcp-install.cjs').installMcp(path.join(resources, 'graff'), app.getPath('home'));await dialog.showMessageBox(win, { message: 'MCP clients configured', detail });} catch (error) { dialog.showErrorBox('MCP setup', error.message); }- } }, { label: 'Install codegraff terminal command…', enabled: app.isPackaged && !developmentBuild && process.platform === 'darwin', click: async () => {+ } }, { label: 'Install codegraff terminal command…', enabled: app.isPackaged && process.platform === 'darwin', click: async () => {try {+ await require('./engine-launcher.cjs').installEngine(path.join(resources, 'graff'), app.getPath('home'));const installed = await require('./cli-launcher.cjs').installLauncher(path.resolve(app.getPath('exe'), '../../..'), app.getPath('home'));- await dialog.showMessageBox(win, { message: 'Terminal command installed', detail: `Run codegraff . to open a project here. Ensure ${path.dirname(installed)} is on your PATH.` });+ await dialog.showMessageBox(win, { message: 'Terminal command installed', detail: `Run graff for the CLI or codegraff . for the GUI. Open a new terminal to load the PATH update (${path.dirname(installed)}).` });} catch (error) { dialog.showErrorBox('Terminal command', error.message); }- } }] },+ } }, { label: 'Browser passkey help…', click: () => void require('./webauthn.cjs').showPasskeyHelp({+ window: win, browser, dialog, shell: require('electron').shell, configured: passkeysConfigured,+ }).catch(() => dialog.showErrorBox('Browser passkeys', 'Could not open the default browser. Use another sign-in method on the site.')) }] },- { role: 'editMenu' }, { label: 'View', submenu: [{ role: 'reload' }, { role: 'toggleDevTools' }, { role: 'togglefullscreen' }, { label: 'Release browser pages', click: () => { browser.closeAll(); win.webContents.send('browser-event', { type: 'released' }); } }] },+ { role: 'editMenu' }, { label: 'View', submenu: [{ role: 'reload' }, { role: 'toggleDevTools' }, { role: 'togglefullscreen' }, { label: 'Session observer', type: 'checkbox', checked: !!notch?.enabled(), visible: process.platform === 'darwin', click: item => { item.checked = notch?.setEnabled(item.checked) ?? false; } }, { label: 'Release browser pages', click: () => { browser.closeAll(); win.webContents.send('browser-event', { type: 'released' }); } }] },{ label: 'Performance', submenu: [{ label: 'Start recording', click: () => void profiler.start() },{ label: 'Mark candidate phase', click: () => profiler.mark('candidate') },@@@ -233,16 -207,7 +257,16 @@@{ role: 'windowMenu' },]));await win.loadURL(backend.origin); win.setWindowButtonVisibility(true);+ if (process.platform === 'darwin') {+ try {+ const native = require(path.join(resources, 'native/activity.node'));+ if (native.glass(win.getNativeWindowHandle()) >= 0 && liveGlass) {+ glassOn = true;+ win.webContents.send('native-glass', true);+ }+ } catch { /* dev trees without the compiled dylib keep the CSS frost */ }+ }if (testDesktop) testDesktop.present(win); else win.show();profiler.record('ui-ready');- if (process.env.GRAFF_ELECTRON_SMOKE) require(process.env.GRAFF_SMOKE_LAUNCH_ONLY ? './smoke-launch.cjs' : './smoke.cjs').run({ win, browser, automation, backend, metrics, activity, computer, profiler, token }).then(() => app.quit()).catch(error => { console.error(error); stop(); app.exit(1); });- }).catch(error => { console.error(error); stop(); app.exit(1); });+ if (process.env.GRAFF_ELECTRON_SMOKE) require(process.env.GRAFF_SMOKE_SERVER_LIFECYCLE ? './smoke-server-lifecycle.cjs' : process.env.GRAFF_SMOKE_LAUNCH_ONLY ? './smoke-launch.cjs' : './smoke.cjs').run({ win, browser, automation, backend, metrics, activity, computer, profiler, token }).then(() => app.quit()).catch(async error => { console.error(error); await stop(); app.exit(1); });+ }).catch(async error => { console.error(error); await stop(); app.exit(1); });diff --cc apps/native/package.jsonindex cef74afd,f6cc27ff..7116ba12--- a/apps/native/package.json+++ b/apps/native/package.json@@@ -10,10 -10,12 +10,12 @@@"start": "NEXT_TELEMETRY_DISABLED=1 next start --port 3000","mock-serve": "node scripts/mock-serve.mjs","lint": "next lint",- "test": "node --experimental-strip-types --test lib/cite-markup.test.ts lib/graff-events.test.ts lib/acp.test.ts lib/sessions.test.ts lib/session-store.test.ts lib/follow-scroll.test.ts lib/prompt-queue.test.ts lib/prompt-queue-steer.test.ts lib/prompt-queue-resume.test.ts lib/agents.test.ts lib/mermaid-plugin.test.ts lib/prompt-history.test.ts lib/attachments.test.ts lib/workspaces.test.ts lib/fuzzy.test.ts lib/folder-picker.test.ts lib/browser/annotations.test.ts lib/browser/url.test.ts components/site/harness-split.test.ts",+ "test": "node --experimental-strip-types --test lib/cite-markup.test.ts lib/graff-events.test.ts lib/acp.test.ts lib/sessions.test.ts lib/session-store.test.ts lib/follow-scroll.test.ts lib/prompt-queue.test.ts lib/prompt-queue-steer.test.ts lib/prompt-queue-resume.test.ts lib/agents.test.ts lib/mermaid-plugin.test.ts lib/prompt-history.test.ts lib/attachments.test.ts lib/workspaces.test.ts lib/fuzzy.test.ts lib/folder-picker.test.ts lib/browser/annotations.test.ts lib/browser/url.test.ts lib/extension-bridge.test.ts components/site/harness-split.test.ts components/site/appearance-panel.test.ts","electron:build": "bash electron/build.sh","test:electron": "bun test electron/policy.test.cjs",+ "test:webauthn": "node scripts/test-webauthn.mjs","test:desktop": "bun test lib ./electron/*.test.cjs",+ "test:session-navigation": "GRAFF_VISUAL_SUITE=session-navigation bun scripts/test-visual.mjs","test:tab-drag": "GRAFF_VISUAL_SUITE=tab-drag bun scripts/test-visual.mjs","test:turns": "GRAFF_VISUAL_SUITE=turns bun scripts/test-visual.mjs","test:visual": "bun scripts/test-visual.mjs",diff --cc scripts/eval-tier2.pyindex 16daa751,6e969124..7364dba0--- a/scripts/eval-tier2.py+++ b/scripts/eval-tier2.py@@@ -116,18 -126,8 +126,18 @@@ class Rundef execute(case: dict[str, Any], graff: str, port: int,- provider: str | None, model: str | None) -> Run:+ provider: str | None, model: str | None, evidence_dir: pathlib.Path | None = None) -> Run:scripted = ScriptedModel(case.get("script", []))+ if case.get("feedback_scenario"):+ if provider:+ raise ValueError("feedback lifecycle fixtures require the scripted model")+ from subagent_feedback_model import FeedbackModel+ scripted = FeedbackModel(case["feedback_scenario"], load_tools=case.get("feedback_load_tools", False))+ if "routing_reverse" in case:+ if provider:+ raise ValueError("routing isolation fixtures require the scripted model")+ from subagent_routing_model import RoutingModel+ scripted = RoutingModel(reverse=case["routing_reverse"])bound = 0 if provider else scripted.start(port)peer = Nonetry:diff --cc src/agent.zigindex 761017bf,c7d41aea..be78b8f0--- a/src/agent.zig+++ b/src/agent.zig@@@ -393,12 -396,9 +398,12 @@@ pub const Agent = structconst done = try @import("agent_steps.zig").stepForWire(self, root);if (done) |final_text| {// Retry empty replies; reconcile plain finals with live work (#745).- if (try empty_completion.handle(self, final_text, hist_len)) continue;+ if (try bounced_answer.retry(self, final_text, hist_len)) continue;if (try @import("named_work.zig").handle(self, final_text)) continue;- if (try pending_work.finish(self, final_text)) |text| {- if (try pending_work.finish(self, bounced_answer.finish(self, final_text))) |text| return review_deadline.finish(text);++ if (try pending_work.finish(self, bounced_answer.finish(self, final_text))) |text| {+ if (self.feedback) |inbox| if (!inbox.tryFinish(self.io)) continue;- return text;++ return review_deadline.finish(text);+ }continue;}self.empty_completion_retries = 0;diff --cc src/agent_argstream.zigindex c443a0aa,be0a7b2d..3e499457--- a/src/agent_argstream.zig+++ b/src/agent_argstream.zig@@@ -46,10 -46,9 +46,11 @@@ fn toolCtx(self: *Agent) tools_mod.Tool.provider = self.provider,.subagent_provider = self.subagent_provider,.subagent_cross_provider = self.subagent_cross_provider,+ .mcp_context = self.mcp_context.value,.registry = if (self.sub) null else self.registry,.from_sub = self.sub,+ .interactive_children = !self.sub and @import("subagent_interactive.zig").enabled.load(.acquire),+ .session_name = self.session_name,.has_eval = self.eval_cmd != null,.approvals = self.approvals,.tracer = self.tracer,diff --cc src/agent_tools.zigindex a0a8f079,7dc13b9b..95b688cd--- a/src/agent_tools.zig+++ b/src/agent_tools.zig@@@ -137,10 -137,9 +137,11 @@@ pub fn runTools(self: *Agent, calls: [].provider = self.provider,.subagent_provider = self.subagent_provider,.subagent_cross_provider = self.subagent_cross_provider,+ .mcp_context = self.mcp_context.value,.registry = self.registry, // workers get licensed codedb-pro reads too (#627).from_sub = self.sub,+ .interactive_children = !self.sub and @import("subagent_interactive.zig").enabled.load(.acquire),+ .session_name = self.session_name,.has_eval = self.eval_cmd != null,.approvals = self.approvals,.tracer = self.tracer,diff --cc src/command_catalog.zigindex 6092e522,b67d35ef..e52d5343--- a/src/command_catalog.zig+++ b/src/command_catalog.zig@@@ -37,8 -37,8 +37,9 @@@ pub const commands = [_]Item.{ .name = "/new", .desc = "start a fresh autosaved session" },.{ .name = "/rename", .usage = "/rename <title>", .desc = "set the current session title" },.{ .name = "/goal", .usage = "/goal [30m] [text|pause|resume|status|clear]", .desc = "set a standing objective and work it autonomously; an optional 30s/30m/2h budget paces the run; pause/resume steering, status shows state, clear removes it" },+ .{ .name = "/pr-acceptance", .usage = "/pr-acceptance [verified|draft]", .desc = "choose whether this conversation and goal requires verified PR checks or permits an unverified draft handoff" },.{ .name = "/loop", .usage = "/loop [30m] <prompt>", .desc = "the same autonomous run as /goal, without adopting a standing objective" },+ .{ .name = "/goals", .desc = "show the current goal without changing it (alias for /goal status)" },.{ .name = "/schedule", .usage = "/schedule <30s|5m|2h> <prompt>", .desc = "fire a prompt later; delay tokens match /loop (not a standing goal)" },.{ .name = "/adapter", .usage = "/adapter send <text>|inbox", .desc = "channel-worker outbox / inbox (JSONL protocol; Discord/Slack fronts later)" },.{ .name = "/review", .usage = "/review <target or instructions>", .desc = "run one isolated read-only review pass; no edits, delegation, or workflows" },diff --cc src/help.zigindex 1d876fcc,de3537cd..5cdc99ac--- a/src/help.zig+++ b/src/help.zig@@@ -28,9 -28,9 +28,9 @@@ const peers_blurb;pub const sections = [_]Section{- .{ .title = "getting around", .names = &.{ "/new", "/clear", "/resume", "/save", "/sessions", "/workspace", "/experiment", "/rename", "/rewind", "/snapshot", "/teleport" } },+ .{ .title = "getting around", .names = &.{ "/new", "/clear", "/resume", "/save", "/sessions", "/workspace", "/experiment", "/rename", "/rewind", "/edit", "/snapshot", "/teleport" } },.{ .title = "the model", .names = &.{ "/model", "/models", "/effort", "/reasoning", "/fast", "/thinking", "/keepcontext", "/fallback", "/routes" } },- .{ .title = "working autonomously", .names = &.{ "/goal", "/goals", "/loop", "/schedule", "/review", "/plan", "/todo", "/jobs", "/ultracode", "/strict", "/yolo", "/never" } },- .{ .title = "working autonomously", .names = &.{ "/goal", "/pr-acceptance", "/loop", "/schedule", "/review", "/issue", "/plan", "/todo", "/jobs", "/ultracode", "/strict", "/yolo", "/never" } },++ .{ .title = "working autonomously", .names = &.{ "/goal", "/goals", "/pr-acceptance", "/loop", "/schedule", "/review", "/issue", "/plan", "/todo", "/jobs", "/ultracode", "/strict", "/yolo", "/never" } },.{ .title = "talking to other graffs", .names = &.{ "/tell", "/peek", "/adapter" }, .blurb = peers_blurb },.{ .title = "your setup", .names = &.{ "/login", "/key", "/cost", "/usage", "/version", "/update", "/privacy", "/mcp", "/import-claude", "/skills", "/plugins", "/agents", "/hooks", "/tools", "/fleet" } },.{ .title = "context & history", .names = &.{ "/compact", "/btw", "/doctor", "/debug", "/cache", "/trace", "/trajectory" } },diff --cc src/tools.zigindex c9c20e1f,a8cb88c5..094782fc--- a/src/tools.zig+++ b/src/tools.zig@@@ -102,10 -102,8 +102,11 @@@ pub const ToolCtx = structprovider: Provider,subagent_provider: ?Provider = null,subagent_cross_provider: bool = false,+ subagent_feedback: ?*@import("subagent_feedback.zig").Inbox = null,+ interactive_children: bool = false,+ session_name: []const u8 = "",registry: ?*mcp.Registry,+ mcp_context: ?@import("mcp_turn_context.zig").Snapshot = null,from_sub: bool,has_eval: bool = false, // the root's --eval loop: escalation's strongest verifierapprovals: ?*Approvals,diff --cc src/tui_launch.zigindex 0e40b9a3,08b74e76..3cceec9f--- a/src/tui_launch.zig+++ b/src/tui_launch.zig@@@ -212,10 -214,11 +216,12 @@@ fn updateCb(ctx: ?*anyopaque, gpa: Allofn idleWakeCb(ctx: ?*anyopaque, buf: []u8) ?[]const u8 {const c: *repl_glue.ReplCtx = @ptrCast(@alignCast(ctx orelse return null));+ if (c.root) |root| if (@import("subagent_interactive.zig").takeWake(c.io, root.session_name, buf)) |t| return t;if (job_notify.takeIdleWake(c.io, buf)) |t| return t; // an idle stop waits for a real step boundary (#199)if (schedule.takeWake(c.io, buf)) |t| return t;- return channel_worker.takeWake(c.io, buf);+ if (channel_worker.takeWake(c.io, buf)) |t| return t;+ _ = @import("presence_accord.zig").takePing(); // standing link; JSONL is still the drain+ return peer_idle.takeIdleWake(c.io, buf);}fn versionCb(ctx: ?*anyopaque, gpa: Allocator) ?[]const u8 {