Skip to content

refactor(mcp): bind idle cleanup to the lifecycle scheduler - #159481

Merged
steipete merged 3 commits into
mainfrom
hostneutral/scheduler-mcp-owner-0926
Sep 27, 2026
Merged

steipete merged 3 commits into
mainfrom
hostneutral/scheduler-mcp-owner-0926

Conversation

@steipete

@steipete steipete commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The session MCP manager previously armed its own idle interval, separate from Gateway next-wake visibility and shutdown.

Require a lifecycle scheduler for the manager and bind the kernel scheduler at early startup. Standalone local-agent, stdio-server and update-repair entry points explicitly create and stop their owner; borrowed owners remain open. Idle sweeping becomes a scheduler job, retaining lease retirement and handoff semantics.

The invariant is one scheduler instance per Gateway process: kernel composition supplies it, and required internal scheduler dependencies prevent silently creating private owners. Shipped SDK facades resolve the bound host; standalone entry points visibly own creation and stop.

Deleted: The manager interval, separate in-flight sweep owner and implicit manager construction are removed; timer fixtures use the shared injected clock.

User Impact and Update Behavior

Update behavior: No config, schema, state, spool, port, callback, auth or public SDK signature migration. Standalone local commands retire owned MCP transports when their invocation ends. A simultaneous command/cleanup failure now reports both causes instead of losing the command failure; a command borrowing a retired scheduler is rejected before dependency/preparation work. Loaded native capture retention and startup reclamation remain exactly as landed on main.

LOC: production +336/−131/net +205; tests +1125/−193/net +932; docs +0/−0/net +0. These atomic constructor/caller closures include test migrations; growth is reported directly, without splitting off unused intermediate wiring.

Evidence

Merged as 534b88aff663a06959ba82c50b3914ce9734a761 from head a31e16c6b18cc4e8b1432bdc41371d19bbdc5fbc. Exact-head CI 36355783286 passed. The merge is verified on origin/main, and the merged added/removed lines match the reviewed aggregate patch. This landing completed while the owning SQLite repair was still in progress; that repair subsequently merged as 50864f52176af234dcf4baea0af7640421f67e79 (#159944), with green exact-head CI. Both are present on main. All task-owned Testbox leases are stopped. Historical investigations and intermediate publication states follow below.

Historical focused proof: provider blacksmith-testbox, lease tbx_01m3fqja9r983kwbphpb3v3g5g, run 36270738491; 40 passing file executions / 935 case executions / 1141.713 s wall. These source-pinned receipts cover the reviewed composition; they are not claims that the refreshed publication head ran remotely. Each row used pnpm test <file> --maxWorkers=1, after frozen install.

Focused test cost and source identity
File Passed Wall Proof tree
extensions/codex/src/app-server/thread-lifecycle.user-mcp-servers.test.ts 16 33.425 s 9428a959bf26
src/agents/agent-bundle-mcp-acquisition.test.ts 9 17.585 s 9428a959bf26
src/agents/agent-bundle-mcp-idle-policy.test.ts 4 14.593 s 9428a959bf26
src/agents/agent-bundle-mcp-manager.lifecycle.test.ts 38 15.948 s 9428a959bf26
src/agents/agent-bundle-mcp-manager.pending-disposal.test.ts 1 16.741 s 9428a959bf26
src/agents/agent-bundle-mcp-retirement-boundaries.test.ts 3 19.486 s 9428a959bf26
src/agents/agent-bundle-mcp-runtime.agent-bundle.test.ts 1 15.332 s 9428a959bf26
src/agents/agent-bundle-mcp-runtime.test.ts 114 30.320 s 9428a959bf26
src/agents/agent-bundle-mcp-start-backoff.test.ts 7 15.345 s abad63c51677
src/agents/agent-command-local.test.ts 20 91.229 s abad63c51677
src/agents/cli-runner.before-agent-reply-cron.test.ts 38 19.340 s abad63c51677
src/agents/cli-runner/bundle-mcp.discovery-lifecycle.test.ts 2 17.673 s abad63c51677
src/agents/cli-runner/bundle-mcp.requester-lifecycle.test.ts 1 17.907 s abad63c51677
src/agents/embedded-agent-runner/compaction-successor.test.ts 21 30.268 s abad63c51677
src/agents/embedded-agent-runner/run.overflow-compaction.test.ts 13 24.999 s abad63c51677
src/agents/embedded-agent-runner/run/run-settlement.test.ts 8 27.881 s abad63c51677
src/agents/mcp-connection-resolver.test.ts 11 20.980 s abad63c51677
src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts 8 20.231 s abad63c51677
src/auto-reply/dispatch.block-streaming-recovery.test.ts 24 63.391 s abad63c51677
src/auto-reply/reply/abort.target-owner.test.ts 12 26.915 s abad63c51677
src/auto-reply/reply/agent-runner-memory.private-transcript.test.ts 2 26.486 s abad63c51677
src/auto-reply/reply/agent-runner-required-maintenance.pending-input.test.ts 2 26.015 s abad63c51677
src/auto-reply/reply/session.test.ts 220 76.565 s abad63c51677
src/gateway/operator-approval-mcp-grants.test.ts 13 25.122 s abad63c51677
src/gateway/server-methods/sessions.abort-agent-scope.test.ts 33 34.088 s abad63c51677
src/gateway/server-startup-early.test.ts 13 18.651 s abad63c51677
src/gateway/server.sessions.mcp-cleanup.test.ts 2 24.469 s abad63c51677
src/infra/update-repair-agent.runtime.test.ts 8 18.042 s abad63c51677
test/canonical-descendant.integration.test.ts 73 63.225 s abad63c51677
src/agents/agent-bundle-mcp-manager.requester-connect.test.ts 2 17.270 s abad63c51677
src/agents/agent-bundle-mcp-reload.test.ts 33 22.622 s abad63c51677
src/agents/agent-bundle-mcp-retention.test.ts 1 44.744 s abad63c51677
src/agents/agent-bundle-mcp-harness.test.ts 33 18.199 s abad63c51677
src/agents/cli-runner/cli-run-settlement.test.ts 23 20.744 s abad63c51677
extensions/codex/src/app-server/run-attempt.configured-mcp.test.ts 16 49.621 s abad63c51677
extensions/codex/src/app-server/run-attempt.configured-mcp-authority.test.ts 11 28.000 s abad63c51677
src/gateway/server.mcp-auth-login.test.ts 51 30.622 s abad63c51677
src/gateway/server.mcp-request-shutdown.test.ts 2 23.697 s abad63c51677
src/mcp/plugin-tools-registration.test.ts 8 17.403 s abad63c51677
src/agents/agent-bundle-mcp-manager.lifecycle.test.ts 38 16.539 s abad63c51677

Current-composition refresh: provider blacksmith-testbox, lease tbx_01m3fz4ar9ygxxkxh5y2qjc40x, run 36278033418. Changed source remains byte-identical except preservation of main’s proxy-capture finalizer. Refreshed focused results:

File Passed Wall
src/gateway/server-startup-early.test.ts 13 16.925 s
src/gateway/server.sessions.mcp-cleanup.test.ts 2 21.176 s
src/agents/agent-command-local.test.ts 20 79.954 s
src/infra/update-repair-agent.runtime.test.ts 8 20.588 s
src/agents/agent-bundle-mcp-start-backoff.test.ts 7 13.173 s

The same current composition passed full pnpm build (326.589 s), pnpm plugin-sdk:api:diff --base 0e27650f8e89afa47a839182e8018e5fb9382ce3 --head e06a34e17bceaaca9f04c5af68f4a52f7f84defe (130.200 s), export/surface/import guards, scoped docs sanity, and the existing MCP UI fixture (2 cases, 64.325 s). The isolated import profiler covered 19 packaged SDK consumers (6.229 s) plus three source-only QA consumers (0.918 s). The initial profiler command incorrectly selected private, non-packaged qa-lab and was rejected before import; the corrected routes preserve coverage. All source was verified, and no suite/build ran locally.

SDK API acknowledgement: digest 5e457d84 reports 125 affected exports (124 reachable, one signature-text change), with no added or removed entrypoints. startDiagnosticHeartbeat keeps the same optional config/options types through Parameters<...>[1]/[2]; its internal scheduler parameter is not part of the public call. Public createAuthRateLimiter retains its name, parameters and return contract; its declaration now belongs to the wrapper instead of the aliased internal constructor. The remaining reachable diff adds readonly to three synthesized reason?: undefined fields in recovery unions whose source is byte-identical. This is a nonempty declaration/reachability diff, with no public contract migration required.

Deslop and independent Codex review completed with no accepted/actionable findings. Rejected hypothetical findings retain source-backed dispositions. Required GitHub openclaw/ci-gate validates the exact published head; final Gateway/cron/SIGSTOP/SIGCONT/restart/SIGTERM proof follows the final stack slice.

Stack

Earlier slices include kernel scheduler #158423, session delivery #159275, update watcher #159291, and update campaign #159306. Prerequisites are merged: diagnostic/CLI/SDK lifetime #159389, auth pruning #159455, MCP fixtures #159372, and CLI settlement #159421. This is the final prepared code cutover; final timer census and architecture docs follow. Earlier full stack links appear in predecessor PRs.

Failure and Regression Evidence

Backoff failure and correction: the remote seven-case owner suite passed its first case and failed six after process-global startup failure state survived explicit disposal. Removing hidden manager creation had also skipped the existing reset operation for direct runtimes with no global manager. The public reload/dispose entry points now call the backoff owner in that absent-manager case, while bound-manager reset and settlement behavior remain unchanged. Ordinary session retirement still retains backoff. Explicit config publication now also clears direct-runtime startup cooldown without constructing any manager or scheduler. The existing two-row test covers both entry points with unchanged assertions and seven total cases. Original failure, corrected whole-file cost and assertion-specific production-reversal control belong in this PR evidence.

Negative-control fixture correction: after all102 original focused files passed, the SDK-cleanup control exposed a test-finally defect. When deliberately broken production skipped database cleanup, the fixture's unused one-shot rejection fired during its own final cleanup and masked the intended assertion. The fixture now ends only that local fault injection after body assertions and before actual cleanup. Production, assertions and the strict control matcher remain unchanged. The original rejected control is retained as a fixture failure; the corrected full file and three remaining controls were then executed, with their results recorded below. Fresh Codex P2 review is scoped-clean.

Current negative controls prove late-acquisition retirement, preserving the command error when cleanup also fails, refusing a stopped borrowed scheduler before preparation, and joining both SDK and database cleanup errors. Primary-error and stopped-owner controls failed the intended assertions in 55.108 s and 57.914 s. The SDK-cleanup control failed the intended aggregate-error assertion in 14.867 s (one failed, seven skipped); the automatic text matcher rejected it because Vitest truncated the expected object. Inspection tied the failure to the exact assertion and controlled production mutation. That automatic rejection is retained; no test assertion, command, production source, or matcher was weakened or rerun to change the result.

Merged scheduler slices

Initial publication head eba8ebd9f765f25938317a1dddd2860f905a47b6, parent 804376566a8189f80e8a0d0f3a3172c7f97de876. Only this cutover commit remains above main; diagnostic, auth, fixture and CLI prerequisites are already merged. Range-diff and the added/deleted payload match the reviewed/proved source exactly. Complete-tree caller searches cover all six roots, and no retired MCP timer reference or missing required dependency remains.

CI fixture correction: exact-head run 36300593123 failed check-test-types-core-5 with TS2783 in the early-startup fixture. The fixture created a scheduler, then ...maintenanceState overwrote it with the shared fixture scheduler; cleanup stopped the unused owner. Remove that duplicate and stop the actual maintenance fixture scheduler on test completion. Production and assertions are unchanged. Fresh Codex P2 review is scoped-clean. Provider blacksmith-testbox, lease tbx_01m3gv6bw9aqkne6rqbj2xrf7a, run 36302272598: original public source failed exactly TS2783 with node scripts/run-tsgo-core-test-shards.mjs --stripe 5/5 --concurrency 2 (78.978 s); the same gate passed after the fixture-only correction (43.435 s). pnpm test src/gateway/server-startup-early.test.ts --maxWorkers=1 then passed all 13 cases (20.178 s). Source hashes were checked; no production expression, assertion, retry or timeout changed. Node 24.19.0 and repository-selected pnpm 12.5.0 were used. A provisional bootstrap-version guard stopped before any test and was corrected to honor the repository package-manager declaration.

Corrected publication head ad7f36680144fad63fc7498bc54732bd02cdb5c1, rebased onto main 93bff5273c4713ceba159c715894a20a726e38e4. The original runtime cutover is unchanged; the additional delta corrects only fixture ownership.

Upstream suppression failure: exact-head run 36304475604, job checks-node-compact-small-42, failed the unchanged suppression allowance (expected 76, received 77) because upstream added an unbound-method suppression to the native completion observer. The original three groups (49/49/48 files, two workers, one concurrent plan) reproduced that same unique assertion on the historical CI merge 7169d5c86baf80f3bf913c9197dfabe1cf330270: provider blacksmith-testbox, lease tbx_01m3h712y09bxexqam3127b5ah, run 36313106449, matching two CPUs / 8,218,361,856 bytes RAM, Node 24.19.0 and pnpm 12.5.0, 372.000 s. The reporter printed the same failure twice; inspection confirmed one unique failing test, without rerunning or changing it.

The owner repair independently landed as #159553, b8fa8dc5250be099b8ab15303d83aa7a04331f40. It removes the suppression while preserving typed spy calls with the original receiver and Promise. Its recorded remote proof passed all 143 consumer cases, the three-case unchanged allowance guard, and typed lint; exact-head CI passed. This slice incorporates that landed repair rather than publishing a duplicate. Current head c01ccb308ab32274658adb471ce5d8943ee20295 is rebased onto 7f43b351149930f7db5b4545ad4df4693fe168fc; range-diff is patch-identical for both cutover and fixture correction. Prior focused proof and clean Codex reviews remain applicable, and enforced CI runs on this head.

SIWC fixture failure investigation

CI run 36315303129, job 108609412146 (checks-node-compact-small-38), MCP PR #159481 head c01ccb3: test/provider-auth-method.openai-siwc.integration.test.ts returned a terminal error on its second login instead of the authorization note. The original assertion omitted the underlying error. This was the only failed test shard; the other cancelled shards were fail-fast consequences.

On blacksmith-testbox lease tbx_01m3h712y09bxexqam3127b5ah, run 36313106449, with Node 24.19.0, pnpm 12.5.0, two CPUs / 8,218,361,856 bytes RAM, we replayed the original two groups (36 and 38 files, worker limit 2, plan concurrency 1) at the original merge 99f401ce15b55600c844f1c36599d099501c1059. Command: python3 /tmp/hn-small38-tools/mcp-small38-baseline-proof/run-repro.py mcp-small38 /tmp/hn-small38-baseline/checkout. The unchanged original order reproduced the same unique failure in 217.117 seconds. Source identity was checked before and after.

A temporary diagnostic logged only the retry's terminal status and error if it failed. One standalone diagnostic passed in 26.000 seconds; one original-two-group diagnostic replay passed in 217.702 seconds. Neither captured the error or established a fix. The patch was restored afterward.

Another owner investigated the same failure in #159574, now merged as 69809d7. Its documented investigation passed the original two-group order and five standalone probes; temporary tracing showed listener close before retry binding. That PR added WizardSession.getError() to the existing assertion's failure message without weakening the assertion or changing production authentication. Its exact-head CI 36317673749 succeeded. Those passes do not identify the intermittent failure's cause.

No safe causal fix is established. Do not claim the missing await on server.close() caused the observed failure: Node can release the native listener before emitting its close event, and another owner's trace observed close before rebind. No production/auth changes, retries, longer timeouts, weaker assertions, or broadened mocks are proposed. Rebase onto the landed diagnostic improvement and retain this uncertainty. If the failure recurs, the existing assertion now exposes the actual error for owner-level diagnosis.

Current head cff86b848c7e6656315602cf40b13c64d1a05a27 incorporates that diagnostic improvement on main 9ca49c5ac1593be8fd6981876b758ef24d0fa56d. Both scheduler commits are patch-identical to the previously reviewed/proved head. The close-event experiment was canceled before execution; no production authentication change is included. Exact-head auto-merge has been re-armed; enforced CI remains the landing gate.

Main repairs incorporated in the final rebase

Core-test-type stripes 3 and 5 in run 36319501898 exposed two stale ACP fixture calls after the shared SQL observer dropped its environment argument. Main's hourly run also failed those stripes and six cleanup cases with onQuery is not a function. Upstream direct-main fix e9af8ebcde6b25813d2fdb45662fe40dd4452089 removes only those two stale arguments, preserving all SQL-observation assertions. Our prepared two-line fix was identical, so it was not published again.

Provider blacksmith-testbox, lease tbx_01m3hf4654yn9v2qj5yvvcd1ck, run 36320788546, matching CI class 16 (four actual CPUs, 16,555,134,976 bytes RAM), Node 24.19.0/pnpm 12.5.0: node scripts/run-tsgo-core-test-shards.mjs --stripe 3/5 --concurrency 2 and --stripe 5/5 --concurrency 2 each reproduced its sole original TS2345 (37.372 s/37.406 s). The corrected stripes passed (75.864 s/71.659 s). pnpm test src/acp/runtime/session-meta-write.worker.test.ts --maxWorkers=1 passed 11 cases (33.753 s); pnpm test src/tasks/task-registry-acp-cleanup.sqlite.test.ts --maxWorkers=1 passed 10 cases (26.311 s). Tested files are byte-identical to the landed repair. Deslop and independent Codex P2 review were clean.

Two further main failures already had owners: 45e3fb028078ab104231f20c0249114bb5a2ca15 isolates nested worker-cache fixture inputs, removing a borrower-admission deadlock without changing production policy or timeouts; #159654, merged as e8b091921ef03a016985cbb9a55abf0766470773, restores the file-transfer plugin's supported filesystem boundary. Its original guard control failed as expected, repaired boundary/sibling tests and all 354 plugin cases passed, and exact-head CI succeeded. These existing owner repairs were reused, with no duplicate implementation.

Published head de9dce82666c92b160db2d934cf191eba65ec7ca is based on e8b091921ef03a016985cbb9a55abf0766470773 and incorporates all three repairs. Both MCP commits remain patch-identical to the previously reviewed and proved changes. Current exact-head CI is the enforced landing gate; auto-merge is armed.

Migration lease failure: cause and upstream repair

Run 36323325177 failed a migration receipt assertion in state-migrations.caller-mode.plugin-execution.test.ts. The first matched-class, original-shape probe exposed two lost plugin-lifecycle leases in 168.817 s (488 passed, two failed, two skipped; the runner stopped after the first infra group). A more detailed three-group replay passed 1,115 tests in 387.601 s without exposing the producer; this was not claimed as a fix. Focused probes subsequently reproduced the failure and traced valid lease writes into previous fixture databases while verification read the current database. Fresh readers confirmed the missing row, ruling out a stale parent snapshot. The cache selected a revoked worker entry after the filesystem reused its inode key.

The initially adopted upstream repair was e52420e1eea6c614ba7730d3d36980167478c6df (subsequently reverted, as explained below). It validates the cached worker's original admission, joins retirement before reusing an idle actor, refuses replacement while callbacks remain active, and waits for agent/shared-state fixture teardown before deleting roots. Three real-worker relocation regressions fail before the repair. It also preserves refusal details in the existing assertion. No lease budget, schema, permission, WAL timer or update-driver contract changes. Our concurrently prepared alternative was superseded and not published.

Our validation used provider blacksmith-testbox, lease tbx_01m3hk1eb5rgj81fgdax41sv37, run 36324748387, matching class 32 (eight actual CPUs, 33,229,729,792 bytes RAM), Node 24.19.0/pnpm 12.5.0. On pinned merged main f0b149f44df9a47ea6822bec2b7b438a938ec54a, with the owner files byte-identical to the repair: pnpm test src/infra/state-migrations.caller-mode.plugin-execution.test.ts --maxWorkers=1 passed all 23 cases in 41.637 s; pnpm test src/infra/sqlite-worker-shared-state.test.ts --maxWorkers=1 passed all 33 cases in 30.822 s. The original three-group selection (46 infra, 25 Gateway, 12 Gateway files; original worker/environment settings, one concurrent plan) then passed 1,115 tests with two existing skips in 367.843 s through node --import tsx scripts/ci-run-node-test-shard.mts. No instrumentation was present. One earlier grouped attempt was interrupted by crossed operator coordination; that interruption is retained separately, and the focused passes were not repeated. All diagnostic patches were restored and the lease is stopped and verified completed.

Historical head 198c8d0abbd5c1908f19bfb6c6a5b2b434f01a10 included that repair. Its exact-head CI failed the ended-schema reader assertion described below. The earlier SIWC failure remains separately documented as unexplained; passing replays were not presented as a causal fix.

Ended-schema reader failure and upstream reconciliation

The next CI failure was subagent-registry-state.async.test.ts rejecting a resident read after its schema scope ended. The original four-group selection (71 Gateway, 92 agents-support, 81 auto-reply, 36 embedded file selections; workers 2/2/2/8, one concurrent plan) reproduced it. Direct schema admission threw, while the resident reader swallowed the same error as a cache miss. Upstream 601bb5ba37e5f578a35b2d7a176cd24bfde38135 had incorrectly classified ended lexical authority as physical database invalidation.

On provider blacksmith-testbox, lease tbx_01m3hv8jkf1xhmjejea2qaveag, run 36333507292, the unchanged negative failed only that assertion in 21.521 s. A separate-category candidate passed 91 focused cases, affected type graphs (73.382 s), typed lint (19.592 s), and the original four-group selection (4,088 passed, one reported skip, 316.645 s) on fresh main plus the candidate. This candidate is unpublished and superseded: main reverted both 601bb5 in 1664e4cf262616c48268e67dda0532f638ece9a7 and e52420 in af9e273f63468f527ac3f59c3309dd90d777e18f. The storage owner's replacement #159757 separates database lifetime admission from lexical schema scope and remains independently owned; it is not counted as landed or incorporated here.

Historical publication head 27290fa71c01d03ca77a72737417cc5d1178e5ca rebased onto main 87a5b397bda5654971e41058ed7c544d894c6f4d, incorporating those reversions. Both MCP commits remain patch-identical, so focused proof and clean Codex reviews remain applicable. Its next CI run failed the unrelated generated-asset guard described below. No assertions, retry counts, timeouts or mocks were weakened.

Generated Workboard asset drift and current publication

Run 36336696412, build-artifacts job 108669013785, failed only the generated Workboard manifest check; the remaining jobs were fail-fast cancellations. Main run 36337102159, job 108670048807, showed the same failure. On clean main 42e53a49df3a3c7e9ea51ce86d74e300d94a8ead, provider blacksmith-testbox, lease tbx_01m3hv8jkf1xhmjejea2qaveag, run 36333507292, frozen install passed (1.151 s), pnpm build:ci-artifacts passed (82.523 s), and pnpm plugins:assets:check failed (1.218 s), changing only the generated manifest. Build used OPENCLAW_BUILD_ALL_NO_PNPM=1, pnpm_config_verify_deps_before_run=false, and NODE_OPTIONS=--max-old-space-size=8192; the asset check omitted NODE_OPTIONS, matching CI.

The cause was an added interrupted protocol literal embedded in the browser bundle. Removing only that literal restored the exact old asset digest and passed the existing check in 1.222 s; the control then restored canonical source. Independently landed 6652f7eac8d96ccc50b0da648cbbd8b556fcfb7b regenerated the current Workboard manifest as part of #159179. We adopted that owner change instead of publishing duplicate generated bytes. At that exact main commit, frozen install passed (1.548 s), the same CI build passed (83.142 s), and asset check passed (1.218 s) with no drift.

The rebase preserved main's Tasks/TaskFlow removal. Its only manual conflict resolutions retained the new startup comment/import context and removed task-test imports, while preserving MCP scheduler binding and fixture-owned cleanup. Candidate 6d6b846a641c45b22428889e8856f339fc9e5bd2 passed pnpm test src/gateway/server-startup-early.test.ts --maxWorkers=1 (11 cases, 15.616 s) and pnpm test src/gateway/server-methods/sessions.abort-agent-scope.test.ts --maxWorkers=1 (33 cases, 29.941 s), on the same lease. Deslop and one fresh Codex P2 integration review are clean. The lease is stopped and verified completed.

Current head 98a2923e9128983b49060e68956b5ea292a857aa is a patch-identical rebase of that reviewed candidate onto 2e1cb01746e74c6b6da9cbe10c7f09de8c6e6f91. Its CI failed the upstream fixture type error below; auto-merge remains pending. Production/test/docs LOC remains unchanged.

Current blocker: media reader fixture callback

Run 36339159063, job 108675932432 (check-test-types-core-3), failed only TS2554 at src/agents/tools/media-generate-background-retention.test.ts:233. The upstream Tasks-removal fixture paused a real session-entry reader and then forwarded only the result, dropping the required reader-owner argument. This is independent of MCP scheduling.

On clean main 3780784afceabfee6950904794dcde4c59595ebc, provider blacksmith-testbox, lease tbx_01m3j17j7w3w6a87xjtsxj3wqk, run 36339937307, node scripts/run-tsgo-core-test-shards.mjs --stripe 3/5 --concurrency 2 reproduced that sole error in 70.314 s on matching class16 hardware (four logical CPUs, 16,555,134,976 bytes RAM). Forwarding the original (result, owner) pair passed the same stripe in 49.986 s and pnpm test src/agents/tools/media-generate-background-retention.test.ts --maxWorkers=1 passed all 12 cases in 28.936 s. Assertions, pause gates, retries and timeouts are unchanged. Deslop and one isolated Codex P2 review are clean.

An independently prepared identical owner fix is #159845, published at f27dacbe41ed8efb3f5e539d2022dfaa676ac7dc. Its fixture bytes match the correction above; its own focused, type and changed checks also passed. We stopped our duplicate publication before creating a branch or PR and initially armed the existing fix. The same correction then landed through #159836, merge 0b6f02faae371776d8bfdb5b4f3a7696ee50e34b, together with the recovery fixture’s missing batch-settlement await. Its exact-head CI run 36343334375 passed. The redundant #159845 is closed; the prepared MCP rebase incorporates the landed owner fix.

SQLite worker replacement dependency

The current main worker/identity/migration-fixture sources were checked after the reversions; they still lacked the original cached-admission validation, so the historical f0b149 pass is not claimed as a present fix. The reviewed maintainer replacement is #159944, based on Vincent Koc's #159757 and preserving his attribution. It checks canonical database admission separately from lexical schema scope, joins idle stale-actor retirement, and refuses replacement while callbacks retain the actor, avoiding a callback waiting for itself.

Fresh Testbox proof on provider blacksmith-testbox, lease tbx_01m3jg140mvzve7v6rafdhdy94, run 36355707484, passed 67 focused cases and the original first infra selection: 436 passed, two existing skips, 183.835 s. All 42 surviving paths retain the historical order/environment/worker settings; four original paths were removed by the Tasks cutover. The core/state-logging type graphs and six-file typed lint also passed. Clean-main negative controls fail the new admission regressions; the original contributor-head control exposes the active-callback self-wait without hanging. Detailed commands, costs, and disclosed receipt-classifier limitations are in the replacement PR.

The replacement is ready and armed at 70615a358655ef2095da3741f037041e84146674, with CI run 36357143646 pending. The worker repair subsequently merged as 50864f52176af234dcf4baea0af7640421f67e79; current main contains both it and this MCP cutover. No passing result from the reverted worker repair is substituted for the replacement proof.

@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: codex size: XL labels Sep 27, 2026
@steipete
steipete enabled auto-merge (squash) September 27, 2026 06:40
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 27, 2026
@clawsweeper

clawsweeper Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 27, 2026, 3:25 PM ET / 19:25 UTC (Revision 9).

ClawSweeper review

What this changes

Routes session MCP idle cleanup through the Gateway lifecycle scheduler and gives standalone agent commands and update repair explicit scheduler and resource ownership.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: current main still uses the session MCP manager’s private idle timer, so this PR remains useful. I found no discrete introduced defect, but the repository’s required existing-install update proof is outstanding.

Priority: P2
Reviewed head: 98a2923e9128983b49060e68956b5ea292a857aa

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The owner-level cutover has substantial focused validation and no established code finding, while the required upgrade observation remains missing.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its MCP manager, local-command, and repair-resource paths have focused Testbox and boundary-test evidence, but those results do not replace the repository-required published updater × candidate upgrade observation; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its MCP manager, local-command, and repair-resource paths have focused Testbox and boundary-test evidence, but those results do not replace the repository-required published updater × candidate upgrade observation; no stored-data contract changes.
Evidence reviewed 9 items Current main still has the private timer: The fetched main revision arms the MCP manager’s idle sweep with setInterval; the branch’s scheduler migration is not implemented there.
Introduced scheduler cutover: The introduced patch replaces the manager interval with a named recurring job on its supplied scheduler and joins the previous job during scheduler handoff.
Gateway and standalone ownership: Early Gateway startup binds its scheduler; standalone local commands construct an owner when no bound host exists and close it after the command.
Findings None None.
Security None None.

How this fits together

The Gateway scheduler owns periodic work and shuts it down with the Gateway. Agent runs acquire session MCP connections through a shared manager, which later retires idle connections; standalone commands and repair turns own their shorter lifetimes.

flowchart LR
  A[Gateway startup] --> C[Lifecycle scheduler]
  B[Local commands and repair] --> C
  C --> D[Session MCP manager]
  D --> E[Runtime leases]
  D --> F[Idle sweep]
  C --> F
  F --> G[Retired connections]
Loading

Before merge

  • Resolve merge risk (P2) - The published v2026.9.6 updater has not been shown installing this candidate over existing operator state; the changed repair-resource lifetime could affect recovery or leave the previous Gateway stopped after a recoverable update failure.
  • Complete next step (P2) - Record a published v2026.9.6 updater × candidate recovery result, including previous-Gateway behavior after recoverable failure, then refresh the exact-head CI gate after test(agents): forward the retained media reader owner #159845 lands.
Agent review details

Security

None.

PR surface

Source +197, Tests +940. Total +1137 across 43 files.

View PR surface stats
Area Files Added Removed Net
Source 6 326 129 +197
Tests 37 1135 195 +940
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 43 1461 324 +1137

Review metrics

Metric Value Why it matters
Production and test growth production +205 net; tests +932 net The PR attributes production growth to required lifecycle wiring; the larger test delta covers ownership and teardown cases.

Merge-risk options

Maintainer options:

  1. Verify the published update path (recommended)
    Run the v2026.9.6 published updater against this candidate with existing operator state and record both successful repair and previous-Gateway behavior after a recoverable failure.

Technical review

Best possible solution:

Use one Gateway-owned scheduler for MCP cleanup while preserving the published updater’s existing-install recovery guarantees and explicit resource closure for standalone work.

Do we have a high-confidence way to reproduce the issue?

Not applicable to this lifecycle refactor; current main’s separate idle interval establishes the starting behavior.

Is this the best way to solve the issue?

Yes for timer ownership: registering cleanup with the existing scheduler at the MCP manager is a coherent owner-level cutover. Upgrade safety still needs the prescribed published-driver validation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 272605d6d548.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded MCP lifecycle improvement with a material but limited existing-install validation gap.
  • merge-risk: 🚨 compatibility: The branch changes update-repair resource ownership without the repository-required published-updater compatibility result.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor proof gate. Its MCP manager, local-command, and repair-resource paths have focused Testbox and boundary-test evidence, but those results do not replace the repository-required published updater × candidate upgrade observation; no stored-data contract changes.

Evidence

What I checked:

  • Current main still has the private timer: The fetched main revision arms the MCP manager’s idle sweep with setInterval; the branch’s scheduler migration is not implemented there. (src/agents/agent-bundle-mcp-manager-lifecycle.ts:350, 272605d6d548)
  • Introduced scheduler cutover: The introduced patch replaces the manager interval with a named recurring job on its supplied scheduler and joins the previous job during scheduler handoff. (src/agents/agent-bundle-mcp-manager-lifecycle.ts:345, 98a2923e9128)
  • Gateway and standalone ownership: Early Gateway startup binds its scheduler; standalone local commands construct an owner when no bound host exists and close it after the command. (src/gateway/server-startup-early.ts:66, 98a2923e9128)
  • Update repair boundary: The patch adds scheduler and SDK-resource closure to update repair, making the installed-updater compatibility requirement applicable. (src/infra/update-repair-agent.runtime.ts:120, 98a2923e9128)
  • Repository update policy: The full root policy requires a published-driver × candidate cell for changes touching update or service lifecycle, including preservation of the previous Gateway after recoverable failure. (AGENTS.md:83, 98a2923e9128)
  • Pinned PR-body proof coverage: The complete live body hash matches the captured source hash a01dea904fe044808a0f5086d52dce72c15f1ce792dcaaf7d217e09525c22489. It records focused Testbox runs, build and SDK checks, but no published v2026.9.6 updater × this candidate recovery result; the prior review identified the same gap. (98a2923e9128)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • qingminlong: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Record the published v2026.9.6 updater × candidate result, including previous-Gateway behavior after a recoverable failure.
  • After the separate media-reader fixture repair lands, obtain a fresh exact-head core test-types gate.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed September 27, 2026, 2:53 AM ET / 06:53 UTC sha unknown :: blocked before merge. :: none
  • reviewed 2026-09-27T08:08:13.776Z sha ad7f366 :: blocked before merge. :: none
  • reviewed 2026-09-27T11:28:35.474Z sha c01ccb3 :: blocked before merge. :: none
  • reviewed 2026-09-27T12:45:05.431Z sha cff86b848c7e6656315602cf40b13c64d1a05a27 :: blocked before merge. :: none
  • reviewed 2026-09-27T13:54:17.182Z sha de9dce8 :: blocked before merge. :: none
  • reviewed 2026-09-27T16:06:45.726Z sha 198c8d0 :: blocked before merge. :: none
  • reviewed 2026-09-27T17:30:28.119Z sha 27290fa71c01d03ca77a72737417cc5d1178e5ca :: blocked before merge. :: none
  • reviewed 2026-09-27T18:12:33.293Z sha 98a2923 :: blocked before merge. :: none

@steipete
steipete force-pushed the hostneutral/scheduler-mcp-owner-0926 branch 3 times, most recently from c01ccb3 to cff86b8 Compare September 27, 2026 12:35
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 27, 2026
@steipete
steipete force-pushed the hostneutral/scheduler-mcp-owner-0926 branch 3 times, most recently from 198c8d0 to 27290fa Compare September 27, 2026 17:22
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 27, 2026
@steipete
steipete force-pushed the hostneutral/scheduler-mcp-owner-0926 branch from 27290fa to 98a2923 Compare September 27, 2026 18:02
@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 27, 2026
@steipete
steipete merged commit 534b88a into main Sep 27, 2026
237 checks passed
@steipete
steipete deleted the hostneutral/scheduler-mcp-owner-0926 branch September 27, 2026 22:54
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 28, 2026
steipete added a commit that referenced this pull request Sep 28, 2026
## What Problem This Solves

MCP idle cleanup already runs through GatewayScheduler, but obsolete clock and sweep-control options still leave a second timing surface to maintain.

Related: #159481.

## User Impact

No user-visible behavior change. Existing installs retain their state, configuration, MCP idle lifetime, and connection revalidation interval; no migration is needed.

## Why This Change Was Made

Use the required scheduler clock for revalidation, idle expiration, and catalog timestamps. Delete the unused `now`, `enableIdleSweepTimer`, and `idleSweepIntervalMs` options and their stored copies. Tests exercise the existing injected scheduler instead of keeping production-only test seams alive. No storage, configuration, or public SDK contract changes.

Production +8/-23/net -15; tests +83/-107/net -24; docs +0/-0/net 0.

## Evidence

- Codex autoreview: scoped-clean through P2; stable patch ID matches the reviewed patch after rebasing; both production file hashes match the retained proof.
- Focused Testbox proof: 217 tests in seven files passed on `blacksmith-testbox`, lease `tbx_01m3k4y56rf9r63tzs4hck3pek`, [run 36378613468](https://github.com/openclaw/openclaw/actions/runs/36378613468). Each used `pnpm test <file> --maxWorkers=1`; aggregate command wall 150.011s.
- Measured per-file command wall: manager lifecycle 18.154s (38 tests); pending disposal 15.682s (1); reload 21.494s (33); runtime 34.380s (114); start backoff 13.820s (6); CLI settlement 25.331s (23); Gateway cleanup 21.150s (2).
- Fresh candidate: `1fceb8f4e742a7c6e84eb05308644f228f83bd9a`, based on `40019980f2687648942b0788fb8523fef58ff7ff`.
- Fresh exact-head runtime proof: `pnpm test src/agents/agent-bundle-mcp-runtime.test.ts --maxWorkers=1`, 114 passed, 57.62s command wall (55.07s Vitest), lease `tbx_01m3kk0dx6pdrd4qzqpmhsghq3`, [run 36399208869](https://github.com/openclaw/openclaw/actions/runs/36399208869). This refresh covers the fixture changes on main; the other eight files match the retained proof hashes.
- Exact-head scoped `node scripts/check-changed.mjs --base 4001998 -- <nine changed paths>`: passed on the fresh candidate in 1665.76s on the same lease/run. Core production and all 25 selected test type graphs passed; changed-file lint reported zero warnings/errors; dead-export scans reported zero entries.
- Hosted CI seconds will be recorded when the exact-head run exists. Merged-main sleep/shutdown live proof follows the remaining scheduler closeout slices.

### UI CI timeout investigation

The manual-unread indicator timed out at `ui/src/e2e/session-management.unread.e2e.test.ts:266` in CI run 36402978963, job 108865636156. The CI merge was `341c4969`, combining this PR with main `fa9473b3fcb8c456ac8cdd4f23518a9213cee833`.

On that clean main parent, using Blacksmith Testbox `tbx_01m3ktn45k69wm4ktnr74msxs0` ([run 36412860013](https://github.com/openclaw/openclaw/actions/runs/36412860013)), both bounded comparisons passed:

- Single unchanged spec: 7 tests, 42.71s command wall; target case 3.813s.
- Original CI shard 4/8: 79 files and 354 tests, 504.81s command wall; target case 5.822s. The frozen 667-path CI include list produced exactly the same 79-file membership. The first nine observed file starts also matched CI order. A fresh checkout prevented the first comparison's result cache from influencing ordering.

Both used Node 24.19.0, pnpm 12.5.1, Playwright Chromium revision 1243 / Chrome 153.0.8010.12, the bundled UI config, three workers, and disabled real Gateway tests. The native test setup built the production UI bundle. The original-shard replay preserved CI's cache-writer flags. No test retries, timeout changes, source edits, or hosted CI reruns were used.

The test uses a Vite preview and page-injected mock Gateway. This PR changes only two MCP manager implementation modules and seven core tests excluded from the UI lane; it changes no UI, UI configuration, Gateway protocol, dependency lockfile, or runner code. The failing spec has the identical Git blob on the PR head and clean CI parent (`30602a1e0f7b45083ef0e903e8d1cf18164a1957`). No causal MCP path was identified.

Subsequent independent CI supplied the matching failure described below. These passing baseline replays do not prove a fix or reproduce an inherited failure; they do not replace the original red CI result.


### Final inherited-CI classification

CI run [36402978963](https://github.com/openclaw/openclaw/actions/runs/36402978963) completed on reviewed head `1fceb8f4e742a7c6e84eb05308644f228f83bd9a`. All three failing test jobs have matching independent evidence in owners this change does not modify:

| Failure | This PR | Matching independent evidence |
| --- | --- | --- |
| Install-policy child no-output case receives the overall 10000ms timeout | [job 108865638917](https://github.com/openclaw/openclaw/actions/runs/36402978963/job/108865638917) | Approval [job 108861794828](https://github.com/openclaw/openclaw/actions/runs/36401825740/job/108861794828), identical test, line 264, expected no-output reason, and received overall-timeout reason; fixture repair #160372 is merged. |
| Prepared-model hot reload reports `Agent admission requires its host owner` | [job 108865638382](https://github.com/openclaw/openclaw/actions/runs/36402978963/job/108865638382) | Clean main at `c7f4733f33a90442f7ddf5abea7b647c8e4dbd14`: [job 108854461198](https://github.com/openclaw/openclaw/actions/runs/36399583824/job/108854461198), same test and error. |
| Manually unread UI state times out waiting for its unread dot | [job 108865636156](https://github.com/openclaw/openclaw/actions/runs/36402978963/job/108865636156) | Independent cron-exit [job 108894925308](https://github.com/openclaw/openclaw/actions/runs/36411857535/job/108894925308): same `session-management.unread.e2e.test.ts` test, line 266, `.sidebar-session-indicator .session-unread-dot` locator, and 30000ms timeout. |

The remaining red is the aggregate [CI gate](https://github.com/openclaw/openclaw/actions/runs/36402978963/job/108873632611), derived from those jobs. The earlier passing UI baseline replay did not establish inheritance; the subsequent independent cron-exit failure supplies that missing evidence. No hosted jobs were rerun.

The maintainer’s standing instruction authorizes pinned admin squash over these proven inherited failures. The protected native GraphQL route preserves the same squash, message, and expected-head payload as the CLI admin operation.
steipete added a commit that referenced this pull request Sep 28, 2026
…y, and scheduler changes

Release-check lanes that were also red on main asserted pre-change contracts:
- subagent settle wording now says "in this batch" (#158642)
- Responses request bodies are pre-encoded bytes (#159574); decode them
  without consuming init instead of requiring string bodies
- direct experience-review calls must bind the session MCP scheduler that
  Gateway startup binds in production (#159481)
- Docker lanes pin the plain PATH `codex` CLI for the Codex harness probe
- Telegram group-policy hot reload must name every array it replaces

Landed directly from #160746 (the native publisher needs a signed merge to
bring that branch current). Focused proof: four QA suites 200/200 in 81 s on
the merged tree; the two E2E files and credentialed live paths were not run.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
## What Problem This Solves

MCP idle cleanup already runs through GatewayScheduler, but obsolete clock and sweep-control options still leave a second timing surface to maintain.

Related: openclaw#159481.

## User Impact

No user-visible behavior change. Existing installs retain their state, configuration, MCP idle lifetime, and connection revalidation interval; no migration is needed.

## Why This Change Was Made

Use the required scheduler clock for revalidation, idle expiration, and catalog timestamps. Delete the unused `now`, `enableIdleSweepTimer`, and `idleSweepIntervalMs` options and their stored copies. Tests exercise the existing injected scheduler instead of keeping production-only test seams alive. No storage, configuration, or public SDK contract changes.

Production +8/-23/net -15; tests +83/-107/net -24; docs +0/-0/net 0.

## Evidence

- Codex autoreview: scoped-clean through P2; stable patch ID matches the reviewed patch after rebasing; both production file hashes match the retained proof.
- Focused Testbox proof: 217 tests in seven files passed on `blacksmith-testbox`, lease `tbx_01m3k4y56rf9r63tzs4hck3pek`, [run 36378613468](https://github.com/openclaw/openclaw/actions/runs/36378613468). Each used `pnpm test <file> --maxWorkers=1`; aggregate command wall 150.011s.
- Measured per-file command wall: manager lifecycle 18.154s (38 tests); pending disposal 15.682s (1); reload 21.494s (33); runtime 34.380s (114); start backoff 13.820s (6); CLI settlement 25.331s (23); Gateway cleanup 21.150s (2).
- Fresh candidate: `1fceb8f4e742a7c6e84eb05308644f228f83bd9a`, based on `0732e06d27cc6a8466911e15bd60d07cfed576ac`.
- Fresh exact-head runtime proof: `pnpm test src/agents/agent-bundle-mcp-runtime.test.ts --maxWorkers=1`, 114 passed, 57.62s command wall (55.07s Vitest), lease `tbx_01m3kk0dx6pdrd4qzqpmhsghq3`, [run 36399208869](https://github.com/openclaw/openclaw/actions/runs/36399208869). This refresh covers the fixture changes on main; the other eight files match the retained proof hashes.
- Exact-head scoped `node scripts/check-changed.mjs --base 0732e06 -- <nine changed paths>`: passed on the fresh candidate in 1665.76s on the same lease/run. Core production and all 25 selected test type graphs passed; changed-file lint reported zero warnings/errors; dead-export scans reported zero entries.
- Hosted CI seconds will be recorded when the exact-head run exists. Merged-main sleep/shutdown live proof follows the remaining scheduler closeout slices.

### UI CI timeout investigation

The manual-unread indicator timed out at `ui/src/e2e/session-management.unread.e2e.test.ts:266` in CI run 36402978963, job 108865636156. The CI merge was `341c4969`, combining this PR with main `4e389269036c251ce4fec079e712aabb14fcb9b3`.

On that clean main parent, using Blacksmith Testbox `tbx_01m3ktn45k69wm4ktnr74msxs0` ([run 36412860013](https://github.com/openclaw/openclaw/actions/runs/36412860013)), both bounded comparisons passed:

- Single unchanged spec: 7 tests, 42.71s command wall; target case 3.813s.
- Original CI shard 4/8: 79 files and 354 tests, 504.81s command wall; target case 5.822s. The frozen 667-path CI include list produced exactly the same 79-file membership. The first nine observed file starts also matched CI order. A fresh checkout prevented the first comparison's result cache from influencing ordering.

Both used Node 24.19.0, pnpm 12.5.1, Playwright Chromium revision 1243 / Chrome 153.0.8010.12, the bundled UI config, three workers, and disabled real Gateway tests. The native test setup built the production UI bundle. The original-shard replay preserved CI's cache-writer flags. No test retries, timeout changes, source edits, or hosted CI reruns were used.

The test uses a Vite preview and page-injected mock Gateway. This PR changes only two MCP manager implementation modules and seven core tests excluded from the UI lane; it changes no UI, UI configuration, Gateway protocol, dependency lockfile, or runner code. The failing spec has the identical Git blob on the PR head and clean CI parent (`30602a1e0f7b45083ef0e903e8d1cf18164a1957`). No causal MCP path was identified.

Subsequent independent CI supplied the matching failure described below. These passing baseline replays do not prove a fix or reproduce an inherited failure; they do not replace the original red CI result.


### Final inherited-CI classification

CI run [36402978963](https://github.com/openclaw/openclaw/actions/runs/36402978963) completed on reviewed head `1fceb8f4e742a7c6e84eb05308644f228f83bd9a`. All three failing test jobs have matching independent evidence in owners this change does not modify:

| Failure | This PR | Matching independent evidence |
| --- | --- | --- |
| Install-policy child no-output case receives the overall 10000ms timeout | [job 108865638917](https://github.com/openclaw/openclaw/actions/runs/36402978963/job/108865638917) | Approval [job 108861794828](https://github.com/openclaw/openclaw/actions/runs/36401825740/job/108861794828), identical test, line 264, expected no-output reason, and received overall-timeout reason; fixture repair openclaw#160372 is merged. |
| Prepared-model hot reload reports `Agent admission requires its host owner` | [job 108865638382](https://github.com/openclaw/openclaw/actions/runs/36402978963/job/108865638382) | Clean main at `b0c4d4ecca039286121cbd72747033b21f4bb298`: [job 108854461198](https://github.com/openclaw/openclaw/actions/runs/36399583824/job/108854461198), same test and error. |
| Manually unread UI state times out waiting for its unread dot | [job 108865636156](https://github.com/openclaw/openclaw/actions/runs/36402978963/job/108865636156) | Independent cron-exit [job 108894925308](https://github.com/openclaw/openclaw/actions/runs/36411857535/job/108894925308): same `session-management.unread.e2e.test.ts` test, line 266, `.sidebar-session-indicator .session-unread-dot` locator, and 30000ms timeout. |

The remaining red is the aggregate [CI gate](https://github.com/openclaw/openclaw/actions/runs/36402978963/job/108873632611), derived from those jobs. The earlier passing UI baseline replay did not establish inheritance; the subsequent independent cron-exit failure supplies that missing evidence. No hosted jobs were rerun.

The maintainer’s standing instruction authorizes pinned admin squash over these proven inherited failures. The protected native GraphQL route preserves the same squash, message, and expected-head payload as the CLI admin operation.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 29, 2026
…y, and scheduler changes

Release-check lanes that were also red on main asserted pre-change contracts:
- subagent settle wording now says "in this batch" (openclaw#158642)
- Responses request bodies are pre-encoded bytes (openclaw#159574); decode them
  without consuming init instead of requiring string bodies
- direct experience-review calls must bind the session MCP scheduler that
  Gateway startup binds in production (openclaw#159481)
- Docker lanes pin the plain PATH `codex` CLI for the Codex harness probe
- Telegram group-policy hot reload must name every array it replaces

Landed directly from openclaw#160746 (the native publisher needs a signed merge to
bring that branch current). Focused proof: four QA suites 200/200 in 81 s on
the merged tree; the two E2E files and credentialed live paths were not run.
azuretek added a commit to azuretek/nucleo that referenced this pull request Oct 8, 2026
* refactor(channels): deslop small channel plugins (#160639)

Reuse SDK parsing, normalization, timeout, status, and context contracts;
remove private forwarding layers and redundant result/type projections
across the ten small channel plugins. Preserve provider wire formats,
authorization, rate limits, chunking, and state contracts.

Keep meaningful owner-command and registration coverage at real channel
boundaries, and shrink only the affected assertion-baseline entries.

* fix(talk): speaking over the assistant does not interrupt it during forced consults (#153727)

Restore speech interruption during forced agent consults by resolving the existing provider preference independently of automatic audio responses. Preserve explicit interruption opt-out on both routing paths.

Closes #139278

Co-authored-by: JIE <[email protected]>
Co-authored-by: IWhatsskill <[email protected]>

* fix(ui): keep history rail wave while hovering its preview (#160722)

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(qa): unblock isolated harness tool and evidence checks (#160527)

* fix(qa): recognize settled subagent batches

Share requester-settle wake recognition between mock input classification and completion handling. Accept the current batch wording while retaining installed-candidate session wording and the existing provenance check.

The real catalog-only handoff spawned and completed a child on the baseline, but QA ignored its completion and timed out. Two focused regressions failed before this fix. The real handoff now passes, all 70 owner/sibling tests pass, and check-changed passes. Standalone changed-test wall times: input 3.21s; handoff 33.76s.

* fix(qa): admit canonical repository checkpoint commands

* fix(ui): stabilize Run Inspector evidence collection

Bind rendered evidence to the public run, execution, and selected decision
receipt identities. Add a shared collector that uses the component-owned
route model and a separate page, preserving the caller's Chat surface and
unsent draft through collection and later reload.

Cover exact run/execution selection, receipt cursor reload, back navigation,
wrong requested identity, missing receipt, and page cleanup in the existing
mock-Gateway Chromium harness. Document the collector and per-tab auth setup.

The regression failed on baseline before product edits because the rendered
run identity attribute was absent. Terminal R's optional assistant transcript
idempotency key is a distinct producer gap; this does not manufacture that
key, relabel historical cells, or change product appearance.

* fix(telegram): confine QA runtime and preserve readiness evidence

Run standard-library drivers through existing Python without UV inline-script virtual environments. Confine private runtime state, drain readiness pipes, retain structural diagnostics, and require verified teardown receipts before releasing recovery state. Preserve doctor, recovery, group, and published-upgrade callers.

Validation: native sandbox regression failed before the fix; 140 harness tests pass, and 72 final focused owner/sibling tests pass in 5.73s. Build exits 0. Broad changed checks stop on two unchanged TS2459 package-update test errors. Focused lint matches all 135 baseline findings with zero additions. No live credentials or Telegram sends.

* fix(telegram): avoid native scenario barrier watchers

* fix(qa): share production publication guard contract

* fix(qa): require named message availability in mock provider

A catalog dispatcher does not advertise every delivery tool. Require the
exact message declaration and a usable invocation surface, including trusted
system/developer instruction carriers. Finish with the recovered child result
when message is absent.

Prove the absent-message regression through the mock HTTP provider and retain
catalog delivery, namespace, text-only fanout, and subagent handoff coverage.

* fix(qa): pass checkout roots to script scenarios

Expand the selected repoRoot separately from each scenario outputDir in the
maintained test-file runner. Prove the argument and CWD contract through a
real subprocess with external artifacts and fresh passing producer evidence.

* fix(qa): distinguish tool declarations from instruction prose

* fix(qa): bind forked-context evidence to native receipts

* fix(qa): bind repeated-ingress MCP scheduler

* fix(qa): add owned provider continuation checkpoints

Let maintained mock scenarios hold one session continuation before response
bytes and observe its request cursor and tool-call identity. Reuse the
provider request log and scenario signal/shutdown lifecycle; replacement
requests proceed normally without touching Gateway decision state.

* fix(qa): keep harness proofs within their owners

* test(qa): exclude all registered runtime consumers

* fix(qa): preserve runtime inputs and enforce checkpoint launches

* test(qa): skip runtime proofs when tools are absent

* fix(qa): complete checkpoint launcher test admission

* test(qa): compile repeated ingress child before execution

* refactor(test): share caller-mode migration fixtures (#160714)

Co-authored-by: Vincent Koc <[email protected]>

* fix(ui): keep acknowledged session renames visible during reconciliation (#160579)

A label-only sessions.patch never resolved a pending row target or
published a field receipt, so the acknowledged rename was ignored until a
sessions.changed event or a post-commit sessions.list arrived. Closing the
title editor therefore showed the old name again after the Gateway had
committed the new one. With a slow roster read in flight and the change
event delayed, a real Gateway showed the old title for about one second
after the ack.

Route labels through the existing patch receipt owner: resolve the pending
conversation for label patches, project entry.label from the committed
receipt, and type it in the UI patch result. The receipt carries the
existing connection, agent, session-generation, updatedAt and read-cutoff
fences, so a roster read started before the rename cannot replace it while
newer Gateway snapshots still win.

The earlier permanent revert seen in the rename-composition probe was a
mock artifact: it answered a post-commit list with pre-commit rows and no
snapshotAt. On a real Gateway the event and post-commit list carry newer
snapshotAt clocks and eventually restore the name; the defect was the
visible revert window, not a lasting loss.

* fix(scripts): accept the CI workflow's fail-fast expression in admin landing (#160721)

* fix(ui): restore the alternating Talk, Send, and Stop button (#160725)

Worked on by:
- @vyctorbrzezowski


OpenClaw-Publication: 9ef95dec-f3a2-4939-9bee-d50cc60bc93d

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(cron): named-session jobs run in the wrong workspace (#159444)

* fix(cron): named-session jobs run in the wrong workspace

Use saved session workspace and cwd bindings for explicit named-session jobs,
retain their managed worktree lease, and preserve workspace context and
restrictions across persistent rollover without changing detached runs.

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(cron): named-session jobs run in the wrong workspace

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 85b73558-d465-449a-8257-0d87d3c1ccf8

* fix(cron): prevent cross-session scheduled file access

Bind requester-scheduled saved-workspace access to the authenticated owning
conversation while preserving trusted operator targeting. Prove the path
from creator tool grants through stored jobs and scheduling to real file I/O,
including foreign and archived-session rejection.

Correct mismatched session-key fixtures and make the outbound retry fixture
use the runner session reader and canonical delivery-plan owner.

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(cron): reject mismatched worktree owners

Apply the existing session-worktree owner invariant to the already-read registry record, before and after lease acquisition. Prove valid leases and rejected foreign-session or manual-owner bindings through real registry rows, Git worktrees, and final coding-tool file reads.

Co-authored-by: vyctorbrzezowski <[email protected]>

---------

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(ui): show the exact command to approve an admin access request (#160685)

* fix(ui): show exact scope approval command

Include the pending request ID in the Limited access approval instructions. The former openclaw devices command only printed help; render openclaw devices approve with the current request ID and align the connection documentation without changing scope or pairing policy.

Proof: real read-only browser requested admin, rendered the actual pending ID, and reconnected with admin scopes 981ms after CLI approval. Denial, expiry, and retry were also exercised. The new regression fails before the fix; sidebar tests pass (9 tests, 3.74s wall). Combined changed checks and UI build pass remotely. Local formatting hooks are replaced by completed remote gates; both private staged-content scans pass.

* test(ui): assert the exact scope approval command in the live e2e

Co-authored-by: Peter Steinberger <[email protected]>

* fix: worker turns fail on older session-host nodes after the Gateway adds a worker tool (#160147)

* fix(gateway): keep worker turns working on session hosts that predate new worker tools

A Gateway built from main added the `presence` worker session tool, and
every worker-turn launch to a published [email protected] session-host
node failed with `INVALID_REQUEST: invalid worker launch descriptor`
followed by `node worker cancellation timed out`. The installed node
supervisor validates `toolAuthority.allowedToolNames` against a closed
vocabulary, and bundle refresh does not replace the supervisor.

The Gateway now negotiates the launch vocabulary per node, following the
existing capability pattern: it advertises
`node-worker-launch-tool-names-v1`, updated nodes declare
`workerHost.launchToolNames` only to Gateways that advertise it, and the
Gateway treats an absent declaration as the frozen 2026.9.6 vocabulary.
Tool authority filters the projected tool set by the destination
vocabulary, so turn authorization and the launch descriptor stay
identical. Unknown declared names are ignored, so future worker tools
need no further capability.

Update behavior: Gateway-first updates keep older nodes hosting turns
without newer tools (one info log names them); node-first updates keep
the declaration unchanged for older Gateways; updated pairs get presence.

* fix(scripts): add worker tool authority to the PR wrapper inventory

src/infra/node-runner-inventory.ts is in the trusted-anchor PR wrapper's runtime import closure and now imports src/worker/tool-authority.ts for launch tool-name negotiation; the extracted wrapper could not resolve it.

* test(gateway): await the shared async node tunnel manager fixture

Main moved createManager into node-worker-tunnel.test-support.ts as an async helper (#160415); the launch-vocabulary lifecycle test still called it synchronously.

* fix(node-host): updates never install on Bun-only macOS and Linux hosts (#160575)

* fix(node-host): prepare updates on Bun-only POSIX hosts

Read exact registry manifests and stream SHA-512-verified archives in process, then use shared Bun staging inside the private node runtime generation. Preserve npm preparation on Node and Windows, including existing schema and candidate checks.

Cover Bun preparation, private bins, retained generations, invalid registry archives, loopback discovery, and Windows npm selection. Remove the Linux smoke blocker and document the remaining Windows limitation.

* refactor(update): share registry package document reads

Consolidate registry URL construction, HTTP fetching, JSON consumption, deadlines, and response cleanup for update discovery and node runtime preparation. Preserve caller metadata mapping, HTTP error strings, diagnostic labels, and body timeout policies.

Remove the redundant registry status wrapper and share the existing discovery error return. This removes 25 production lines without changing preparation or its regression tests.

* fix(node-host): skip npm freshness probing for Bun preparation

* fix(node-host): create the private Bun node_modules root before staging

* fix(node-host): seed the private Bun global project manifest

* fix(node-host): skip Node engine checks for candidates run on Bun

* docs(bun): link node update preparation history row

* refactor(node-host): move registry archive reads out of install-source-utils

install-source-utils sits under plugin install owners; importing the shared
registry document reader from it closed an import cycle through the provider
and plugin metadata graph. The in-process manifest and archive reads now live
in a leaf module that only the node host imports.

* test(telegram): join webhook drain before near-limit assertions (#160588)

The near-limit webhook tests polled handleUpdate for vi.waitFor's default
1 s after the 200. That response only proves durable admission; dispatch
still reads the ~1 MB row back through the SQLite worker, decodes and
inspects it, so a loaded 2-core shard can deliver after the budget and
fail with an empty update list. Join the ingress monitor's idle
settlement instead, like the sibling spool tests.

* fix(cloud-workers): retain bundles through provisioning (#160730)

Defer node bundle pruning while provisioning has not published its durable bootstrap receipt. Coalesced maintenance snapshots must not acknowledge and remove a newly installed bundle before readiness records ownership.

Add an install, Gateway retention, and worker entry resolution regression that reproduces ENOENT on the previous code. Workspace retention and existing bundle protocol contracts remain unchanged.

* fix(ci): pack hybrid hourly tooling within the row cap

Use the existing hosted retry file packing for hybrid tooling so an
indivisible file can share its spare worker without increasing its price.
The exact hourly hybrid plan drops from 80 total rows to 78, within the
unchanged 77 Node plus two dist limit. GitHub remains at 76 total rows.

Add the hybrid hourly cap regression and retain the GitHub ownership and
cap assertions. Preserve the complete file/config/environment inventory,
release descriptors, timing weights, runner policy, and worker limits.

Validation: 26,658 tooling tests and all test types passed on Linux
Testbox; script types and lint passed there. The connection ended after
those gates, so final root-test lint and format checks passed locally.
The integration file passed all 10 cases locally. P2 autoreview is clean.

* test(gateway): keep d080 scoped to six gateway shards (#160115)

Replay t0001, t0010, t0005, t0009, t0008, and t0007 on current main; preserve Gateway review repairs. Sessions, agents, infra, and cron shards moved to d088.

Retain accepted-input ownership and hook session/account idempotency coverage. Preserve newer worker-placement reconciliation expectations. No production behavior changes.

* fix: streamed replies split Markdown tables that fit one message (#160701)

Related: #160668 (fixes the fitting-table case; renderer-valid continuations for tables longer than `maxChars` are out of scope here, so the issue stays open for that part)

## What Problem This Solves

Fixes: with block streaming on (Discord defaults: 800/1200, paragraph), a reply containing a Markdown table that fits in one chunk gets split mid-table, so the channel renders the first part as a code table and posts the remaining rows as raw `| ... |` Markdown.

## User Impact

Streamed replies with a table that fits the chunk limit now arrive with the whole table rendered consistently. Tables larger than `maxChars` still split at row boundaries.

## Why This Change Was Made

The block chunker already refuses to break inside fenced code, but it had no idea about tables: once the buffer passed `minChars`, the last newline inside a still-streaming table was a valid break. The chunker now treats a table that fits in `maxChars` the way it treats a fence when choosing a break:

- Table ranges come from the same markdown-it table grammar the renderers use (`findMarkdownTableRanges` in markdown-core), so single-dash delimiters, single-column tables, rows without edge pipes, quoted tables and tables inside code fences behave like they render.
- While streaming, a table stays open until a full line follows it, so the unfinished line after it (even a bare `> `) may still become a row. Whether a table fits is decided by its parsed rows only, so an unfinished heading after it can't cost it that protection. A trailing header line waiting for its delimiter row is kept whole too. Other lines with pipes aren't protected, so prose containing `|` still streams at its normal newline breaks.
- If the buffer reaches `maxChars` inside a table that fits, the chunker breaks before the table (below `minChars` if it has to), not inside it.
- A table longer than `maxChars` isn't protected, so it still splits at row boundaries as before. Its headerless continuation still renders raw, as on main.
- If a streaming table that starts the chunk exactly fills `maxChars`, the chunker waits only until the next line starts; the final flush also ends the wait. Once the next line starts, the table is emitted whole at the cap, or split at row boundaries if it has grown. The size check counts row trailing spaces, so no chunk can exceed `maxChars`.

Fences, paragraph and newline breaks outside tables, source-range accounting and the forced final flush are unchanged. `src/auto-reply/chunk.ts` now names `FenceSpan` directly because `findFenceSpanAt` is generic over start/end spans.

Earlier attempts (#66344, #66568, #66557, #73981) were closed unmerged. This one is different:
- It uses the renderer's own parser, not a new regex table detector. That covers the repeated review notes about `-{3,}` delimiters, single-column tables, rows without edge pipes and pipes inside code.
- It keeps a streaming table open until a blank line arrives, not until the current buffer tail, which was the P1 in #66344 and #66568.
- Breaks at the table's own edges stay allowed. Only breaks inside a table that fits are refused.
- There's no import cycle through `chunk.ts`, it targets the current `embedded-agent-block-chunker.ts`, and it doesn't add a second limit model: `maxChars` stays the only cap.

Thanks @giodl73-repo for the fresh reproduction.

## Evidence

**Real Gateway, Discord plugin against a Crabline mock of the Discord API, frozen base `3775359a` vs this branch.** The mock model streamed the issue's reply over OpenAI Responses: intro, a 28-row table (983 chars in total), and a closing line, in 17-char deltas. Discord used its native chunking with `streaming.block.enabled: true`. The captured payloads are the `POST /channels/<dm>/messages` bodies:

- Base, Discord default coalescing: message 0 is the intro plus a code table R01–R11. Message 1 is a code table R12–R24 followed by a raw `| R25 | North | 1124 | 2224 |`. Message 2 is raw rows R26–R28 plus the outro.
- Base, coalescing off: block 1 is a code table R01–R24; block 2, 1.2 s later, is raw R25–R28 plus the outro.
- This branch, both coalescing settings: every row R01–R28 is inside code tables. The table only splits at Discord's own 17-line message cap, which reopens the fence. The outro is a separate block, and there are no raw rows.
- Rerun on head `2b3ec27a` with default coalescing: 3 messages, every row inside code tables, no raw rows.
- Oversized control (60 rows, 1943 chars; also rerun on `2b3ec27a`): both base and this branch split cleanly at a row boundary. The headerless continuation still renders raw on both, which is existing behaviour for tables longer than `maxChars`.

**Focused tests**
- The new `EmbeddedBlockChunker > Markdown tables` cases cover a short intro, a blockquote table, a break before the table when the intro leaves no room, and a table exactly `maxChars` long, each at 1/17/43-char deltas. All four fail on base (they get `822,160`-style splits) and pass here. The oversized-table controls (60 rows, and a table whose trailing spaces push it past the cap, streamed and flushed at once) check that every chunk stays within `maxChars` and splits only at row boundaries. They pass on both base and here. The trailing-space control fails if the size check ignores trailing spaces. Two more cases cover the provisional-span edges. Prose lines containing `|` chunk exactly like the same text without pipes, and a table exactly `maxChars` long is emitted as soon as the next line starts even while whitespace keeps streaming. Both fail on the previous revision of this branch. A further case sends an intro, a table exactly `maxChars` long and a directly following `# heading` in one delta as well as streamed. It yields intro, table, heading, and it failed on the revision before this one. The nine new cases take about 2.3 s in total locally; each 1-char cap-edge case takes about 0.45–0.5 s.
- `embedded-agent-block-chunker`, `block-reply-flushing`, `chunking-fences`, `final-answer-delivery`, `text-end-reconciliation`, `btw`, `auto-reply/chunk`, `markdown-core` `tables` and `fences` all pass.
- A chunker probe over 13 table shapes × 5 delta sizes (no-edge-pipe rows, single column, quoted, fenced, newline/sentence preference, `flushOnParagraph`, `minChars: 1`, two tables, prose with pipes) found no split fitting table, no chunk over `maxChars`, and unchanged source coverage.

Pash/Sarah check: #150407 touched `docs/concepts/streaming.md`, but only the Slack progress section. There's no other overlap, and Slack compact progress is unaffected.

Co-authored-by: Ayaan Zaidi <[email protected]>

* improve(ui): compact Online people activity rows (#160140)

* improve(ui): compact Online people activity rows

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 0fdf9bc8-f33a-4798-ab8a-92330e30bae2

* improve(ui): clarify Online presence and workload text

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: a45e213a-610b-4632-9cb7-58e9586b75f1

* test(ui): wait for roster hydration before sidebar assertions

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: e35d4d74-12f7-4b00-9fa9-17a2fd9355c0

* test(ui): await split startup request before counting

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: c33e14bd-a4ce-4715-98cd-922eace93d41

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @VACInc
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: VACInc <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: b5a493a6-aefd-468b-9f44-a48b89ebff00

* improve(ui): list people with running sessions first in each presence group

* improve(ui): align the Online open-sessions icon with the running spinner

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: VACInc <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>

* chore(ui): refresh control ui locales (#160753)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: dashboards require approval after native app authentication (#159860)

* fix: dashboards require approval after native app authentication

* fix: register native auth test entries and remove the client type cycle

* fix: recover native dashboard auth on older WebViews and reconnects

* fix: preserve native dashboard auth across current app paths

* fix(ci): use idle hosted tooling workers during overflow

* fix(ci): preserve oversized tooling refusal

* test: load first-hop helpers in the survivor fixture

* test(macos): wire conversation auth fixture and tokenless route

---------

Co-authored-by: Peter Steinberger <[email protected]>

* fix(onboarding): stop claiming inference is ready after Skip for now (#160713)

* fix(onboarding): distinguish local setup from verified inference

Use a provisioning-specific summary title so Skip for now does not claim that inference is ready. Preserve the separate successful verification message and existing skip behavior.

* fix(onboarding): translate the local setup summary title

Co-authored-by: Peter Steinberger <[email protected]>

* feat(plugins): show installed accounts and credential status (#160092)

* prototype(plugins): show per-plugin auth alerts from live MCP checks

Place the shared alert beneath the individual plugin hero on main 018639af3b54. Read a real Notion HTTP OAuth challenge and use a Notion-specific read-only account probe for the local stdio server. Keep the app inventory isolated and the prototype out of production imports.

* prototype(plugins): simplify auth alerts to one line

* feat(plugins): connect detail auth alerts to MCP OAuth

* fix(plugins): align auth alert with the main content column

* feat(plugins): show installed accounts and credential sections

* fix(plugins): use the supported credential projection copy

* feat(plugins): simplify setup states and retain edit actions

* fix(plugins): reuse MCP ownership across inspections

* fix(plugins): keep MCP cache types in the metadata owner

* test(plugins): preserve real install failure classification in fixtures

* fix(ui): let channel setups run back to back (#160705)

* fix(ui): release channel setup sessions before retrying

Close wizard input without aborting committed work, and wait for same-client cancellation settlement before starting a replacement wizard.

Two regressions fail before their respective fixes. Real Gateway and Chromium proof on an isolated Blacksmith Testbox passes 50 cancel/restart cases across Telegram, Discord, Slack, and WhatsApp. Focused controller tests and the campaign-base changed-file gate pass. No local builds or tests; no autoreview per task instructions.

* fix(ui): bound channel wizard cancellation before replacement starts

A replacement wizard start waits for the previous wizard.cancel to settle.
Route that cancel through the same request ceiling as wizard.start so a
stalled Gateway response cannot block later setups indefinitely. Split the
cancellation cases into their own suite with shared fixtures to stay under
the test line cap.

The stalled-cancellation regression times out before the fix and passes
after on a Blacksmith Testbox; the controller suites pass 19/19.

* test(ui): keep channel label fixtures in the controller suite

Co-authored-by: Peter Steinberger <[email protected]>

* perf(cron): narrow delivery-target session reads (#160216)

* perf(cron): narrow delivery-target session reads

* fix(ci): keep plugin retention proof on Node

* fix(slack): progress card links open the visible work session instead of the main session (#160088)

* fix(slack): link finished progress cards to the visible work session

Slack progress cards linked "Open in OpenClaw" to the conversation's main
session even when the turn spawned a visible work session, so operators on
groupScope "main" landed on /chat/<agent> instead of the child doing the work.

Carry the child's canonical URL from its producer: accepted visible spawn
receipts keep sessionUrl and label across the embedded, Codex app-server,
and CLI runners; the settled run reports them once through a new optional
GetReplyOptions.onVisibleWorkSessions before final delivery; Slack's native
task card and Block Kit card render "Open work session" for one child,
labeled links in acceptance order (max five) for several, and keep the
conversation link when none was spawned. No request-time session discovery.

To satisfy the line-cap ratchet, the visible-spawn TypeBox schema moves to
sessions-spawn-visible.schema.ts and the new cases live in sibling test
files with shared test-support fixtures.

* fix(slack): match only generated session-link action IDs

The link-only acknowledgement matched any action_id starting with
openclaw:session_link, so an unrelated button such as openclaw:session_linked
was acknowledged and dropped instead of reaching plugin or agent dispatch.
Accept only the bare ID or a numeric suffix, as the renderer emits.

* test(ci): accept measured command ceilings beside startup health

The PR's 771st database-worker file changes compact placement and exposes a
contradiction: capacity checks accept measured command groups' two-worker
ceiling, but the startup-health sibling check expected no ceiling.

Share the complete measured-generation lookup between both assertions and
recognize the existing command policy without changing planner, packing,
worker, or job-level policies. Move the unchanged tooling placement helpers
to the sibling support module, reducing the test's counted lines from 7536
to 7524.

* fix(ui): keep Inbox empty-state heading larger than description (#160724)

* fix(ui): keep Inbox empty-state heading larger than description

Set both empty-state text sizes explicitly with the existing text-scale tokens.

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(ui): keep Inbox empty-state heading larger than description

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 69c70083-4f66-4e3b-a051-5642b6ead90e

* fix(ui): separate Inbox empty-state icon from its text

Use 16px between the icon and heading, and 4px between the heading and description.

Co-authored-by: vyctorbrzezowski <[email protected]>

---------

Co-authored-by: vyctorbrzezowski <[email protected]>

* feat: speak with Gemini 3.8 Flash TTS (#157331)

Add opt-in Gemini 3.8 Flash and Flash-Lite TTS in the existing Google speech plugin.

Keep the implicit Gemini 3.1 default and older GenerateContent path unchanged. Send Gemini 3.8 transcript text separately from delivery style and structured speaker metadata through stateless Interactions requests, then reuse the existing PCM, WAV, and voice-note outputs.

Preserve the shared Google auth and response helpers, document the model-specific prompting behavior, and cover speaker/no-speaker requests, transcript handling, model selection, and audio output.

Co-authored-by: IWhatsskill <[email protected]>

* fix(gateway): size bootstrap artifact transfer lifetime from its operation window (#160687)

Bootstrap artifact capabilities used a fixed ten-minute backstop while the owning operation could remain authorized for 45-95 minutes. Slow tunnel downloads were cut off mid-body at 600,000 ms, and every retry received an opaque 404.

Derive the transfer lifetime from the existing size-based bootstrap operation owner. Preserve live enrollment and operation revocation, three serial serves, busy exclusivity, and opaque rejection. Cover the streaming deadlines and revocation with fake time, and update the troubleshooting lifetime clause.

* fix(ui): preserve focus when onboarding suggestions arrive (#160677)

Do not move keyboard focus from the composer or another control when an asynchronous recommended option arrives. Preserve initial autofocus and selection within the option card.

Regression cases fail before the fix for focused textareas and buttons. Real isolated Gateway proof retains the full draft and avoids an unintended Talk to my agent handoff. Option-card and custodian-page tests pass, with final option-card checks at 3.01 seconds. Remote changed checks pass against c377d7ca822.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(browser): Windows version probe pushes the env-var count over budget (#160756)

#160432 passed the Windows browser path to its leaf PowerShell child
under a new OPENCLAW_BROWSER_VERSION_PROBE_PATH name the env-var budget
never recorded, so check:env-var-count (and every local check:changed
run touching src, packages, or extensions) fails on main at 477/476.

Reuse the documented OPENCLAW_BROWSER_EXECUTABLE_PATH for that child-only
channel: it holds exactly the browser executable path, the override lives
only in the spawned powershell.exe environment, and the path still
reaches PowerShell as $env: data, never script text.

* fix(e2e): stage candidate providers for legacy-operator survivor lanes

Legacy published baselines (2026.7.35, 2026.6.34) author plugins.allow from
their bundled provider inventory. The candidate's doctor restores those
now-external providers at the exact candidate version, which does not exist
on npm or ClawHub before publication, so the prepublish registry must carry
them. Stage every official provider from the selected candidate's external
provider catalog for legacy-operator-state lanes, loaded once per plan.

* fix(ci): planner ownership census times out on loaded runners (#160586)

* perf(ci): scan wide import-graph frontiers in one pass

The PR-exempt ownership census plans a PR that edits all 906 PR-exempt
test files. Its consumer check sends ~2,700 terms through the wide native
reader path over ~42.5k tracked files. #160531 and #160517 each added a
match-before-parse filter, so that path spawned one reader child to match
every file and a second to re-read and parse the 2,136 matches.
readImportGraphEdges already requests matchingOnly, so drop the extra
pass: one child matches, parses only uncached matches, and still leaves
nonmatches uncached.

Build the Aho-Corasick automaton as a dense Int32Array over the UTF-16
code units the terms use, completing failure rows breadth-first, so the
scan takes one table load per code unit instead of Map lookups and
failure walks. Files with no match skip projecting every requested term.
Matching semantics, reference checks, and ordering are unchanged.

For the real 906-file request, reader output is byte-identical. Reader
CPU fell from ~12.1s over two passes to ~5.9s. Inside the Vitest worker
the census case's reader cost fell from 16.5s to 8.8s, and the case from
39.1s to 30.4s on a comparably loaded host. Timeout, assertions, and file
coverage are unchanged.

* perf(ci): bound term-matcher rows to the ASCII alphabet

Search terms come from tracked paths, which have no character-diversity
bound. One dense column per distinct UTF-16 unit could therefore grow the
transition table by nodes x alphabet on Unicode-heavy frontiers.

Keep dense Int32Array rows only for the ASCII units the terms use, at most
129 columns per node, and route other term units through sparse per-node
edges with the classic failure walk. Size the table once to its node upper
bound so it never reallocates; only rows of real nodes are written. Fold
isReferenceCharacter into an equivalent character-class test, which is
exhaustively equal for every UTF-16 unit and NaN.

The matcher contract fixture gains terms whose failure links cross dense
and sparse edges. A 24,000-case randomized differential against main's
matcher and a String.includes oracle shows no differences, and reader
output for the 906-file census request stays byte-identical.

* fix: disable plugin Connect when gateway OAuth is unavailable (#160761)

* fix(e2e): size upgrade-survivor Gateway readiness for saturated runners

Release Checks 36479006821 saw both the published 2026.9.6 baseline and the
2026.9.7 candidate bind HTTP after 56-58 s and miss the fixed 90 s readiness
window on saturated runners, while the same phases pass in 36-41 s on idle
ones. Raise the default startup budget to 300 s and make the readiness wait
honor the configured budget instead of a hardcoded 360 polls, so the
OPENCLAW_UPGRADE_SURVIVOR_START_BUDGET_SECONDS override actually extends it.

* fix(agents): reuse admitted plugin registry (#160658)

Reuse the plugin registry already admitted for unchanged agent turns instead of acquiring another captured registry. Keep selected-owner coverage, model-catalog scoping, cleanup and retirement with their existing lifecycle owners.

Add real-loader regression coverage for synchronous and inspection reuse, missing owners, catalog isolation and shutdown cleanup. Production LOC remains net zero.

Exact-head CI passed (run 36474645681); fresh autoreview is clean. Installed Linux parent/head evidence removes duplicate registration; full Windows reporter confirmation remains outstanding.

Fixes #160572. Thanks to @ekinnee for the focused repair, @oxen-horse for the report, and @steipete, @RomneyDa and @vincentkoc for the earlier work and evidence in #158369 and #150915.

Co-authored-by: IWhatsskill <[email protected]>
Co-authored-by: Patrick-Erichsen <[email protected]>

* fix: SQLite workers fail when running OpenClaw from source under Bun on Windows (#160310)

* fix(infra): keep Node's tsx loader away from Bun SQLite workers

Running OpenClaw from source under Bun, the SQLite worker broker started
every .ts worker with `--import <tsx/esm file: URL>` and asked it to
register tsx's loader API, regardless of runtime. Bun runs TypeScript
natively and resolves a file: preload by stripping "file://", so on
Windows `file:///C:/.../tsx/dist/esm/index.mjs` became `/C:/...` and the
worker failed with "preload not found" (device-token persistence broke).

runtime-worker-url already owns this decision for other workers. Extract
runtimeNeedsTypeScriptLoader from it, route the broker's worker execArgv
through resolveRuntimeWorkerThreadExecArgv, and only send the source
loader URL when the runtime needs it. Node keeps tsx for source workers.

* test(infra): keep Node's loader for simulated-Bun SQLite workers

bun-sqlite-library.worker.test.ts overrides process.versions.bun to
exercise Bun SQLite library selection, but its SQLite workers are real
Node worker_threads. Now that the broker omits tsx on Bun, those workers
could not load their TypeScript carrier. Mock the runtime-worker-url
loader decisions in this test to answer for a Node executable, which
restores its previous broker behavior.

* fix(http): adapt rejection transport to Bun's Node-compatible closure (#160329)

Detect Bun's native HTTP destroySoon override introduced by upstream #43557
and use the shared ordered half-close path while retaining native response
completion for older Bun transports. Version labels cannot distinguish the
pre-sync and post-sync canaries.

Wait for queued HEAD socket assignment on Bun without finish diagnostics,
then flush through the response callback to avoid Bun's dispatcher socket
cork. Preserve Node's existing ordering and transport operations. Update SDK
rejection documentation; retain all existing wire-level regression cases.

Validation: 31/31 lifecycle tests on Node 24.21.0, stock Bun 1.4.2, pre-sync
and post-sync Bun forks, and the finish-diagnostics build. Core and infra
test typechecks, scoped oxlint, oxfmt, assertion-safety ratchet, and diff
whitespace checks pass. No tests or dependencies added.

* chore(ui): refresh control ui locales (#160771)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(ui): open voice setup before history admission (#160686)

* fix(ui): open voice setup before history admission

The microphone remains enabled for dictation during initial history, but its
short-tap handler returned at the history submission fence before opening
unavailable capability settings. Catalog admission populated a closed picker:
two unavailable DOM rows existed, while accessible Configure menuitems were zero.

Open capability guidance before that fence. Actual Talk creation still waits
for accepted history. Keep the existing unavailable-settings unit case and
all E2E assertions; hold startup and catalog across the target's early click.
Synchronize the four other proven desktop Talk-start races with the existing
waitForTalkReady helper. Leave direct/hold dictation, explicit picker triggers,
mobile Talk and already-synchronized Talk cases unchanged. Document the behavior.

Introducing ordering: 0b52dc467b3e added the history submission fence before
picker opening; d769e31af2b9 now awaits foreground stream admission before
history/startup, exposing that window more often. Read the parent-relative
patches and the 94cbd1335df, 6b9da9dc028, f03d64f6a56 and e256cbef8ae repairs.

Probe evidence on original production 49351700f3f6:
- Hold chat.startup and talk.catalog, click Start voice input, release both,
  and await visible history: unavailable=2, Configure visible=0,
  Configure including hidden=2, picker open=null. The original toBe(2)
  assertion fails with expected +0 to be 2; 24.333s case, 197.12s wall.
- The pending-history unit variant fails with dropdown.open=false; the
  ready-history variant passes. Extend the existing unit rather than adding
  a duplicate case.
- Holding startup across the initial click also leaves talk.client.create
  absent in transcript ordering, composer voice selection and both SDP cases;
  all four controlled probes fail, while the settings-only sibling passes.

Validation:
- Four changed E2E files: three consecutive passes, 16/16 each;
  313.04s, 293.49s and 340.02s command wall including isolated UI builds.
- One-worker dictation before/after: 11/11 each; 234.65s -> 181.54s wall,
  file time 63.604s -> 48.819s, changed case 4.663s -> 3.583s.
- One-worker siblings before/after: 5/5 each; 210.09s -> 162.56s wall.
  File times: ordering 13.101s -> 7.517s, voice selection 20.346s -> 13.522s,
  SDP 13.446s -> 8.394s. These are cost samples, not a speedup claim.
- Existing full browser files exceed 30s because they exercise multiple real
  composer/media flows and screenshots; no E2E cases or timers were added.
- Composer microphone, action and catalog owners: 80/80; 85.96s wall.
- Independent Codex autoreview: scoped-clean through P2.
- pnpm tsgo:ui passed in 85.05s; ui-e2e and ui-chat test graphs passed
  in 106.07s. Targeted oxlint, oxfmt and git diff --check passed.
- Local check-changed --base origin/main passed its guards, formatting,
  graph boundary and i18n, then stopped at inherited TS2741 in
  src/gateway/session-row-projection.config-commits.test.ts:76: the fixture
  omits the required scheduler. That untouched file is already repaired by
  4bd105408cc on main. The same gateway-root typecheck passes in 69.67s on
  untouched origin/main snapshot 28340c41f8b8, materialized under this task's
  artifacts with physically cloned, identical dependencies. No unrelated
  source was changed. The full changed pipeline is not claimed green.

Release-note context: Control UI opens unavailable voice setup when the
microphone is clicked during chat startup, while preserving Talk admission.

* test(ui): rely on Talk readiness without a no-op startup hold

The sibling Talk cases held chat.startup only to release it immediately, which exercises no ordering. waitForTalkReady with the ready-history message is the synchronization, matching the landed e256cbef8ae shape.

* test(agents,channels,cli): remove low-value tests (batch d091) (#160766)

* test(heartbeat): deslop t0067 tests

* test(agents): deslop t0119 tests

* test(telegram): deslop t0118 tests

* test(discord): deslop t0121 tests

* test(agents): deslop t0120 tests

* test(state): deslop t0129 tests

* test(browser): deslop t0128 tests

* test(status): deslop t0112 tests

* test(matrix): deslop t0125 tests

* test(cli): deslop t0082 tests

* test(agents): remove unused compaction fixture exports

* improve: keep Gateway responsive while compaction loads history (#160314)

* perf(agents): hydrate compaction transcripts off thread

* test: prepare managed handoff runtime before case deadline

* test: speed up database preflight lifecycle tests (#160728)

Co-authored-by: Peter Steinberger <[email protected]>

* improve: speed up child-session lists on large rosters (#160404)

* perf(gateway): select child sessions through the parent index

* test: prepare managed handoff runtime before case deadline

* perf(nodes): reuse warm workers so node session turns start as fast as local ones (#160265)

* perf(nodes): reuse warm workers so node turns start as fast as local ones

Retain settled workers for two minutes with at most two idle children per
node. Negotiate node-worker-idle-retention-v1 across Gateway, node, and
bundle; fresh turn admission and credentials remain mandatory. Protect
background work and preserve durable process cleanup and reconciliation.

Expose reclaimable idle capacity to placement admission and the session
picker. Consolidate lifecycle helpers under the supervisor and use the
shared capacity parser. Document the bounded process-count and memory
tradeoff; include lifecycle, negotiation, and picker regression coverage.

fix(nodes): retry failed idle worker cleanup

Rearm the supervisor idle timer after a transient physical cleanup failure while retaining the durable slot and retirement fence. Cover automatic expiry and idle-limit eviction alongside explicit cleanup with a fake clock.

Fold the cancellation forwarding wrapper into its owner and remove the immediately repeated admission abort check. Preserve the existing authority, settlement, and shutdown guards.

fix(nodes): synchronize idle capacity protocol models

Regenerate the Swift worker-slot model for the optional reclaimableIdle field. The schema and named capability contract remain unchanged.

Inline the single-caller prepared workspace custody wrapper in the supervisor and move its four cases to the public launch entry point. Preserve exact acquisition, abort, shutdown, and release ordering while keeping the complete branch production delta negative.

chore(nodes): prune stale worker assertion allowance

Remove the exact one-entry assertion baseline for worker-command.runtime.ts after the unsafe assertion was eliminated. Keep the scanner and all unrelated allowances unchanged.

fix(nodes): keep supervisor dependencies on protocol owners

Import protocol parsers and types directly from their canonical leaf, including the QA fixture, and remove the redundant supervisor-control re-exports. This breaks the dependency cycle without duplicating the wire contract.

Keep the runner cancellation mock and shutdown callback asynchronous with the real Promise<void> contract, including teardown restoration.

fix(nodes): complete asynchronous cleanup contracts

Join cancellation cleanup in callers and tests while preserving parallel shutdown settlement and expected failure identity. Exclude absent cleanup owners before aggregation and keep stale-connection rejection unchanged.

Use immutable worker input, type-only journal imports, stable sorted idle projections, and receiver-bound fault injection. Remove redundant descriptor bookkeeping and finish the test lint cleanup without changing limits or suppressions.

* test(nodes): disambiguate inventory fixtures

* fix(google): keep streaming silence to Gemini 3.8 Live instead of ending the audio stream (#152844)

Keep streaming supplied silent audio frames for Gemini 3.8 Live so server-side VAD can finish the user turn. Retain existing audioStreamEnd behavior for other Google Live models. The policy remains in the Google plugin model contract and shared production bridge.

Closes #152830

Co-authored-by: IWhatsskill <[email protected]>

* fix(agentmail): allow official ClawHub channel to load (#155097)

* fix(agentmail): allow official ClawHub channel to load

* docs(agentmail): keep setup guide vendor-owned

* fix(agentmail): require API key for configured state

* fix(plugin): verify pinned digest before legacy trust

* fix(doctor): update refuses when lint warns about an unusable agent database (#160184)

Fixes `openclaw update` refusing with candidate-doctor-lint / doctor-failed when candidate Doctor lint warns about an unusable agent database, and plain `openclaw doctor --lint --json` printing a Clack warning box before its JSON report.

Doctor notes rendered to process.stdout even when machine-output mode reserved stdout, so runDoctorAgentDatabaseOperation's nonfatal "Doctor warnings" note preceded the lint JSON; in an update rehearsal the private lint worker's first stdout line failed the strict JSON parse and became a core/doctor/lint-inspection error. Notes now follow loggingState.forceConsoleToStderr: terminal-core gains a dependency-free, callback-scoped note output resolver (note-output.ts), and withConsoleLogsRoutedToStderrForJson installs one that reads the live flag at write time. Warnings stay visible on stderr. Candidate-side only; released updaters (verified against the 2026.9.6 driver) accept the clean JSON unchanged.

Proof: json-output-mode regression fails on main and passes; published [email protected] driver x candidate upgrade-survivor cell with an ownership-mismatched secondary agent DB refused before (doctor-failed) and succeeded after with the warning on stderr and the bootstrap import guard passing.

* refactor(gateway): remove duplicate artifact API scenario (#160779)

Co-authored-by: Vincent Koc <[email protected]>

* test(release): repair release-check lanes after settle, Responses body, and scheduler changes

Release-check lanes that were also red on main asserted pre-change contracts:
- subagent settle wording now says "in this batch" (#158642)
- Responses request bodies are pre-encoded bytes (#159574); decode them
  without consuming init instead of requiring string bodies
- direct experience-review calls must bind the session MCP scheduler that
  Gateway startup binds in production (#159481)
- Docker lanes pin the plain PATH `codex` CLI for the Codex harness probe
- Telegram group-policy hot reload must name every array it replaces

Landed directly from #160746 (the native publisher needs a signed merge to
bring that branch current). Focused proof: four QA suites 200/200 in 81 s on
the merged tree; the two E2E files and credentialed live paths were not run.

* fix(active-memory): recalls on claude-cli never reuse the prompt cache (#160768)

Closes #160672

## What Problem This Solves

Fixes: every Active Memory recall on the `claude-cli` runtime writes the whole OpenClaw system prompt into Claude's prompt cache again, even for two recalls of the same agent seconds apart.

## User Impact

User impact: repeated Active Memory recalls of the same agent on `claude-cli` now send a byte-identical system prompt, so the recall's first API call can read it from Claude's cache instead of paying for a 10k+ token cache write each time. Normal `claude-cli` turns are unchanged.

## Why This Change Was Made

Each recall gets a new session key (`<parent>:active-memory:<per-run hash>`) so its session entry stays unique. The Runtime line rendered that key into the system prompt, and Claude CLI receives the whole system prompt as one `appendSystemPrompt`, so the per-run key forced a full cache rewrite. The recall's session key is the only value that differed between two recalls.

One-shot CLI dispatch runs (today only Active Memory recall) now carry the Runtime facts line in their only user turn, through the same `UserPromptSubmit` context Claude CLI already uses for other per-turn facts. This reuses the existing relocatable Runtime region that Chat Completions routes already move into the first user message. The recall model still sees its agent, session, model and channel. Recall session keys, storage and cleanup are unchanged. Normal resumable CLI turns keep the Runtime line in the system prompt.

Thanks @ndakota79 for the detailed cache-counter report and cause analysis.

No overlap with Pash/Sarah changes.

## Evidence

Isolated Gateway (task-owned home, state, config, port) with agents `alpha` and `beta` on `agentRuntime: claude-cli`, Active Memory `mode: always`, and a fake `claude` executable that records the `initialize.appendSystemPrompt` and the `UserPromptSubmit` context it receives. Two `chat.send` turns on `agent:alpha:main` about 60 s apart, then one on `agent:beta:main`.

- Base (`7f0781faa67`): the two alpha recalls' system prompts differ in exactly one line:
  ```
  -Runtime: agent=alpha | session=agent:alpha:main:active-memory:e10ad4c9dc5e | ...
  +Runtime: agent=alpha | session=agent:alpha:main:active-memory:9945b3fb179b | ...
  ```
- Candidate: both alpha recalls send the same system prompt (14,210 bytes, sha256 `f7a45b89f4e84e5f…`). Each recall's user turn carries its own `Runtime: agent=alpha | session=agent:alpha:main:active-memory:<hash> | ... | channel=webchat | ...`. The candidate recall prompt equals the base recall prompt minus the Runtime line.
- Controls: the beta recall still gets its own prompt (its working directory differs) and its own `agent=beta` Runtime facts in the turn. The alpha and beta main (non-recall) turns send the same system prompt and user turn as on base, with the Runtime line still in the system prompt.
- Regression: `src/agents/cli-runner/prepare.test.ts` "keeps per-run helper session identities out of the reusable system prompt" fails on base (system prompts differ) and passes with the fix. `prepare.test.ts` (194), `cli-backend-dispatch.test.ts` (40) and `helpers.system-prompt.test.ts` (15) pass.
- Test cost: the new test runs in 136 ms. `pnpm test src/agents/cli-runner/prepare.test.ts --maxWorkers=1`: 194 passed, 83.3 s wall (Vitest 65.9 s); the same command filtered to the new test: 23.1 s wall (Vitest 5.8 s).

Not verified: a real Claude Code run. The proof checks the bytes OpenClaw sends to the CLI (the `initialize` system prompt and the `UserPromptSubmit` response); it does not show Claude Code's cache counters. The Runtime facts use the same `UserPromptSubmit` additional-context path that already carries `before_prompt_build` hook context (including Active Memory's own recalled context) on `claude-cli` turns.

Co-authored-by: Ayaan Zaidi <[email protected]>

* fix(release): retry the shipped 2026.9.6 Windows updater after its exit-13 liveness defect

Windows packaged upgrade from [email protected] to the 2026.9.7 candidate failed on Node 24 and 26.1.0 because the shipped 9.6 updater exits 13 (unsettled top-level await) before switching the install: it awaits an unreferenced 300 ms cleanup timer after cancelling the retained-runtime progress probe. 02720df7e6c5 fixes it for 2026.9.7+, but cannot repair the executing 9.6 parent, and it is intermittent on native Windows.

Classify exactly that signature (win32, exit 13, the warning, empty stdout, install still on a baseline older than 2026.9.7), retry the same update once as a user would, and only if the retry fails the same way use the existing verified direct candidate install. Both outcomes are recorded as updater fallback evidence; any other failure still fails the lane.

* perf(gateway): reuse pending narration deadlines (#160769)

Keep the existing two-second deadline while replacing pending narration text. Preserve immediate final flush, retractions, and retirement cancellation.

* refactor: remove redundant final-delivery reconciliation (#160764)

* test(e2e): align survivor startup budget expectations

The upgrade-survivor readiness default moved from 90 to 300 seconds, but three existing helper assertions still expected 90. Keep them aligned with the runner; forwarding, overrides, and explicit timeout behavior stay covered.

Reproduced the original failing case on main. Validation: 350 tests across the helper and startup-budget suites passed in 59.06 seconds, plus scoped lint, formatting, and independent review.

* docs(ios): qualify SimSlim scope in setup guide (#160784)

SimSlim also prepares the compare-mode arms of native release qualification, not only the ios-build iPhone test simulator. Follow-up to the ClawSweeper finding on #160607.

* fix(ci): scope untouched line-limit diagnostics in changed checks (#158995)

* test(channels): track the inlined Synology context builder call

#160639 (5ddcce60fabb) inlined resolveSynologyChatInboundRoute, so the
Synology inbound event now calls rt.channel.inbound.buildContext on the
same getSynologyRuntime() handle instead of resolved.rt. The caller
inventory still expected the old text and failed build-artifacts on main
and in 2026.9.7 Full Release Validation (CI 36496123315).

Update only the expected call text; the runtime provenance is unchanged.
Proof: context-builder-callers.test.ts fails 1/6 on main before, passes
6/6 after (3 s, one worker).

* fix(ci): restore Doctor plugin repair lint budget (#160715)

* docs(ci): explain why the plugin retention proof stays on Node

#160216 routed src/plugins/runtime.retention.test.ts to the unit-fast Node
partition after reproducing Bun failures. Record why in the runtime-selection
docs, beside the other GC-sensitive proofs.

Root cause, measured on Blacksmith Testbox tbx_01m3n11pjbtgfgcqv8t1jjbh4n with
pinned Bun 1.4.3-canary.1+6b9148b17 on 300ef3991158: the registry-instances
case kept a released successor registry past eight forced collections in 3/350
and 6/900 runs. In every retained case, a GCDebugging heap snapshot one task
later still held the oldest-registry control marker but no successor, and each
WeakRef then read empty. No retaining path exists, so this is collector
nondeterminism, not a product leak. Node ran 0/600.

The registry-case failure seen on openclaw/openclaw#160136 (CI run
36380533796) is a separate, already-fixed fixture defect. That run merged onto
56376753f832, before c136ec631464 (#160200) moved gc() out of promise
continuations. On Bun, that base fails the registry case 339/350 and 300ef3991158
fails it 0/550.

Routing proof on the same lease: replaying the failing core-unit-fast-2 group
(186 files, bun-compatible policy) exits 0, with all 10 retention cases in the
Node subset. The runtime-inventory guard fails without the routing entry.

* fix(ci): restore frozen planner dependency closure

Include the provider catalog and record helper added by ac59199 in frozen
tooling admission and all affected copied harnesses. Verify their bytes
through the existing closure owner. Keep child evidence isolation covered
with the child-only Codex install helper now that record-shared is common.

The original package failure reproduces locally: 93 failed and 462 passed.
Both added integrity cases fail before the closure repair. Afterward, all
555 package tests and 445 closure sibling tests pass. Independent review
is clean through P2; the full selected static check passes in 1448.701s.

Measured one-worker wall times: package 218.673s and closure siblings
267.426s. The two added integrity cases take 208ms and 202ms. No timeout,
retry, baseline, or integrity check is relaxed.

Related CI: 36494713554 and 36494667447. Separate startup assertion and
Synology caller fixes landed in 8799587 and c4845a6 and are not duplicated.
The separate macOS native reconnect failure in main CI 36492763105 remains
causally unproven and is not claimed fixed here.

* fix(security): parse gpt generation numbers in the audit tier check (#140012)

Fix security audit warnings that incorrectly classify numbered GPT-6 models as below GPT-5. Compare numeric generations in the shared model-hygiene classifier while preserving older-model warnings and Azure's legacy gpt-35-turbo naming contract.

The repair covers primary models, fallbacks, image models, and agent overrides without changing provider routing, authorization, or unknown-name advisory policy. Broader unknown-name behavior remains separate in #160580.

Fixes #139751
Thanks @holny for the fix, regression coverage, and isolated CLI evidence.

Co-authored-by: holny <[email protected]>
Co-authored-by: IWhatsskill <[email protected]>

* refactor(daemon): prune redundant Scheduler test fixtures (#160794)

Co-authored-by: Vincent Koc <[email protected]>

* fix(release): admit the provider catalog read by legacy-operator survivor planning

ac59199ad3fd made docker-e2e-plan.mts import scripts/lib/official-external-provider-catalog.json and scripts/lib/record-shared.mjs and read the candidate's provider catalog through the frozen target reader for legacy-operator-state lanes. Frozen admission hydrates only declared source paths in a no-lazy-fetch checkout, so targeted survivor dispatches failed with 'unable to read selected source (cat-file)', and the admission fixture lacked both tooling imports. Declare both files in the tooling closure and hydrate the candidate catalog for survivor lanes.

* refactor(plugins): deslop plugin runtime fifth pass (#159945)

* refactor(plugins): deslop plugin runtime fifth pass

Consolidate repeated provider, manifest, install, catalog, hook and registration projections under their existing owners. Preserve plugin loading, SDK, caching and source-security contracts.

Preserve provider wizard modelSelection preferences through registration so configured onboarding choices retain their documented model-picker behavior.

* fix(plugins): preserve build and type cleanup contracts

* fix(plugins): retain distinct public credential source types

* fix(plugins): preserve sparse catalog matching and cleanup contracts

* fix(plugins): preserve include ownership during uninstall

* fix(plugins): include request policy in PR wrapper inventory

* chore(ios): simplify store release workflow (#160791)

* perf(subagents): avoid sibling scans for registry patches (#160800)

* fix(channels): isolate Mattermost sends and retain capture owner proof (#150915)

Keep Mattermost inbound monitoring behind account startup rather than the
outbound runtime. Bind the Discord E2E fixture to its selected runtime
artifact and assert exact provider/instance identity through model selection
and rerouting, preserving late-STT, history, and cleanup fences.

The prepared-registry handoff is already on main via #160658; do not
duplicate it or retain the obsolete release-preparation ancestry.

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>

* perf(ui): stop forbidden canvas lease refresh loops (#160808)

Use granted hello scopes to admit canvas lease renewal and stop automatic retries after FORBIDDEN. Preserve read access implied by write/admin scopes and re-evaluate access on reconnect.

* fix(ui): multi-file chat sends fail late when attachments together exceed the frame limit (#160071)

* fix(ui): admit chat attachments against the chat.send frame budget

One chat.send carries every composer attachment base64-encoded in a single
WebSocket frame, but the Control UI only checked each file against the
per-attachment hello-ok.policy.attachments ceilings. Files that fit one at a
time could together exceed the frame, and the send failed late: after the
composer cleared and the whole batch was encoded, with a generic payload
error from the browser transport.

The per-send decoded budget is floor((policy.maxPayload - 256 KiB) * 3/4),
the formula the Gateway already used to clamp its advertised ceiling, now
owned by src/shared/chat-attachment-frame-budget.ts for both sides. Every
composer intake path counts staged attachments plus in-flight reads and
rejects the file that would overflow with the existing "Too large to send"
toast. handleSendChat, outbox delivery, and new-session submission …
azuretek added a commit to azuretek/nucleo that referenced this pull request Nov 24, 2026
* refactor(channels): deslop small channel plugins (#160639)

Reuse SDK parsing, normalization, timeout, status, and context contracts;
remove private forwarding layers and redundant result/type projections
across the ten small channel plugins. Preserve provider wire formats,
authorization, rate limits, chunking, and state contracts.

Keep meaningful owner-command and registration coverage at real channel
boundaries, and shrink only the affected assertion-baseline entries.

* fix(talk): speaking over the assistant does not interrupt it during forced consults (#153727)

Restore speech interruption during forced agent consults by resolving the existing provider preference independently of automatic audio responses. Preserve explicit interruption opt-out on both routing paths.

Closes #139278

Co-authored-by: JIE <[email protected]>
Co-authored-by: IWhatsskill <[email protected]>

* fix(ui): keep history rail wave while hovering its preview (#160722)

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(qa): unblock isolated harness tool and evidence checks (#160527)

* fix(qa): recognize settled subagent batches

Share requester-settle wake recognition between mock input classification and completion handling. Accept the current batch wording while retaining installed-candidate session wording and the existing provenance check.

The real catalog-only handoff spawned and completed a child on the baseline, but QA ignored its completion and timed out. Two focused regressions failed before this fix. The real handoff now passes, all 70 owner/sibling tests pass, and check-changed passes. Standalone changed-test wall times: input 3.21s; handoff 33.76s.

* fix(qa): admit canonical repository checkpoint commands

* fix(ui): stabilize Run Inspector evidence collection

Bind rendered evidence to the public run, execution, and selected decision
receipt identities. Add a shared collector that uses the component-owned
route model and a separate page, preserving the caller's Chat surface and
unsent draft through collection and later reload.

Cover exact run/execution selection, receipt cursor reload, back navigation,
wrong requested identity, missing receipt, and page cleanup in the existing
mock-Gateway Chromium harness. Document the collector and per-tab auth setup.

The regression failed on baseline before product edits because the rendered
run identity attribute was absent. Terminal R's optional assistant transcript
idempotency key is a distinct producer gap; this does not manufacture that
key, relabel historical cells, or change product appearance.

* fix(telegram): confine QA runtime and preserve readiness evidence

Run standard-library drivers through existing Python without UV inline-script virtual environments. Confine private runtime state, drain readiness pipes, retain structural diagnostics, and require verified teardown receipts before releasing recovery state. Preserve doctor, recovery, group, and published-upgrade callers.

Validation: native sandbox regression failed before the fix; 140 harness tests pass, and 72 final focused owner/sibling tests pass in 5.73s. Build exits 0. Broad changed checks stop on two unchanged TS2459 package-update test errors. Focused lint matches all 135 baseline findings with zero additions. No live credentials or Telegram sends.

* fix(telegram): avoid native scenario barrier watchers

* fix(qa): share production publication guard contract

* fix(qa): require named message availability in mock provider

A catalog dispatcher does not advertise every delivery tool. Require the
exact message declaration and a usable invocation surface, including trusted
system/developer instruction carriers. Finish with the recovered child result
when message is absent.

Prove the absent-message regression through the mock HTTP provider and retain
catalog delivery, namespace, text-only fanout, and subagent handoff coverage.

* fix(qa): pass checkout roots to script scenarios

Expand the selected repoRoot separately from each scenario outputDir in the
maintained test-file runner. Prove the argument and CWD contract through a
real subprocess with external artifacts and fresh passing producer evidence.

* fix(qa): distinguish tool declarations from instruction prose

* fix(qa): bind forked-context evidence to native receipts

* fix(qa): bind repeated-ingress MCP scheduler

* fix(qa): add owned provider continuation checkpoints

Let maintained mock scenarios hold one session continuation before response
bytes and observe its request cursor and tool-call identity. Reuse the
provider request log and scenario signal/shutdown lifecycle; replacement
requests proceed normally without touching Gateway decision state.

* fix(qa): keep harness proofs within their owners

* test(qa): exclude all registered runtime consumers

* fix(qa): preserve runtime inputs and enforce checkpoint launches

* test(qa): skip runtime proofs when tools are absent

* fix(qa): complete checkpoint launcher test admission

* test(qa): compile repeated ingress child before execution

* refactor(test): share caller-mode migration fixtures (#160714)

Co-authored-by: Vincent Koc <[email protected]>

* fix(ui): keep acknowledged session renames visible during reconciliation (#160579)

A label-only sessions.patch never resolved a pending row target or
published a field receipt, so the acknowledged rename was ignored until a
sessions.changed event or a post-commit sessions.list arrived. Closing the
title editor therefore showed the old name again after the Gateway had
committed the new one. With a slow roster read in flight and the change
event delayed, a real Gateway showed the old title for about one second
after the ack.

Route labels through the existing patch receipt owner: resolve the pending
conversation for label patches, project entry.label from the committed
receipt, and type it in the UI patch result. The receipt carries the
existing connection, agent, session-generation, updatedAt and read-cutoff
fences, so a roster read started before the rename cannot replace it while
newer Gateway snapshots still win.

The earlier permanent revert seen in the rename-composition probe was a
mock artifact: it answered a post-commit list with pre-commit rows and no
snapshotAt. On a real Gateway the event and post-commit list carry newer
snapshotAt clocks and eventually restore the name; the defect was the
visible revert window, not a lasting loss.

* fix(scripts): accept the CI workflow's fail-fast expression in admin landing (#160721)

* fix(ui): restore the alternating Talk, Send, and Stop button (#160725)

Worked on by:
- @vyctorbrzezowski


OpenClaw-Publication: 9ef95dec-f3a2-4939-9bee-d50cc60bc93d

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(cron): named-session jobs run in the wrong workspace (#159444)

* fix(cron): named-session jobs run in the wrong workspace

Use saved session workspace and cwd bindings for explicit named-session jobs,
retain their managed worktree lease, and preserve workspace context and
restrictions across persistent rollover without changing detached runs.

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(cron): named-session jobs run in the wrong workspace

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 85b73558-d465-449a-8257-0d87d3c1ccf8

* fix(cron): prevent cross-session scheduled file access

Bind requester-scheduled saved-workspace access to the authenticated owning
conversation while preserving trusted operator targeting. Prove the path
from creator tool grants through stored jobs and scheduling to real file I/O,
including foreign and archived-session rejection.

Correct mismatched session-key fixtures and make the outbound retry fixture
use the runner session reader and canonical delivery-plan owner.

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(cron): reject mismatched worktree owners

Apply the existing session-worktree owner invariant to the already-read registry record, before and after lease acquisition. Prove valid leases and rejected foreign-session or manual-owner bindings through real registry rows, Git worktrees, and final coding-tool file reads.

Co-authored-by: vyctorbrzezowski <[email protected]>

---------

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(ui): show the exact command to approve an admin access request (#160685)

* fix(ui): show exact scope approval command

Include the pending request ID in the Limited access approval instructions. The former openclaw devices command only printed help; render openclaw devices approve with the current request ID and align the connection documentation without changing scope or pairing policy.

Proof: real read-only browser requested admin, rendered the actual pending ID, and reconnected with admin scopes 981ms after CLI approval. Denial, expiry, and retry were also exercised. The new regression fails before the fix; sidebar tests pass (9 tests, 3.74s wall). Combined changed checks and UI build pass remotely. Local formatting hooks are replaced by completed remote gates; both private staged-content scans pass.

* test(ui): assert the exact scope approval command in the live e2e

Co-authored-by: Peter Steinberger <[email protected]>

* fix: worker turns fail on older session-host nodes after the Gateway adds a worker tool (#160147)

* fix(gateway): keep worker turns working on session hosts that predate new worker tools

A Gateway built from main added the `presence` worker session tool, and
every worker-turn launch to a published [email protected] session-host
node failed with `INVALID_REQUEST: invalid worker launch descriptor`
followed by `node worker cancellation timed out`. The installed node
supervisor validates `toolAuthority.allowedToolNames` against a closed
vocabulary, and bundle refresh does not replace the supervisor.

The Gateway now negotiates the launch vocabulary per node, following the
existing capability pattern: it advertises
`node-worker-launch-tool-names-v1`, updated nodes declare
`workerHost.launchToolNames` only to Gateways that advertise it, and the
Gateway treats an absent declaration as the frozen 2026.9.6 vocabulary.
Tool authority filters the projected tool set by the destination
vocabulary, so turn authorization and the launch descriptor stay
identical. Unknown declared names are ignored, so future worker tools
need no further capability.

Update behavior: Gateway-first updates keep older nodes hosting turns
without newer tools (one info log names them); node-first updates keep
the declaration unchanged for older Gateways; updated pairs get presence.

* fix(scripts): add worker tool authority to the PR wrapper inventory

src/infra/node-runner-inventory.ts is in the trusted-anchor PR wrapper's runtime import closure and now imports src/worker/tool-authority.ts for launch tool-name negotiation; the extracted wrapper could not resolve it.

* test(gateway): await the shared async node tunnel manager fixture

Main moved createManager into node-worker-tunnel.test-support.ts as an async helper (#160415); the launch-vocabulary lifecycle test still called it synchronously.

* fix(node-host): updates never install on Bun-only macOS and Linux hosts (#160575)

* fix(node-host): prepare updates on Bun-only POSIX hosts

Read exact registry manifests and stream SHA-512-verified archives in process, then use shared Bun staging inside the private node runtime generation. Preserve npm preparation on Node and Windows, including existing schema and candidate checks.

Cover Bun preparation, private bins, retained generations, invalid registry archives, loopback discovery, and Windows npm selection. Remove the Linux smoke blocker and document the remaining Windows limitation.

* refactor(update): share registry package document reads

Consolidate registry URL construction, HTTP fetching, JSON consumption, deadlines, and response cleanup for update discovery and node runtime preparation. Preserve caller metadata mapping, HTTP error strings, diagnostic labels, and body timeout policies.

Remove the redundant registry status wrapper and share the existing discovery error return. This removes 25 production lines without changing preparation or its regression tests.

* fix(node-host): skip npm freshness probing for Bun preparation

* fix(node-host): create the private Bun node_modules root before staging

* fix(node-host): seed the private Bun global project manifest

* fix(node-host): skip Node engine checks for candidates run on Bun

* docs(bun): link node update preparation history row

* refactor(node-host): move registry archive reads out of install-source-utils

install-source-utils sits under plugin install owners; importing the shared
registry document reader from it closed an import cycle through the provider
and plugin metadata graph. The in-process manifest and archive reads now live
in a leaf module that only the node host imports.

* test(telegram): join webhook drain before near-limit assertions (#160588)

The near-limit webhook tests polled handleUpdate for vi.waitFor's default
1 s after the 200. That response only proves durable admission; dispatch
still reads the ~1 MB row back through the SQLite worker, decodes and
inspects it, so a loaded 2-core shard can deliver after the budget and
fail with an empty update list. Join the ingress monitor's idle
settlement instead, like the sibling spool tests.

* fix(cloud-workers): retain bundles through provisioning (#160730)

Defer node bundle pruning while provisioning has not published its durable bootstrap receipt. Coalesced maintenance snapshots must not acknowledge and remove a newly installed bundle before readiness records ownership.

Add an install, Gateway retention, and worker entry resolution regression that reproduces ENOENT on the previous code. Workspace retention and existing bundle protocol contracts remain unchanged.

* fix(ci): pack hybrid hourly tooling within the row cap

Use the existing hosted retry file packing for hybrid tooling so an
indivisible file can share its spare worker without increasing its price.
The exact hourly hybrid plan drops from 80 total rows to 78, within the
unchanged 77 Node plus two dist limit. GitHub remains at 76 total rows.

Add the hybrid hourly cap regression and retain the GitHub ownership and
cap assertions. Preserve the complete file/config/environment inventory,
release descriptors, timing weights, runner policy, and worker limits.

Validation: 26,658 tooling tests and all test types passed on Linux
Testbox; script types and lint passed there. The connection ended after
those gates, so final root-test lint and format checks passed locally.
The integration file passed all 10 cases locally. P2 autoreview is clean.

* test(gateway): keep d080 scoped to six gateway shards (#160115)

Replay t0001, t0010, t0005, t0009, t0008, and t0007 on current main; preserve Gateway review repairs. Sessions, agents, infra, and cron shards moved to d088.

Retain accepted-input ownership and hook session/account idempotency coverage. Preserve newer worker-placement reconciliation expectations. No production behavior changes.

* fix: streamed replies split Markdown tables that fit one message (#160701)

Related: #160668 (fixes the fitting-table case; renderer-valid continuations for tables longer than `maxChars` are out of scope here, so the issue stays open for that part)

## What Problem This Solves

Fixes: with block streaming on (Discord defaults: 800/1200, paragraph), a reply containing a Markdown table that fits in one chunk gets split mid-table, so the channel renders the first part as a code table and posts the remaining rows as raw `| ... |` Markdown.

## User Impact

Streamed replies with a table that fits the chunk limit now arrive with the whole table rendered consistently. Tables larger than `maxChars` still split at row boundaries.

## Why This Change Was Made

The block chunker already refuses to break inside fenced code, but it had no idea about tables: once the buffer passed `minChars`, the last newline inside a still-streaming table was a valid break. The chunker now treats a table that fits in `maxChars` the way it treats a fence when choosing a break:

- Table ranges come from the same markdown-it table grammar the renderers use (`findMarkdownTableRanges` in markdown-core), so single-dash delimiters, single-column tables, rows without edge pipes, quoted tables and tables inside code fences behave like they render.
- While streaming, a table stays open until a full line follows it, so the unfinished line after it (even a bare `> `) may still become a row. Whether a table fits is decided by its parsed rows only, so an unfinished heading after it can't cost it that protection. A trailing header line waiting for its delimiter row is kept whole too. Other lines with pipes aren't protected, so prose containing `|` still streams at its normal newline breaks.
- If the buffer reaches `maxChars` inside a table that fits, the chunker breaks before the table (below `minChars` if it has to), not inside it.
- A table longer than `maxChars` isn't protected, so it still splits at row boundaries as before. Its headerless continuation still renders raw, as on main.
- If a streaming table that starts the chunk exactly fills `maxChars`, the chunker waits only until the next line starts; the final flush also ends the wait. Once the next line starts, the table is emitted whole at the cap, or split at row boundaries if it has grown. The size check counts row trailing spaces, so no chunk can exceed `maxChars`.

Fences, paragraph and newline breaks outside tables, source-range accounting and the forced final flush are unchanged. `src/auto-reply/chunk.ts` now names `FenceSpan` directly because `findFenceSpanAt` is generic over start/end spans.

Earlier attempts (#66344, #66568, #66557, #73981) were closed unmerged. This one is different:
- It uses the renderer's own parser, not a new regex table detector. That covers the repeated review notes about `-{3,}` delimiters, single-column tables, rows without edge pipes and pipes inside code.
- It keeps a streaming table open until a blank line arrives, not until the current buffer tail, which was the P1 in #66344 and #66568.
- Breaks at the table's own edges stay allowed. Only breaks inside a table that fits are refused.
- There's no import cycle through `chunk.ts`, it targets the current `embedded-agent-block-chunker.ts`, and it doesn't add a second limit model: `maxChars` stays the only cap.

Thanks @giodl73-repo for the fresh reproduction.

## Evidence

**Real Gateway, Discord plugin against a Crabline mock of the Discord API, frozen base `3775359a` vs this branch.** The mock model streamed the issue's reply over OpenAI Responses: intro, a 28-row table (983 chars in total), and a closing line, in 17-char deltas. Discord used its native chunking with `streaming.block.enabled: true`. The captured payloads are the `POST /channels/<dm>/messages` bodies:

- Base, Discord default coalescing: message 0 is the intro plus a code table R01–R11. Message 1 is a code table R12–R24 followed by a raw `| R25 | North | 1124 | 2224 |`. Message 2 is raw rows R26–R28 plus the outro.
- Base, coalescing off: block 1 is a code table R01–R24; block 2, 1.2 s later, is raw R25–R28 plus the outro.
- This branch, both coalescing settings: every row R01–R28 is inside code tables. The table only splits at Discord's own 17-line message cap, which reopens the fence. The outro is a separate block, and there are no raw rows.
- Rerun on head `2b3ec27a` with default coalescing: 3 messages, every row inside code tables, no raw rows.
- Oversized control (60 rows, 1943 chars; also rerun on `2b3ec27a`): both base and this branch split cleanly at a row boundary. The headerless continuation still renders raw on both, which is existing behaviour for tables longer than `maxChars`.

**Focused tests**
- The new `EmbeddedBlockChunker > Markdown tables` cases cover a short intro, a blockquote table, a break before the table when the intro leaves no room, and a table exactly `maxChars` long, each at 1/17/43-char deltas. All four fail on base (they get `822,160`-style splits) and pass here. The oversized-table controls (60 rows, and a table whose trailing spaces push it past the cap, streamed and flushed at once) check that every chunk stays within `maxChars` and splits only at row boundaries. They pass on both base and here. The trailing-space control fails if the size check ignores trailing spaces. Two more cases cover the provisional-span edges. Prose lines containing `|` chunk exactly like the same text without pipes, and a table exactly `maxChars` long is emitted as soon as the next line starts even while whitespace keeps streaming. Both fail on the previous revision of this branch. A further case sends an intro, a table exactly `maxChars` long and a directly following `# heading` in one delta as well as streamed. It yields intro, table, heading, and it failed on the revision before this one. The nine new cases take about 2.3 s in total locally; each 1-char cap-edge case takes about 0.45–0.5 s.
- `embedded-agent-block-chunker`, `block-reply-flushing`, `chunking-fences`, `final-answer-delivery`, `text-end-reconciliation`, `btw`, `auto-reply/chunk`, `markdown-core` `tables` and `fences` all pass.
- A chunker probe over 13 table shapes × 5 delta sizes (no-edge-pipe rows, single column, quoted, fenced, newline/sentence preference, `flushOnParagraph`, `minChars: 1`, two tables, prose with pipes) found no split fitting table, no chunk over `maxChars`, and unchanged source coverage.

Pash/Sarah check: #150407 touched `docs/concepts/streaming.md`, but only the Slack progress section. There's no other overlap, and Slack compact progress is unaffected.

Co-authored-by: Ayaan Zaidi <[email protected]>

* improve(ui): compact Online people activity rows (#160140)

* improve(ui): compact Online people activity rows

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 0fdf9bc8-f33a-4798-ab8a-92330e30bae2

* improve(ui): clarify Online presence and workload text

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: a45e213a-610b-4632-9cb7-58e9586b75f1

* test(ui): wait for roster hydration before sidebar assertions

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: e35d4d74-12f7-4b00-9fa9-17a2fd9355c0

* test(ui): await split startup request before counting

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: c33e14bd-a4ce-4715-98cd-922eace93d41

* improve(ui): compact Online people activity rows

Worked on by:
- @vyctorbrzezowski
- @VACInc
- @steipete

Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: VACInc <[email protected]>
Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: b5a493a6-aefd-468b-9f44-a48b89ebff00

* improve(ui): list people with running sessions first in each presence group

* improve(ui): align the Online open-sessions icon with the running spinner

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: VACInc <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>

* chore(ui): refresh control ui locales (#160753)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: dashboards require approval after native app authentication (#159860)

* fix: dashboards require approval after native app authentication

* fix: register native auth test entries and remove the client type cycle

* fix: recover native dashboard auth on older WebViews and reconnects

* fix: preserve native dashboard auth across current app paths

* fix(ci): use idle hosted tooling workers during overflow

* fix(ci): preserve oversized tooling refusal

* test: load first-hop helpers in the survivor fixture

* test(macos): wire conversation auth fixture and tokenless route

---------

Co-authored-by: Peter Steinberger <[email protected]>

* fix(onboarding): stop claiming inference is ready after Skip for now (#160713)

* fix(onboarding): distinguish local setup from verified inference

Use a provisioning-specific summary title so Skip for now does not claim that inference is ready. Preserve the separate successful verification message and existing skip behavior.

* fix(onboarding): translate the local setup summary title

Co-authored-by: Peter Steinberger <[email protected]>

* feat(plugins): show installed accounts and credential status (#160092)

* prototype(plugins): show per-plugin auth alerts from live MCP checks

Place the shared alert beneath the individual plugin hero on main 018639af3b54. Read a real Notion HTTP OAuth challenge and use a Notion-specific read-only account probe for the local stdio server. Keep the app inventory isolated and the prototype out of production imports.

* prototype(plugins): simplify auth alerts to one line

* feat(plugins): connect detail auth alerts to MCP OAuth

* fix(plugins): align auth alert with the main content column

* feat(plugins): show installed accounts and credential sections

* fix(plugins): use the supported credential projection copy

* feat(plugins): simplify setup states and retain edit actions

* fix(plugins): reuse MCP ownership across inspections

* fix(plugins): keep MCP cache types in the metadata owner

* test(plugins): preserve real install failure classification in fixtures

* fix(ui): let channel setups run back to back (#160705)

* fix(ui): release channel setup sessions before retrying

Close wizard input without aborting committed work, and wait for same-client cancellation settlement before starting a replacement wizard.

Two regressions fail before their respective fixes. Real Gateway and Chromium proof on an isolated Blacksmith Testbox passes 50 cancel/restart cases across Telegram, Discord, Slack, and WhatsApp. Focused controller tests and the campaign-base changed-file gate pass. No local builds or tests; no autoreview per task instructions.

* fix(ui): bound channel wizard cancellation before replacement starts

A replacement wizard start waits for the previous wizard.cancel to settle.
Route that cancel through the same request ceiling as wizard.start so a
stalled Gateway response cannot block later setups indefinitely. Split the
cancellation cases into their own suite with shared fixtures to stay under
the test line cap.

The stalled-cancellation regression times out before the fix and passes
after on a Blacksmith Testbox; the controller suites pass 19/19.

* test(ui): keep channel label fixtures in the controller suite

Co-authored-by: Peter Steinberger <[email protected]>

* perf(cron): narrow delivery-target session reads (#160216)

* perf(cron): narrow delivery-target session reads

* fix(ci): keep plugin retention proof on Node

* fix(slack): progress card links open the visible work session instead of the main session (#160088)

* fix(slack): link finished progress cards to the visible work session

Slack progress cards linked "Open in OpenClaw" to the conversation's main
session even when the turn spawned a visible work session, so operators on
groupScope "main" landed on /chat/<agent> instead of the child doing the work.

Carry the child's canonical URL from its producer: accepted visible spawn
receipts keep sessionUrl and label across the embedded, Codex app-server,
and CLI runners; the settled run reports them once through a new optional
GetReplyOptions.onVisibleWorkSessions before final delivery; Slack's native
task card and Block Kit card render "Open work session" for one child,
labeled links in acceptance order (max five) for several, and keep the
conversation link when none was spawned. No request-time session discovery.

To satisfy the line-cap ratchet, the visible-spawn TypeBox schema moves to
sessions-spawn-visible.schema.ts and the new cases live in sibling test
files with shared test-support fixtures.

* fix(slack): match only generated session-link action IDs

The link-only acknowledgement matched any action_id starting with
openclaw:session_link, so an unrelated button such as openclaw:session_linked
was acknowledged and dropped instead of reaching plugin or agent dispatch.
Accept only the bare ID or a numeric suffix, as the renderer emits.

* test(ci): accept measured command ceilings beside startup health

The PR's 771st database-worker file changes compact placement and exposes a
contradiction: capacity checks accept measured command groups' two-worker
ceiling, but the startup-health sibling check expected no ceiling.

Share the complete measured-generation lookup between both assertions and
recognize the existing command policy without changing planner, packing,
worker, or job-level policies. Move the unchanged tooling placement helpers
to the sibling support module, reducing the test's counted lines from 7536
to 7524.

* fix(ui): keep Inbox empty-state heading larger than description (#160724)

* fix(ui): keep Inbox empty-state heading larger than description

Set both empty-state text sizes explicitly with the existing text-scale tokens.

Co-authored-by: vyctorbrzezowski <[email protected]>

* fix(ui): keep Inbox empty-state heading larger than description

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 69c70083-4f66-4e3b-a051-5642b6ead90e

* fix(ui): separate Inbox empty-state icon from its text

Use 16px between the icon and heading, and 4px between the heading and description.

Co-authored-by: vyctorbrzezowski <[email protected]>

---------

Co-authored-by: vyctorbrzezowski <[email protected]>

* feat: speak with Gemini 3.8 Flash TTS (#157331)

Add opt-in Gemini 3.8 Flash and Flash-Lite TTS in the existing Google speech plugin.

Keep the implicit Gemini 3.1 default and older GenerateContent path unchanged. Send Gemini 3.8 transcript text separately from delivery style and structured speaker metadata through stateless Interactions requests, then reuse the existing PCM, WAV, and voice-note outputs.

Preserve the shared Google auth and response helpers, document the model-specific prompting behavior, and cover speaker/no-speaker requests, transcript handling, model selection, and audio output.

Co-authored-by: IWhatsskill <[email protected]>

* fix(gateway): size bootstrap artifact transfer lifetime from its operation window (#160687)

Bootstrap artifact capabilities used a fixed ten-minute backstop while the owning operation could remain authorized for 45-95 minutes. Slow tunnel downloads were cut off mid-body at 600,000 ms, and every retry received an opaque 404.

Derive the transfer lifetime from the existing size-based bootstrap operation owner. Preserve live enrollment and operation revocation, three serial serves, busy exclusivity, and opaque rejection. Cover the streaming deadlines and revocation with fake time, and update the troubleshooting lifetime clause.

* fix(ui): preserve focus when onboarding suggestions arrive (#160677)

Do not move keyboard focus from the composer or another control when an asynchronous recommended option arrives. Preserve initial autofocus and selection within the option card.

Regression cases fail before the fix for focused textareas and buttons. Real isolated Gateway proof retains the full draft and avoids an unintended Talk to my agent handoff. Option-card and custodian-page tests pass, with final option-card checks at 3.01 seconds. Remote changed checks pass against c377d7ca822.

Co-authored-by: Peter Steinberger <[email protected]>

* fix(browser): Windows version probe pushes the env-var count over budget (#160756)

#160432 passed the Windows browser path to its leaf PowerShell child
under a new OPENCLAW_BROWSER_VERSION_PROBE_PATH name the env-var budget
never recorded, so check:env-var-count (and every local check:changed
run touching src, packages, or extensions) fails on main at 477/476.

Reuse the documented OPENCLAW_BROWSER_EXECUTABLE_PATH for that child-only
channel: it holds exactly the browser executable path, the override lives
only in the spawned powershell.exe environment, and the path still
reaches PowerShell as $env: data, never script text.

* fix(e2e): stage candidate providers for legacy-operator survivor lanes

Legacy published baselines (2026.7.35, 2026.6.34) author plugins.allow from
their bundled provider inventory. The candidate's doctor restores those
now-external providers at the exact candidate version, which does not exist
on npm or ClawHub before publication, so the prepublish registry must carry
them. Stage every official provider from the selected candidate's external
provider catalog for legacy-operator-state lanes, loaded once per plan.

* fix(ci): planner ownership census times out on loaded runners (#160586)

* perf(ci): scan wide import-graph frontiers in one pass

The PR-exempt ownership census plans a PR that edits all 906 PR-exempt
test files. Its consumer check sends ~2,700 terms through the wide native
reader path over ~42.5k tracked files. #160531 and #160517 each added a
match-before-parse filter, so that path spawned one reader child to match
every file and a second to re-read and parse the 2,136 matches.
readImportGraphEdges already requests matchingOnly, so drop the extra
pass: one child matches, parses only uncached matches, and still leaves
nonmatches uncached.

Build the Aho-Corasick automaton as a dense Int32Array over the UTF-16
code units the terms use, completing failure rows breadth-first, so the
scan takes one table load per code unit instead of Map lookups and
failure walks. Files with no match skip projecting every requested term.
Matching semantics, reference checks, and ordering are unchanged.

For the real 906-file request, reader output is byte-identical. Reader
CPU fell from ~12.1s over two passes to ~5.9s. Inside the Vitest worker
the census case's reader cost fell from 16.5s to 8.8s, and the case from
39.1s to 30.4s on a comparably loaded host. Timeout, assertions, and file
coverage are unchanged.

* perf(ci): bound term-matcher rows to the ASCII alphabet

Search terms come from tracked paths, which have no character-diversity
bound. One dense column per distinct UTF-16 unit could therefore grow the
transition table by nodes x alphabet on Unicode-heavy frontiers.

Keep dense Int32Array rows only for the ASCII units the terms use, at most
129 columns per node, and route other term units through sparse per-node
edges with the classic failure walk. Size the table once to its node upper
bound so it never reallocates; only rows of real nodes are written. Fold
isReferenceCharacter into an equivalent character-class test, which is
exhaustively equal for every UTF-16 unit and NaN.

The matcher contract fixture gains terms whose failure links cross dense
and sparse edges. A 24,000-case randomized differential against main's
matcher and a String.includes oracle shows no differences, and reader
output for the 906-file census request stays byte-identical.

* fix: disable plugin Connect when gateway OAuth is unavailable (#160761)

* fix(e2e): size upgrade-survivor Gateway readiness for saturated runners

Release Checks 36479006821 saw both the published 2026.9.6 baseline and the
2026.9.7 candidate bind HTTP after 56-58 s and miss the fixed 90 s readiness
window on saturated runners, while the same phases pass in 36-41 s on idle
ones. Raise the default startup budget to 300 s and make the readiness wait
honor the configured budget instead of a hardcoded 360 polls, so the
OPENCLAW_UPGRADE_SURVIVOR_START_BUDGET_SECONDS override actually extends it.

* fix(agents): reuse admitted plugin registry (#160658)

Reuse the plugin registry already admitted for unchanged agent turns instead of acquiring another captured registry. Keep selected-owner coverage, model-catalog scoping, cleanup and retirement with their existing lifecycle owners.

Add real-loader regression coverage for synchronous and inspection reuse, missing owners, catalog isolation and shutdown cleanup. Production LOC remains net zero.

Exact-head CI passed (run 36474645681); fresh autoreview is clean. Installed Linux parent/head evidence removes duplicate registration; full Windows reporter confirmation remains outstanding.

Fixes #160572. Thanks to @ekinnee for the focused repair, @oxen-horse for the report, and @steipete, @RomneyDa and @vincentkoc for the earlier work and evidence in #158369 and #150915.

Co-authored-by: IWhatsskill <[email protected]>
Co-authored-by: Patrick-Erichsen <[email protected]>

* fix: SQLite workers fail when running OpenClaw from source under Bun on Windows (#160310)

* fix(infra): keep Node's tsx loader away from Bun SQLite workers

Running OpenClaw from source under Bun, the SQLite worker broker started
every .ts worker with `--import <tsx/esm file: URL>` and asked it to
register tsx's loader API, regardless of runtime. Bun runs TypeScript
natively and resolves a file: preload by stripping "file://", so on
Windows `file:///C:/.../tsx/dist/esm/index.mjs` became `/C:/...` and the
worker failed with "preload not found" (device-token persistence broke).

runtime-worker-url already owns this decision for other workers. Extract
runtimeNeedsTypeScriptLoader from it, route the broker's worker execArgv
through resolveRuntimeWorkerThreadExecArgv, and only send the source
loader URL when the runtime needs it. Node keeps tsx for source workers.

* test(infra): keep Node's loader for simulated-Bun SQLite workers

bun-sqlite-library.worker.test.ts overrides process.versions.bun to
exercise Bun SQLite library selection, but its SQLite workers are real
Node worker_threads. Now that the broker omits tsx on Bun, those workers
could not load their TypeScript carrier. Mock the runtime-worker-url
loader decisions in this test to answer for a Node executable, which
restores its previous broker behavior.

* fix(http): adapt rejection transport to Bun's Node-compatible closure (#160329)

Detect Bun's native HTTP destroySoon override introduced by upstream #43557
and use the shared ordered half-close path while retaining native response
completion for older Bun transports. Version labels cannot distinguish the
pre-sync and post-sync canaries.

Wait for queued HEAD socket assignment on Bun without finish diagnostics,
then flush through the response callback to avoid Bun's dispatcher socket
cork. Preserve Node's existing ordering and transport operations. Update SDK
rejection documentation; retain all existing wire-level regression cases.

Validation: 31/31 lifecycle tests on Node 24.21.0, stock Bun 1.4.2, pre-sync
and post-sync Bun forks, and the finish-diagnostics build. Core and infra
test typechecks, scoped oxlint, oxfmt, assertion-safety ratchet, and diff
whitespace checks pass. No tests or dependencies added.

* chore(ui): refresh control ui locales (#160771)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(ui): open voice setup before history admission (#160686)

* fix(ui): open voice setup before history admission

The microphone remains enabled for dictation during initial history, but its
short-tap handler returned at the history submission fence before opening
unavailable capability settings. Catalog admission populated a closed picker:
two unavailable DOM rows existed, while accessible Configure menuitems were zero.

Open capability guidance before that fence. Actual Talk creation still waits
for accepted history. Keep the existing unavailable-settings unit case and
all E2E assertions; hold startup and catalog across the target's early click.
Synchronize the four other proven desktop Talk-start races with the existing
waitForTalkReady helper. Leave direct/hold dictation, explicit picker triggers,
mobile Talk and already-synchronized Talk cases unchanged. Document the behavior.

Introducing ordering: 0b52dc467b3e added the history submission fence before
picker opening; d769e31af2b9 now awaits foreground stream admission before
history/startup, exposing that window more often. Read the parent-relative
patches and the 94cbd1335df, 6b9da9dc028, f03d64f6a56 and e256cbef8ae repairs.

Probe evidence on original production 49351700f3f6:
- Hold chat.startup and talk.catalog, click Start voice input, release both,
  and await visible history: unavailable=2, Configure visible=0,
  Configure including hidden=2, picker open=null. The original toBe(2)
  assertion fails with expected +0 to be 2; 24.333s case, 197.12s wall.
- The pending-history unit variant fails with dropdown.open=false; the
  ready-history variant passes. Extend the existing unit rather than adding
  a duplicate case.
- Holding startup across the initial click also leaves talk.client.create
  absent in transcript ordering, composer voice selection and both SDP cases;
  all four controlled probes fail, while the settings-only sibling passes.

Validation:
- Four changed E2E files: three consecutive passes, 16/16 each;
  313.04s, 293.49s and 340.02s command wall including isolated UI builds.
- One-worker dictation before/after: 11/11 each; 234.65s -> 181.54s wall,
  file time 63.604s -> 48.819s, changed case 4.663s -> 3.583s.
- One-worker siblings before/after: 5/5 each; 210.09s -> 162.56s wall.
  File times: ordering 13.101s -> 7.517s, voice selection 20.346s -> 13.522s,
  SDP 13.446s -> 8.394s. These are cost samples, not a speedup claim.
- Existing full browser files exceed 30s because they exercise multiple real
  composer/media flows and screenshots; no E2E cases or timers were added.
- Composer microphone, action and catalog owners: 80/80; 85.96s wall.
- Independent Codex autoreview: scoped-clean through P2.
- pnpm tsgo:ui passed in 85.05s; ui-e2e and ui-chat test graphs passed
  in 106.07s. Targeted oxlint, oxfmt and git diff --check passed.
- Local check-changed --base origin/main passed its guards, formatting,
  graph boundary and i18n, then stopped at inherited TS2741 in
  src/gateway/session-row-projection.config-commits.test.ts:76: the fixture
  omits the required scheduler. That untouched file is already repaired by
  4bd105408cc on main. The same gateway-root typecheck passes in 69.67s on
  untouched origin/main snapshot 28340c41f8b8, materialized under this task's
  artifacts with physically cloned, identical dependencies. No unrelated
  source was changed. The full changed pipeline is not claimed green.

Release-note context: Control UI opens unavailable voice setup when the
microphone is clicked during chat startup, while preserving Talk admission.

* test(ui): rely on Talk readiness without a no-op startup hold

The sibling Talk cases held chat.startup only to release it immediately, which exercises no ordering. waitForTalkReady with the ready-history message is the synchronization, matching the landed e256cbef8ae shape.

* test(agents,channels,cli): remove low-value tests (batch d091) (#160766)

* test(heartbeat): deslop t0067 tests

* test(agents): deslop t0119 tests

* test(telegram): deslop t0118 tests

* test(discord): deslop t0121 tests

* test(agents): deslop t0120 tests

* test(state): deslop t0129 tests

* test(browser): deslop t0128 tests

* test(status): deslop t0112 tests

* test(matrix): deslop t0125 tests

* test(cli): deslop t0082 tests

* test(agents): remove unused compaction fixture exports

* improve: keep Gateway responsive while compaction loads history (#160314)

* perf(agents): hydrate compaction transcripts off thread

* test: prepare managed handoff runtime before case deadline

* test: speed up database preflight lifecycle tests (#160728)

Co-authored-by: Peter Steinberger <[email protected]>

* improve: speed up child-session lists on large rosters (#160404)

* perf(gateway): select child sessions through the parent index

* test: prepare managed handoff runtime before case deadline

* perf(nodes): reuse warm workers so node session turns start as fast as local ones (#160265)

* perf(nodes): reuse warm workers so node turns start as fast as local ones

Retain settled workers for two minutes with at most two idle children per
node. Negotiate node-worker-idle-retention-v1 across Gateway, node, and
bundle; fresh turn admission and credentials remain mandatory. Protect
background work and preserve durable process cleanup and reconciliation.

Expose reclaimable idle capacity to placement admission and the session
picker. Consolidate lifecycle helpers under the supervisor and use the
shared capacity parser. Document the bounded process-count and memory
tradeoff; include lifecycle, negotiation, and picker regression coverage.

fix(nodes): retry failed idle worker cleanup

Rearm the supervisor idle timer after a transient physical cleanup failure while retaining the durable slot and retirement fence. Cover automatic expiry and idle-limit eviction alongside explicit cleanup with a fake clock.

Fold the cancellation forwarding wrapper into its owner and remove the immediately repeated admission abort check. Preserve the existing authority, settlement, and shutdown guards.

fix(nodes): synchronize idle capacity protocol models

Regenerate the Swift worker-slot model for the optional reclaimableIdle field. The schema and named capability contract remain unchanged.

Inline the single-caller prepared workspace custody wrapper in the supervisor and move its four cases to the public launch entry point. Preserve exact acquisition, abort, shutdown, and release ordering while keeping the complete branch production delta negative.

chore(nodes): prune stale worker assertion allowance

Remove the exact one-entry assertion baseline for worker-command.runtime.ts after the unsafe assertion was eliminated. Keep the scanner and all unrelated allowances unchanged.

fix(nodes): keep supervisor dependencies on protocol owners

Import protocol parsers and types directly from their canonical leaf, including the QA fixture, and remove the redundant supervisor-control re-exports. This breaks the dependency cycle without duplicating the wire contract.

Keep the runner cancellation mock and shutdown callback asynchronous with the real Promise<void> contract, including teardown restoration.

fix(nodes): complete asynchronous cleanup contracts

Join cancellation cleanup in callers and tests while preserving parallel shutdown settlement and expected failure identity. Exclude absent cleanup owners before aggregation and keep stale-connection rejection unchanged.

Use immutable worker input, type-only journal imports, stable sorted idle projections, and receiver-bound fault injection. Remove redundant descriptor bookkeeping and finish the test lint cleanup without changing limits or suppressions.

* test(nodes): disambiguate inventory fixtures

* fix(google): keep streaming silence to Gemini 3.8 Live instead of ending the audio stream (#152844)

Keep streaming supplied silent audio frames for Gemini 3.8 Live so server-side VAD can finish the user turn. Retain existing audioStreamEnd behavior for other Google Live models. The policy remains in the Google plugin model contract and shared production bridge.

Closes #152830

Co-authored-by: IWhatsskill <[email protected]>

* fix(agentmail): allow official ClawHub channel to load (#155097)

* fix(agentmail): allow official ClawHub channel to load

* docs(agentmail): keep setup guide vendor-owned

* fix(agentmail): require API key for configured state

* fix(plugin): verify pinned digest before legacy trust

* fix(doctor): update refuses when lint warns about an unusable agent database (#160184)

Fixes `openclaw update` refusing with candidate-doctor-lint / doctor-failed when candidate Doctor lint warns about an unusable agent database, and plain `openclaw doctor --lint --json` printing a Clack warning box before its JSON report.

Doctor notes rendered to process.stdout even when machine-output mode reserved stdout, so runDoctorAgentDatabaseOperation's nonfatal "Doctor warnings" note preceded the lint JSON; in an update rehearsal the private lint worker's first stdout line failed the strict JSON parse and became a core/doctor/lint-inspection error. Notes now follow loggingState.forceConsoleToStderr: terminal-core gains a dependency-free, callback-scoped note output resolver (note-output.ts), and withConsoleLogsRoutedToStderrForJson installs one that reads the live flag at write time. Warnings stay visible on stderr. Candidate-side only; released updaters (verified against the 2026.9.6 driver) accept the clean JSON unchanged.

Proof: json-output-mode regression fails on main and passes; published [email protected] driver x candidate upgrade-survivor cell with an ownership-mismatched secondary agent DB refused before (doctor-failed) and succeeded after with the warning on stderr and the bootstrap import guard passing.

* refactor(gateway): remove duplicate artifact API scenario (#160779)

Co-authored-by: Vincent Koc <[email protected]>

* test(release): repair release-check lanes after settle, Responses body, and scheduler changes

Release-check lanes that were also red on main asserted pre-change contracts:
- subagent settle wording now says "in this batch" (#158642)
- Responses request bodies are pre-encoded bytes (#159574); decode them
  without consuming init instead of requiring string bodies
- direct experience-review calls must bind the session MCP scheduler that
  Gateway startup binds in production (#159481)
- Docker lanes pin the plain PATH `codex` CLI for the Codex harness probe
- Telegram group-policy hot reload must name every array it replaces

Landed directly from #160746 (the native publisher needs a signed merge to
bring that branch current). Focused proof: four QA suites 200/200 in 81 s on
the merged tree; the two E2E files and credentialed live paths were not run.

* fix(active-memory): recalls on claude-cli never reuse the prompt cache (#160768)

Closes #160672

## What Problem This Solves

Fixes: every Active Memory recall on the `claude-cli` runtime writes the whole OpenClaw system prompt into Claude's prompt cache again, even for two recalls of the same agent seconds apart.

## User Impact

User impact: repeated Active Memory recalls of the same agent on `claude-cli` now send a byte-identical system prompt, so the recall's first API call can read it from Claude's cache instead of paying for a 10k+ token cache write each time. Normal `claude-cli` turns are unchanged.

## Why This Change Was Made

Each recall gets a new session key (`<parent>:active-memory:<per-run hash>`) so its session entry stays unique. The Runtime line rendered that key into the system prompt, and Claude CLI receives the whole system prompt as one `appendSystemPrompt`, so the per-run key forced a full cache rewrite. The recall's session key is the only value that differed between two recalls.

One-shot CLI dispatch runs (today only Active Memory recall) now carry the Runtime facts line in their only user turn, through the same `UserPromptSubmit` context Claude CLI already uses for other per-turn facts. This reuses the existing relocatable Runtime region that Chat Completions routes already move into the first user message. The recall model still sees its agent, session, model and channel. Recall session keys, storage and cleanup are unchanged. Normal resumable CLI turns keep the Runtime line in the system prompt.

Thanks @ndakota79 for the detailed cache-counter report and cause analysis.

No overlap with Pash/Sarah changes.

## Evidence

Isolated Gateway (task-owned home, state, config, port) with agents `alpha` and `beta` on `agentRuntime: claude-cli`, Active Memory `mode: always`, and a fake `claude` executable that records the `initialize.appendSystemPrompt` and the `UserPromptSubmit` context it receives. Two `chat.send` turns on `agent:alpha:main` about 60 s apart, then one on `agent:beta:main`.

- Base (`7f0781faa67`): the two alpha recalls' system prompts differ in exactly one line:
  ```
  -Runtime: agent=alpha | session=agent:alpha:main:active-memory:e10ad4c9dc5e | ...
  +Runtime: agent=alpha | session=agent:alpha:main:active-memory:9945b3fb179b | ...
  ```
- Candidate: both alpha recalls send the same system prompt (14,210 bytes, sha256 `f7a45b89f4e84e5f…`). Each recall's user turn carries its own `Runtime: agent=alpha | session=agent:alpha:main:active-memory:<hash> | ... | channel=webchat | ...`. The candidate recall prompt equals the base recall prompt minus the Runtime line.
- Controls: the beta recall still gets its own prompt (its working directory differs) and its own `agent=beta` Runtime facts in the turn. The alpha and beta main (non-recall) turns send the same system prompt and user turn as on base, with the Runtime line still in the system prompt.
- Regression: `src/agents/cli-runner/prepare.test.ts` "keeps per-run helper session identities out of the reusable system prompt" fails on base (system prompts differ) and passes with the fix. `prepare.test.ts` (194), `cli-backend-dispatch.test.ts` (40) and `helpers.system-prompt.test.ts` (15) pass.
- Test cost: the new test runs in 136 ms. `pnpm test src/agents/cli-runner/prepare.test.ts --maxWorkers=1`: 194 passed, 83.3 s wall (Vitest 65.9 s); the same command filtered to the new test: 23.1 s wall (Vitest 5.8 s).

Not verified: a real Claude Code run. The proof checks the bytes OpenClaw sends to the CLI (the `initialize` system prompt and the `UserPromptSubmit` response); it does not show Claude Code's cache counters. The Runtime facts use the same `UserPromptSubmit` additional-context path that already carries `before_prompt_build` hook context (including Active Memory's own recalled context) on `claude-cli` turns.

Co-authored-by: Ayaan Zaidi <[email protected]>

* fix(release): retry the shipped 2026.9.6 Windows updater after its exit-13 liveness defect

Windows packaged upgrade from [email protected] to the 2026.9.7 candidate failed on Node 24 and 26.1.0 because the shipped 9.6 updater exits 13 (unsettled top-level await) before switching the install: it awaits an unreferenced 300 ms cleanup timer after cancelling the retained-runtime progress probe. 02720df7e6c5 fixes it for 2026.9.7+, but cannot repair the executing 9.6 parent, and it is intermittent on native Windows.

Classify exactly that signature (win32, exit 13, the warning, empty stdout, install still on a baseline older than 2026.9.7), retry the same update once as a user would, and only if the retry fails the same way use the existing verified direct candidate install. Both outcomes are recorded as updater fallback evidence; any other failure still fails the lane.

* perf(gateway): reuse pending narration deadlines (#160769)

Keep the existing two-second deadline while replacing pending narration text. Preserve immediate final flush, retractions, and retirement cancellation.

* refactor: remove redundant final-delivery reconciliation (#160764)

* test(e2e): align survivor startup budget expectations

The upgrade-survivor readiness default moved from 90 to 300 seconds, but three existing helper assertions still expected 90. Keep them aligned with the runner; forwarding, overrides, and explicit timeout behavior stay covered.

Reproduced the original failing case on main. Validation: 350 tests across the helper and startup-budget suites passed in 59.06 seconds, plus scoped lint, formatting, and independent review.

* docs(ios): qualify SimSlim scope in setup guide (#160784)

SimSlim also prepares the compare-mode arms of native release qualification, not only the ios-build iPhone test simulator. Follow-up to the ClawSweeper finding on #160607.

* fix(ci): scope untouched line-limit diagnostics in changed checks (#158995)

* test(channels): track the inlined Synology context builder call

#160639 (5ddcce60fabb) inlined resolveSynologyChatInboundRoute, so the
Synology inbound event now calls rt.channel.inbound.buildContext on the
same getSynologyRuntime() handle instead of resolved.rt. The caller
inventory still expected the old text and failed build-artifacts on main
and in 2026.9.7 Full Release Validation (CI 36496123315).

Update only the expected call text; the runtime provenance is unchanged.
Proof: context-builder-callers.test.ts fails 1/6 on main before, passes
6/6 after (3 s, one worker).

* fix(ci): restore Doctor plugin repair lint budget (#160715)

* docs(ci): explain why the plugin retention proof stays on Node

#160216 routed src/plugins/runtime.retention.test.ts to the unit-fast Node
partition after reproducing Bun failures. Record why in the runtime-selection
docs, beside the other GC-sensitive proofs.

Root cause, measured on Blacksmith Testbox tbx_01m3n11pjbtgfgcqv8t1jjbh4n with
pinned Bun 1.4.3-canary.1+6b9148b17 on 300ef3991158: the registry-instances
case kept a released successor registry past eight forced collections in 3/350
and 6/900 runs. In every retained case, a GCDebugging heap snapshot one task
later still held the oldest-registry control marker but no successor, and each
WeakRef then read empty. No retaining path exists, so this is collector
nondeterminism, not a product leak. Node ran 0/600.

The registry-case failure seen on openclaw/openclaw#160136 (CI run
36380533796) is a separate, already-fixed fixture defect. That run merged onto
56376753f832, before c136ec631464 (#160200) moved gc() out of promise
continuations. On Bun, that base fails the registry case 339/350 and 300ef3991158
fails it 0/550.

Routing proof on the same lease: replaying the failing core-unit-fast-2 group
(186 files, bun-compatible policy) exits 0, with all 10 retention cases in the
Node subset. The runtime-inventory guard fails without the routing entry.

* fix(ci): restore frozen planner dependency closure

Include the provider catalog and record helper added by ac59199 in frozen
tooling admission and all affected copied harnesses. Verify their bytes
through the existing closure owner. Keep child evidence isolation covered
with the child-only Codex install helper now that record-shared is common.

The original package failure reproduces locally: 93 failed and 462 passed.
Both added integrity cases fail before the closure repair. Afterward, all
555 package tests and 445 closure sibling tests pass. Independent review
is clean through P2; the full selected static check passes in 1448.701s.

Measured one-worker wall times: package 218.673s and closure siblings
267.426s. The two added integrity cases take 208ms and 202ms. No timeout,
retry, baseline, or integrity check is relaxed.

Related CI: 36494713554 and 36494667447. Separate startup assertion and
Synology caller fixes landed in 8799587 and c4845a6 and are not duplicated.
The separate macOS native reconnect failure in main CI 36492763105 remains
causally unproven and is not claimed fixed here.

* fix(security): parse gpt generation numbers in the audit tier check (#140012)

Fix security audit warnings that incorrectly classify numbered GPT-6 models as below GPT-5. Compare numeric generations in the shared model-hygiene classifier while preserving older-model warnings and Azure's legacy gpt-35-turbo naming contract.

The repair covers primary models, fallbacks, image models, and agent overrides without changing provider routing, authorization, or unknown-name advisory policy. Broader unknown-name behavior remains separate in #160580.

Fixes #139751
Thanks @holny for the fix, regression coverage, and isolated CLI evidence.

Co-authored-by: holny <[email protected]>
Co-authored-by: IWhatsskill <[email protected]>

* refactor(daemon): prune redundant Scheduler test fixtures (#160794)

Co-authored-by: Vincent Koc <[email protected]>

* fix(release): admit the provider catalog read by legacy-operator survivor planning

ac59199ad3fd made docker-e2e-plan.mts import scripts/lib/official-external-provider-catalog.json and scripts/lib/record-shared.mjs and read the candidate's provider catalog through the frozen target reader for legacy-operator-state lanes. Frozen admission hydrates only declared source paths in a no-lazy-fetch checkout, so targeted survivor dispatches failed with 'unable to read selected source (cat-file)', and the admission fixture lacked both tooling imports. Declare both files in the tooling closure and hydrate the candidate catalog for survivor lanes.

* refactor(plugins): deslop plugin runtime fifth pass (#159945)

* refactor(plugins): deslop plugin runtime fifth pass

Consolidate repeated provider, manifest, install, catalog, hook and registration projections under their existing owners. Preserve plugin loading, SDK, caching and source-security contracts.

Preserve provider wizard modelSelection preferences through registration so configured onboarding choices retain their documented model-picker behavior.

* fix(plugins): preserve build and type cleanup contracts

* fix(plugins): retain distinct public credential source types

* fix(plugins): preserve sparse catalog matching and cleanup contracts

* fix(plugins): preserve include ownership during uninstall

* fix(plugins): include request policy in PR wrapper inventory

* chore(ios): simplify store release workflow (#160791)

* perf(subagents): avoid sibling scans for registry patches (#160800)

* fix(channels): isolate Mattermost sends and retain capture owner proof (#150915)

Keep Mattermost inbound monitoring behind account startup rather than the
outbound runtime. Bind the Discord E2E fixture to its selected runtime
artifact and assert exact provider/instance identity through model selection
and rerouting, preserving late-STT, history, and cleanup fences.

The prepared-registry handoff is already on main via #160658; do not
duplicate it or retain the obsolete release-preparation ancestry.

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vincentkoc <[email protected]>

* perf(ui): stop forbidden canvas lease refresh loops (#160808)

Use granted hello scopes to admit canvas lease renewal and stop automatic retries after FORBIDDEN. Preserve read access implied by write/admin scopes and re-evaluate access on reconnect.

* fix(ui): multi-file chat sends fail late when attachments together exceed the frame limit (#160071)

* fix(ui): admit chat attachments against the chat.send frame budget

One chat.send carries every composer attachment base64-encoded in a single
WebSocket frame, but the Control UI only checked each file against the
per-attachment hello-ok.policy.attachments ceilings. Files that fit one at a
time could together exceed the frame, and the send failed late: after the
composer cleared and the whole batch was encoded, with a generic payload
error from the browser transport.

The per-send decoded budget is floor((policy.maxPayload - 256 KiB) * 3/4),
the formula the Gateway already used to clamp its advertised ceiling, now
owned by src/shared/chat-attachment-frame-budget.ts for both sides. Every
composer intake path counts staged attachments plus in-flight reads and
rejects the file that would overflow with the existing "Too large to send"
toast. handleSendChat, outbox delivery, and new-session submission …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui extensions: codex gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant