Skip to content

fix: keep confirmed sends in the receiving chat's model history - #208049

Merged
obviyus merged 1 commit into
mainfrom
fix/visible-delivery-identity
Nov 29, 2026
Merged

obviyus merged 1 commit into
mainfrom
fix/visible-delivery-identity

Conversation

@obviyus

@obviyus obviyus commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Supersedes #207992.

Problem

An isolated automation turn (gateway call agent with its own session key, channel: telegram, to: <dm>, deliver: false) sends a Telegram DM with the message tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: commitConfirmedVisibleMessage decided "the producer's own turn already wrote this" by comparing the producer session's stored delivery.context with the send address (createProducerMatcher), and returned a silent skip. The gateway agent request stores its channel/to routing hint on the isolated session even with deliver: false, so the hint matched the DM address and the DM history write was dropped.

Fix

  • Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
  • Every remaining not-recorded outcome carries a diagnostic (skipped() now requires one).
  • The unused skipDestinationHistory opt-out is removed (deliver-contracts.ts, message.ts, deliver-core.ts, its test).
  • docs/refactor/conversation-transcript-ownership.md describes own-turn by key only.

Production diff: 5 files, net negative.

User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

Evidence

  • Red on base, green here: src/sessions/confirmed-visible-message.integration.test.ts "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
  • No duplicate on the real dispatch path (src/auto-reply/reply/dispatch-visible-history.integration.test.ts): Telegram DM with dmScope main and per-channel-peer, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
  • Affected consumer tests (30 files) passed locally.
  • Real Telegram (Test Server, real model), base a65ac074b3d6: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
  • Real Telegram, head ee6eed48a208 (same entry point): gateway call agent with sessionKey: agent:main:bedtime-e2e, channel: telegram, deliver: false; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the message tool. The DM session (agent:main:main) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
  • Local ClawSweeper review on ee6eed48a208: patch correct, zero findings.
  • CI: every check passed except check-lint-core-5, which fails on three lint errors in Workboard e2e files from improve: keep Workboard editing and Save within reach on phones #207839 that are on main and not in this diff (main: full core lint fails on Workboard e2e tests (curly, prefer-dom-node-text-content) #208070; override comment on this PR).

Not changed here (decision recorded)

Plugin-action settlement (outbound-send-service.ts onHandled): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different deliveryIds). Deleting the onHandled writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

Follow-ups

  • Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
  • Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
  • Store the not-recorded reason on the delivery queue row (schema change).
  • Route direct channel notices through the owner: Telegram bot-message.ts, dm-access.ts, native command replies; Discord native-command-reply.ts; Signal/Matrix approval handlers.
  • Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

Merge risk

Revert restores the old skip. Rows already appended stay.

- Remove address-based producer suppression and the unused history opt-out.
- Require diagnostics for not-recorded outcomes without warning for same-chat turns.
- Preserve native receipt handlers; retain generic settlement redesign as separate work.
@clawsweeper

clawsweeper Bot commented Nov 29, 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.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M labels Nov 29, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. labels Nov 29, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 29, 2026
@obviyus

obviyus commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

Maintainer override: check-lint-core-5 (and the openclaw/ci-gate roll-up) is red on main, not on this diff.

ci-triage 208049: no failing test files (lint-only red). The job's three errors are all in files this PR does not touch, added by #207839:

ui/src/e2e/workboard-locale.e2e.test.ts:93:32: error: Expected { after 'if' condition. (eslint(curly))
ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:154:47: error: Expected { after 'if' condition. (eslint(curly))
ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:178:27: error: Prefer `.textContent` over `.innerText`. (unicorn(prefer-dom-node-text-content))

Reproduced with oxlint -c .oxlintrc.json on the origin/main (11b2cf0) copies of both files. Tracked in #208070. Every other check on ee6eed48a208 passed.

@clawsweeper clawsweeper Bot added 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

This PR uses canonical conversation keys instead of delivery-address hints to decide whether a confirmed send needs destination history.

Example: Session agent:main:bedtime-job sends “It's 10:15pm, go to bed” to Telegram DM 123 while carrying that DM's delivery hint.

  • Before: The message arrives, but matching delivery hints suppress its receiving conversation's history row.
  • After: The different canonical session keys allow the message into agent:main:telegram:direct:123.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with meaningful integration coverage; directly inspectable end-to-end evidence is limited.
Proof confidence 🦐 gold shrimp (3/6) This collaborator-authored PR is exempt from contributor proof requirements; its reported head run reached Telegram delivery, destination persistence and receiving-model inclusion, but recall failed and the inspected media covers unrelated Workboard UI.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A recipient receives an automation message that is absent from the receiving assistant's model history.
Reason: The patch restores the established destination-history contract, with direction approved through collaborator authorship.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a current destination-history defect with a focused change, and no introduced correctness or security defects were found.

Reviewed head: ee6eed48a208986f2c99de6f49e619e78b03783c

Before merge

None.

Findings

None.

Agent review details

How this fits together

Confirmed outbound receipts enter the shared history recorder, which resolves the receiving conversation and appends delivered content through the existing session writer for subsequent model requests.

flowchart TD
  A[Producing session] --> B[Channel delivery]
  B --> C[Confirmed receipt]
  C --> D[Destination resolution]
  D --> E[Canonical key comparison]
  E --> F[Existing session history writer]
  F --> G[Receiving model context]
Loading

Technical review

Best possible solution:

Keep the focused canonical-identity repair in the existing recorder while preserving receipt-only plugin handling and leaving broader settlement consolidation separate.

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

Current-main source directly establishes the false skip for a distinct producer carrying the destination's delivery hint, and the body reports a matching Telegram baseline; this review executed no product code.

Is this the best way to solve the issue?

Comparing canonical conversation identity fixes the demonstrated cause within the existing owner without changing routing policy or removing supported native plugin receipt handling.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 89b928c56e00.

Provenance checked

  • Same-conversation history suppression changes intended behavior with a stated reason (3fe7f1e: Avoid duplicating a reply already recorded by its producing conversation.)
  • Conversation transcript ownership keeps the original intent (fc664de: Keep confirmed visible messages in their receiving conversation's model history once.)
  • Unused destination-history opt-out keeps the original intent (3fe7f1e: Allow the designated caller to record destination history instead; later Gateway-owned recording removed its production caller in f06e5cd.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit fc664de adds docs/refactor/conversation-transcript-ownership.md:40 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fc664def979e; files: docs/refactor/conversation-transcript-ownership.md)

PR surface

Source -49, Tests +235, Docs +6. Total +192 across 9 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 4 7 56 -49
Tests 4 299 64 +235
Docs 1 16 10 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 322 130 +192

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus regression coverage Production −49 LOC; tests +234 LOC; test registration +1 LOC The repair removes the faulty matcher and unused opt-out while adding destination-history and same-chat routing coverage.

Root-cause cluster

Relationship: canonical
Canonical: #208049
Summary: This PR explicitly replaces the closed broader candidate with a narrower repair that preserves receipt-only handlers.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • 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.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 29, 2026, 1:55 AM ET / 06:55 UTC.

@obviyus
obviyus merged commit 1782ab0 into main Nov 29, 2026
160 of 163 checks passed
@obviyus
obviyus deleted the fix/visible-delivery-identity branch November 29, 2026 07:30
@obviyus

obviyus commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

Landed as 1782ab0.

  • Bug: an isolated automation's message-tool send to a Telegram DM was visible to the user but missing from the DM's model history, because a stored routing hint was treated as proof that the automation session was the DM.
  • Fix: own-turn is now decided only by canonical session key equality; every other not-recorded outcome carries a diagnostic.
  • Proof: red-on-base unit test, five same-chat no-duplicate dispatch tests, and a real Telegram run where the DM agent answered "what did you just send me?" with the sent bedtime message.

obviyus added a commit that referenced this pull request Nov 29, 2026
Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Nov 29, 2026
Follows #208049 and #208130.

## What Problem This Solves

When an isolated agent run (for example `gateway call agent` with `channel`/`to` set, a cron announce or a recovery send) delivers a message to a chat, the user sees the message but the chat's own conversation does not record it. When the user replies, the agent in that chat does not know what it just sent.

Cause: the request's `channel`/`to` routing hint is stored on the isolated session as its delivery route. The conversation registry derives an address binding from every session's delivery route, so the chat address then has two current sessions: the chat's own (inbound) session and the isolated one. `commitConfirmedVisibleMessage` (`src/sessions/confirmed-visible-message.ts`) asks the registry which conversation owns the address, gets two, and skips with "Conversation context skipped: multiple current destinations match." Sends that carry their own route (plugin receipts) were not affected; announce, gateway `send` and recovery sends were. #208130's E2E saw this skip.

## User Impact

A message delivered to a chat from an isolated run now lands once in that chat's conversation, so the chat's agent can see and quote it on the next turn. No config, schema, stored-row, protocol or SDK change.

## Why This Change Was Made

The registry's address lookup answers "which conversation does inbound for this address use?". Only chat sessions can answer that. Inbound (`initSessionState`) and exact outbound route binding (`bindOutboundSessionEntry`) always record the session's chat type; a request hint records only a delivery address. The lookup (`resolveCurrentConversationByDelivery`, its only caller is the confirmed-send commit) now ignores sessions without a recorded chat type: `s.chat_type IS NOT NULL` in the SQLite reader (`session_windows.chat_type` already exists) and `entry.chatType` in the memory reader.

- The isolated session keeps its delivery route and its own conversation binding; its replies still go to the chat.
- Nothing is written differently; only the lookup reads one existing column.
- Two real chat sessions for one address (rare: for example a dmScope change that leaves an old DM session current) still skip as ambiguous unless the caller pins one. That case is the pinned-session test, unchanged.

Considered and rejected: stop the hint from creating a binding at the producer. The binding and the reply route come from the same `delivery` field, so splitting them needs a new stored field (schema). Preferring the channel plugin's route when several match adds a second resolution path.

Accepted edge cases:
- A chat session row written before chat type was recorded and never touched by inbound since would not answer the lookup. The next inbound message records the chat type. Such a send falls through to the channel route lookup as before.
- A non-chat session that copies a full chat origin (with chat type) still counts as a chat session.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an announce in the chat inbound uses, not an isolated session hinted at it". It records a DM inbound session and an isolated session whose `delivery` is built by `normalizeSessionDeliveryState` from a `channel`/`to` hint (what `agent-session-patch.ts` writes), then calls `deliverOutboundPayloads` with the isolated producer and no route. Base: DM history empty (skipped as ambiguous). Head: one row in the DM session, none in the isolated session.
- Stays green: #208049's and #208130's tests, the pinned-session test ("records a shared address in the conversation the caller pinned"), topic, cross-agent and producer tests in the same file.
- Consumer tests (one `ocx test` run, vitest-source): 26 files passed. That covers every test file importing a changed registry/reader module (conversation registry SQLite + memory, conversation list/send/turn, route ownership, outbound session, session lifecycle) plus the confirmed-send consumers (`deliver.test.ts`, `delivery-queue.transcript.test.ts`, `outbound-send-service.integration.test.ts`, `deliver-confirmed-visible.test.ts`, subagent announce delivery/mirror).
- Real Telegram (Test Server, source Gateway, deterministic mock model, real transport and transcript). The DM user first got READY, so the DM session (`agent:main:main`) existed. Then `gateway call agent {sessionKey: "agent:main:vod-e2e", channel: "telegram", to: "telegram:<dm>", deliver: true}` ran, with the final reply as the marker (announce path, no message tool). After that, the user asked "What did you last send me?"

  | Side | SUT marker messages | DM assistant rows with marker | Follow-up model request contains marker | "multiple current destinations match" lines |
  |---|---:|---:|---|---:|
  | base `5b7efcd4c02e` | 1 | 0 | no | 4 |
  | head `a47b58323` | 1 | 1 | yes | 0 |

  On base the user saw the message, but the DM agent had no record of it. On head the DM agent's next request includes it.

## Follow-ups (out of scope)

- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices (Telegram bot-message/dm-access/native commands, Discord native-command-reply, Signal/Matrix approvals) through the history owner.
- Inbound "accepted ⇒ in transcript" guarantee.
- Failed-delivery history.

## Merge risk

Two-way door: a revert restores the skip. No stored format change. Blast radius: the confirmed-send history commit's address lookup only (`resolveCurrentConversationByDelivery` has no other caller).

Co-authored-by: Ayaan Zaidi <[email protected]>
obviyus added a commit that referenced this pull request Nov 29, 2026
…ory (#208204)

Follows #208049, #208130 and #208169.

## What Problem This Solves

When an agent run needs approval (exec, plugin or OpenClaw change) and Telegram or Signal shows the approval prompt in a different chat than the one that asked (for example the approver's DM, for a cron job, background run or another chat's turn), the user sees the prompt but that chat's agent has no record of it. Asking the DM agent "what did that approval ask?" gets a blank stare.

Cause: the Telegram and Signal approval adapters sent the prompt straight through their own platform clients (`sendMessageTelegram`, `sendMessageSignal`), bypassing core delivery, so the confirmed-send history owner (`src/sessions/confirmed-visible-message.ts`) never saw it.

## User Impact

- Telegram and Signal approval prompts for another conversation now enter the receiving chat's model history once, so the agent there can quote and explain them on the next turn.
- A prompt in the chat whose own turn asked for approval adds no row (that turn already owns its history), so there is no duplicate.
- Signal's approval outcome ("approved", "expired") is a new message (Signal cannot edit), so it is recorded the same way. Telegram edits its prompt in place; edits add no row.
- What the user sees does not change: same text, buttons, topic/thread, reactions, and the same monitor endpoint for Signal. No config, schema, stored-row, protocol or SDK change.

## Why This Change Was Made

The goal: every message a user sees is in that chat's model history, through one owner. The adapters now send through `sendDurableMessageBatch` (as other plugin sends already do) and the direct client calls are deleted, so the existing owner records the prompt. No new hook, flag, guard or state.

- `skipQueue: true`: approval prompts are not replayed after a restart, same as before (a replayed prompt would carry dead buttons for an approval that no longer exists).
- The requesting session is passed as the producer, so the owner's existing same-session rule skips the requesting chat.
- Signal keeps the monitor's `baseUrl`/`account` through the send dependency, as before.
- Side effect: `message_sending` hooks now see approval prompts, like every other core send.

### Direct sends reviewed (classified, not moved)

- **Reply of the turn running in that chat (its turn owns history):** Discord interaction replies (`native-command-reply.ts`), Telegram native command replies, Telegram system-agent approval outcome sent back to the origin chat.
- **Access control before a conversation exists (must never enter a transcript):** Telegram pairing codes and "not allowed" (`dm-access.ts`), "You are not authorized to use this command." (`bot-native-command-dispatch.ts`), provider login device codes (`bot-native-command-login.ts`).
- **Last-resort failure notices:** Telegram "Something went wrong…" after dispatch itself threw (`bot-message.ts`) and "Configured ACP binding is unavailable" (`bot-native-command-dispatch.ts`). They bypass core delivery on purpose so they still arrive when delivery is what failed. Default chosen: keep them direct.

`docs/refactor/conversation-transcript-ownership.md` now lists these classes.

## Evidence

- Red on base, green here (real core delivery, real history owner, SQLite session store; only the platform send function is mocked):
  - `extensions/telegram/src/approval-handler.runtime.test.ts` "records a DM approval prompt: another conversation's approval enters the approver chat once": base 0 rows, head exactly 1 row with the prompt. "…the requesting chat's approval stays with its own turn": 0 rows on both.
  - `extensions/signal/src/approval-handler.runtime.test.ts` "adds a prompt for another conversation's approval to the approver chat once": base 0 rows, head 1. "leaves a prompt in the requesting chat to that chat's own turn": 0 rows.
- Existing Telegram approval cases (topics, Direct Messages topics, fan-out, terminal edits, origin fallback) stay green; their send assertions now check the routed target (`telegram:<chat>:topic:<n>`), which the real sender resolves.
- Both test files moved to the `extension-database-workers` lane (forks pool), since history writes need the main-thread SQLite broker.
- Real Telegram (Test Server, source Gateway, deterministic mock model, real transport and history). The DM user first got READY, so the DM session (`agent:main:main`) existed. Then `gateway call agent {sessionKey: "agent:main:vcn-e2e"}` ran with no channel delivery; the mock made one `exec` call with a marker, and Telegram exec approvals (approver = the DM user, target DM, ask always) showed the prompt with Allow Once / Deny buttons in the DM. After that, the user asked "What did the approval prompt say?" The prompt was left unanswered.

  | Side | Prompts in the DM | DM history rows with marker | Follow-up model request contains marker |
  |---|---:|---:|---|
  | base `b904594b0377` | 1 | 0 | no |
  | head `5462cde7ee6a` | 1 | 1 | yes |

  On base the user saw the approval prompt, but the DM agent had no record of it. On head the DM agent's next request includes it. This proves delivery and history inclusion, not visual rendering.

## Follow-ups (out of scope)

- Approval prompts on Discord, Slack, Matrix, WhatsApp, iMessage, Microsoft Teams and Google Chat still send directly; each needs its native presentation (components, blocks, cards, reactions) through core delivery.
- Matrix shared-DM context notice (`m.notice`; core delivery has no notice message type).
- Storing not-recorded reasons (schema); inbound accepted ⇒ transcript; failed-delivery history and overlap dedupe.

## Merge risk

Two-way door: a revert restores the direct sends. No stored format, schema or contract change. Blast radius: Telegram and Signal native approval prompt delivery (and Signal approval outcome messages).

Co-authored-by: Ayaan Zaidi <[email protected]>
vyctorbrzezowski added a commit that referenced this pull request Nov 29, 2026
* feat(ui): offer Add to Home agent when Home sidebar is open (#207773)

* fix(ui): remove Open PR from the session menu (#207808)

* fix(ui): remove Open PR from the session menu

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

* fix(ui): remove Open PR from the session menu

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 19ab49eb-2fdb-4e2a-ba0e-3fcf8de38db9

* fix(ui): preserve shared session menu copy

---------

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

* fix(workboard): let users delete an empty default board (#207909)

* test(gateway): isolate publication recovery memory pressure (#207993)

* fix: remove dismissed chat suggestions without waiting (#207792)

* fix: remove dismissed chat suggestions without waiting

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

* fix: remove dismissed chat suggestions without waiting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a7065126-58f4-41f4-ab35-887c77e05eac

* refactor: keep suggestion dismissal focus with the pane keyboard helpers

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

* fix: remove dismissed chat suggestions without waiting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 362ae3c3-16c8-4016-8f59-dc477414e07a

---------

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

* fix(ui): show a subtle placeholder while a new chat gets its title (#207809)

* fix(ui): show a subtle placeholder while a new chat gets its title

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

* fix(ui): show a subtle placeholder while a new chat gets its title

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 5a8d6d8e-7c91-4b07-9467-ff499cf2786a

---------

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

* fix: keep skill highlights in sent chat messages (#207828)

* fix: keep skill highlights in sent chat messages

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

* fix: keep skill highlights in sent chat messages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 303c108c-485c-4ee9-bcdc-b6845d507543

---------

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

* improve: keep Workboard editing and Save within reach on phones (#207839)

* improve: keep Workboard editing and Save within reach on phones

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

* improve: keep Workboard editing and Save within reach on phones

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 41fdebe7-35c4-435a-8128-eb9f12e2fabf

---------

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

* fix(ui): highlight skills and mentions in queued messages (#207829)

* fix(ui): highlight skills and mentions in queued messages

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

* fix(ui): highlight skills and mentions in queued messages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d26fee27-de6c-4b5f-8264-da07de4df6f9

---------

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

* fix: center a single tool row on the agent avatar in chat replies (#207748)

* fix(ui): even the gap below a lone tool row in chat

* fix(ui): center a lone tool row on the agent avatar

* improve(ui): show the project beside Cmd+K session settings (#203754)

Move project selection and its New worktree switch into the visible project field. Keep agent selection and Remember settings in their original menu.

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

* fix: stop warning about unsaved drafts when opening a chat (#203741)

* fix: stop warning about unsaved drafts when opening a chat

Keep failed background recovery reads distinct from failed edits in the composer and Side chat. Keep one access notice when browser storage is unavailable without consuming the warning for a later failed save.

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

* fix: stop warning about unsaved drafts when opening a chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 227e24ff-2a24-4a82-a325-e7787c443eed

---------

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

* fix(logbook): clear obsolete errors when retrying actions (#199461)

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

* fix(ui): keep the sidebar session list collapsed (#207832)

* fix(ui): keep the flat session list collapsed

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

* fix(ui): keep the sidebar session list collapsed

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d5d9e6c3-ba53-4dec-9efe-a5a9c5c29445

* fix(ui): page the sidebar only when it scrolls to the end

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

---------

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

* fix: stop treating limited access as an Inbox alert (#207737)

* fix: stop treating limited access as an inbox alert

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

* fix: stop treating limited access as an Inbox alert

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a014cab4-b01d-458b-aa67-ec83ad3a2a99

---------

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

* fix: child session activity ring freezes during startup (#188147)

* fix: child session activity ring freezes during startup

Project accepted preparation as running without starting the execution clock. Reserve queued presentation for actual mailbox/global-lane waits and preserve recorded capacity waits.

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

* fix: child session activity ring freezes during startup

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 2bf26c5b-2410-44b2-9915-d2289a90f388

* fix: align Gateway consumers with active session startup

Expect active accepted chat preparation, record a real lane wait in metrics, and distinguish preparation from actual queued input in describe/list coverage.

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

* Publish openclaw/plaid-crayfish

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 29690b6c-a214-45c1-9591-fd19b1d51336

* test(gateway): cover child startup in the current session checks

---------

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

* fix: remove hover tooltips from Workboard cards (#207928)

* improve: tighten Sessions board card typography (#207931)

* fix: keep Sessions board card hover neutral instead of column color (#207932)

* fix: keep wrapped Settings help links visibly focused on phones (#203819)

* fix(ui): keep wrapped device help links visibly focused

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

* fix: show the full focus outline on wrapped device help links

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 7b5d66ad-f165-8076-9dcf-5dd7cd64f0d9

* fix(ui): show wrapped settings help focus at the phone gutter

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

---------

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

* fix: keep the selected Review file compact when the tree is open (#203825)

* fix: show the full filename in Review diff headings

Allow the heading to wrap the whole filename instead of reserving the line for its extension. Keep the compact file tree presentation unchanged.

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

* fix: show the full filename in Review diff headings

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ba141dca-cfb0-85b2-a5bb-102d1536c092

* fix: identify the selected file in a narrow Review panel

Keep the destination filename visible above the diff and reserve room for its stem in the changed-files tree.

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

* fix: keep identifying filenames and diff actions on one row

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

* fix: keep short file extensions intact in Review headings

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

* test: verify renamed and short files in the compact Review tree

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

---------

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

* fix: hide desktop Details when there is nothing to show (#205093)

* fix: hide desktop Details when there is nothing to show

* fix(ui): discover session details before mounting the panel

* fix: keep tagged silent replies out of chat (#207738)

* fix(subagents): warn when cancel cannot confirm the worker stopped (#208041)

* fix: align Control UI tooling and docs with task card removal (#207747)

* improve: give assistant chat bubbles a calmer neutral background (#203729)

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

* fix: show empty chat search results while a collaborator types (#208010)

Use the filtered transcript to show when a chat search has no matches and to restore the reader’s place. Keep the collaborator’s typing preview visible.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fb4672e-d1b4-419c-8551-3ab267f39de3

* test(openai): expect progress instructions in the GPT-Live handshake (#208006)

Expect the direct GPT-Live session.update frame to include the operator's instructions followed by the progress-claims instruction. Keep the full-frame equality check.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 0e4639f8-64cf-4b54-8c52-6d1dd823278c

* fix: keep project picker errors readable (#203763)

* fix(ui): keep project picker errors and retry inside the menu

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

* fix: keep project picker errors readable

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e5cd3cf3-150f-4766-bab3-ca89f29252d1

* test: keep the project picker regression mergeable

---------

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

* fix: keep long answer summaries readable in chat (#203779)

* fix: keep long answer summaries readable in chat

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

* fix: keep long answer summaries readable in chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 40161eb2-ab93-4ac4-810c-656cc6a8d664

---------

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

* fix: check the refusal reason for revoked queued followups (#208025)

The Gateway intentionally reports a withheld failure for invalidated sign-in. Keep the model, executed-run, and queue assertions and distinguish this refusal from an unrelated error.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fd6e1bc9-ac1b-4a0b-86c8-4d15ea9d65ac

* fix(qa): replay Claude compaction completion in the Telegram live lane (#208001)

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: edeb5fcc-cfe8-4ad3-9b38-37bdb3073cd8

* refactor(ui): remove unused English catalog entries (#201419)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>

* refactor(ui): remove dead Settings text (Labs, Updates, forms, devices, memory) (#201421)

* refactor(ui): remove unused Labs parallel-task copy

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

* refactor(ui): remove Labs parallel-task text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3b47ea07-0bd0-8cab-9425-6c67975a8f24

* refactor(ui): remove unused Updates copy

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

* refactor(ui): remove unused settings form and appearance copy

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

* refactor(ui): remove unused device, desktop and systems copy

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

* refactor(ui): remove unused dream diary copy

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

* Publish openclaw/quick-lobster-5

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3512bcc3-a350-8bc4-8c43-92639564075b

---------

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

* refactor(ui): remove dead New session, Sessions, Agents, Templates and OpenClaw ID text (#201422)

* refactor(ui): remove unused New session copy

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

* refactor(ui): remove New session text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 609418e2-3a64-8b1d-a39e-9376e4b8949f

* refactor(ui): remove unused Sessions copy

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

* refactor(ui): remove unused Templates copy

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

* refactor(ui): remove unused agent identity and file copy

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

* refactor(ui): remove unused OpenClaw ID copy

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

* Publish openclaw/oceanic-claw-2

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: dcc9dcf1-1890-866a-b5d9-3dff693a5d98

---------

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

* refactor(ui): remove dead model setup, Models and model picker text (#201424)

* refactor(ui): remove unused model setup copy

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

* refactor(ui): remove model setup text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 18ddea1b-160c-8672-a918-2a952c072c15

* refactor(ui): remove unused model provider list copy

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

* refactor(ui): remove unused add-provider and default model copy

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

* refactor(ui): remove unused model picker labels

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

* refactor(ui): remove unused model picker loading copy

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

* refactor(ui): remove dead model setup, Models and model picker text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 6fac1775-a172-8071-8591-9561a51d33c3

---------

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

* refactor(ui): remove dead agent tools, Skills and Usage text (#201429)

* refactor(ui): remove unused agent tool access copy

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

* refactor(ui): remove agent tool access text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4211d89a-e4f4-80e4-9be2-de8848a06a63

* refactor(ui): remove unused Skills copy

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

* refactor(ui): remove unused Usage copy

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

* refactor(ui): remove dead agent tools, Skills and Usage text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 33be6fec-530e-814d-9867-ce808e91d99e

---------

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

* refactor(ui): remove unused English text from chat side panels (#201452)

* refactor(ui): remove unused side chat copy

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

* refactor(ui): remove unused subagent and process panel copy

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

* refactor(ui): remove unused session files and changes copy

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

* refactor(ui): remove unused English text from chat side panels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 32359a08-da6f-86b4-81de-e0c5dbb4226b

---------

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

* refactor(ui): remove unused English text from chat and pull request cards (#201454)

* refactor(ui): remove unused composer and message copy

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

* refactor(ui): remove unused chat status copy

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

* refactor(ui): remove unused pull request copy

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

* refactor(ui): remove unused English text from chat and pull request cards

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: cdb7136a-c0bc-888a-829e-af2403beb226

* test(ui): verify composer translations with a live menu label

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

---------

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

* refactor(ui): remove unused English text from plugin settings and catalog pages (#201455)

* refactor(ui): remove unused plugin settings and access copy

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

* refactor(ui): remove unused plugin lifecycle and catalog search copy

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

* refactor(ui): remove unused plugin catalog filter and paging copy

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

* refactor(ui): remove unused plugin detail fact copy

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

* refactor(ui): remove unused English text from plugin settings and catalog pages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f24e2625-05eb-8d99-8e8a-e31549355657

---------

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels (#201456)

* refactor(ui): remove unused plugin detail tab and install count copy

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

* refactor(ui): remove unused installed plugin list and category copy

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

* refactor(ui): remove unused plugin status and source copy

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 57d467b8-c62d-825a-a303-31d561f0d69c

---------

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

* test(live): reject failed Moonshot completions (#207728)

* test(live): reject failed Moonshot completions

* test(live): use the current Moonshot model and thinking policy

* test(live): exercise the Moonshot provider thinking policy

* test(live): run the registered Moonshot stream hook

* test(live): load the Moonshot catalog through its public facade

* test(live): type the Moonshot catalog builder as a function

* test(gateway): isolate publication notice memory pressure (#207995)

* fix: test provider review continuations after device removal (#208022)

Check that the removed device disconnects while the already-admitted continuation sends only its acknowledged steer and clears the accepted review. Keep the viewer rejection at admission.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7ff67804-adab-4c48-b5d8-f0b4334dff46

* improve: reduce memory used by concurrent agent runs (#208033)

* perf(agents): reduce heap held by concurrent runs

Reuse MCP input schema publications and Code Mode declarations through their bounded catalog owners. Resolve embedded runs with the selected-model registry view and hydrate sibling records on demand.

* fix(agents): preserve MCP refresh for deeply nested schemas

If the reuse comparison cannot serialize a changed wire schema, defer to the existing publisher and its depth handling.

* test(agents): update MCP recovery snapshot assertion

* fix: isolate the hook token reload check from plugin startup (#208040)

Keep the real Gateway, config reload, approval and child process. The token probe does not need plugins, whose startup can outlast its five-second child deadline.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b6aeceb4-1e62-4a21-af66-41b77081ed09

* chore: unblock core lint by fixing oxlint errors in Workboard e2e tests (#208075)

Origin: #207839

## What Problem This Solves

`main` fails `check-lint-core-5`, so every open PR shows that lint shard red. #207839 added three oxlint errors in two Control UI e2e tests:

- `ui/src/e2e/workboard-locale.e2e.test.ts:93`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:154`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:178`: `unicorn/prefer-dom-node-text-content`

## User Impact

No product change. This is test-only. Contributors get a green core lint shard again.

## Why This Change Was Made

- Two single-line `if` statements now have braces.
- The mobile editor test reads the column row with Playwright `textContent()` instead of `innerText()`. The assertion keeps its meaning: it checks that the renamed column label "Finished" shows in the row. The label is in the always-rendered `.settings-row__title` span. `textContent` also includes the row's description, and the test does not change it. The new label can only be found if the rename worked.
- Lint rules and other files are not changed.

## Evidence

- On `main` (8d3188542dce), `node scripts/run-oxlint.mjs` on the 2 files: 3 errors (the ones shown above). With this change: `Found 0 warnings and 0 errors`. `oxfmt --check`: clean.
- `vitest --config test/vitest/vitest.ui-e2e.config.ts` on both files, run 2 times: `Test Files 2 passed (2)`, `Tests 4 passed (4)` each time.

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

* perf(gateway): skip display preparation during history sharing checks (#208062)

* chore: simplify Workboard session filter tests (#207853)

* chore: simplify Workboard session filter tests

* test: retain session visibility and reference reset checks

* test: check revoked board references on a cached read

* test: fix prompt-cache journey tool and scope expectations (#208055)

Check web_fetch membership in the latest deferred-tool list. Send chat with
writer scope in Tool Search opt-out journeys so direct and internal turns
can compare the full automations schema.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 62582bff-c96b-4a17-9051-3daa5fa19044

* fix: make the chat sidebar swipe reachable on Android (#208037)

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6251590e-fd83-4a72-bf88-6000e34d9e6d

* improve(ios): avoid repeated Keychain reads when opening chat (#207667)

* perf(ios): keep Keychain reads out of chat identity

* improve(ios): avoid repeated Keychain reads when opening chat

OpenClaw-Publication: 4ebe6ce8-9b61-8209-be76-df43a417621d

* improve(ios): skip Talk PCM player setup until audio plays (#207668)

* perf(ios): defer PCM player initialization until playback

* improve(ios): skip Talk PCM player setup until audio plays

OpenClaw-Publication: 0fd39061-45a1-8858-970d-0b837bb5dac5

* fix: keep session writes working after a gateway restart (#208031)

Give a newly admitted schema its own validity cell when its markers change. Retain the existing cell when the markers match so unchanged borrowers stay valid.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 3c81c608-4a5c-4c8c-85b1-c3e5b827cd03

* fix: stop the live Tool Search probe from reporting false connection failures (#208034)

Scope the live probe’s session catalog to its fixture tools and discovery controls. Return service availability from the status tool and preserve the wire assertion if the runner throws.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4b9ea82e-e287-494d-a59e-9523243f60ee

* improve: reduce sidebar work when other chats update (#207791)

* improve: reduce sidebar work when other chats update

Reuse the already reconciled primary result for an identical retained window with the same agent and archive filter. Keep independent windows on their existing reconciliation path.

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

* improve: reduce sidebar work when other chats update

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f22b2da2-4071-8303-9ece-93ab4f3aacdf

---------

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

* improve: avoid rebuilding provider choices while typing a model API key (#207786)

* improve: avoid rebuilding provider choices while typing a model API key

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

* improve: avoid rebuilding provider choices while typing a model API key

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f5e75abf-1583-83f1-a72a-a8023ceb4625

---------

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

* improve: avoid re-sorting displayed runs when paging automation history (#207795)

* improve: reduce repeated work when paging automation history

Consume ordered history pages without re-sorting retained runs at every loading and append render. Keep stable ordering for shifted offset boundaries and immediate offline sort changes. Add an opt-in native-page count workload.

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

* improve: avoid re-sorting displayed runs when paging automation history

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e82048d2-da2c-8e54-a164-02a1db9a5532

---------

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

* fix: verify retained child results in the Ultra live check (#208026)

Read the matched child’s retained result after delivery and verify its run ID before checking the handoff token.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: bbaa86d0-6a79-4155-b69e-2701a35c57bd

* fix(ui): open the selected agent’s chat while reconnecting (#202680)

* fix(ui): open the selected agent chat while reconnecting

* fix(ui): open the selected agent’s chat while reconnecting

OpenClaw-Publication: 722da459-2f0c-4a1a-ac47-0e1899d47f20

* fix: give the installed Codex progress-reply test a conversation to reply to (#208063)

Create the isolated session with internal delivery before starting the installed agent. The transient WebChat flags alone do not advertise a message tool.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fdae7386-bdc9-4280-9e3e-a18ba8cea046

* fix: run the live trajectory export check against the built gateway (#208038)

Start a built Gateway for the live trajectory export test so the Codex plugin reads the configuration prepared by the Gateway. The test still requires an exact model reply, one-time export approval, and a bundle containing runtime and transcript events.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 055248a1-a1f2-441c-8237-58ff6cee3893

* fix: stop repair notices when their automation is removed (#208036)

Check the automation's ID and creation time before its repair notice continues. Deleting the automation stops the notice from resending its run history to the model. Ordinary edits let the notice finish.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 5d0644b7-f674-4578-ae3f-16f44b3b0e6d

* fix: restart launcher-managed Gateways after exit 78 (#207972)

## What Problem This Solves

A launcher-managed Gateway that exits 78 outside an update trial leaves the serving release down permanently.

## User Impact

The resident launcher now restarts that child with its existing crash backoff (1, 2, 5, 10, then 30 seconds). Trial configuration refusals still roll back. Direct-Gateway systemd services retain `RestartPreventExitStatus=78`. Launcher format 4, trial v2 and IPC bytes are unchanged. The existing launcher writer refreshes an installed file when its bytes differ, while preserving newer launcher formats.

## Why This Change Was Made

Delete the terminal non-trial exit branch rather than add another restart mechanism. Simplification retained the two-line deletion, one byte comparison in the existing writer, migrated lifecycle/replacement regressions and launcher-managed documentation. Production: -2 lines net; tests: +18 net; docs: +2.

## Evidence

- vitest-source, 600-second bounds: the migrated launcher test failed on unchanged main production code because the launcher exited before the first 1-second restart timer; the other 15 launcher tests passed.
- Immediately after the deletion, launcher and frozen-contract tests passed: 19 tests, including unchanged trial-78 rollback assertions and format-4 ready/stop exchange.
- Fake clock checks no child starts before each 1/2/5-second deadline and another child starts at each deadline.
- Focused Oxlint passed; formatter output matched the test file.
- Installed format-4 stale-content regression failed before the byte comparison: the old content remained. The replacement test also verifies a second identical write does not replace the file and newer launcher formats remain untouched.
- Rendering is deterministic: only static constants, flag arrays and source constants are interpolated; no timestamp, PID or install path enters the rendered bytes.
- Header-reader audit on main and shipped `v2026.12.1-beta.1`: `writeLauncher` previously replaced only older formats; `writeGitReleaseLauncher` preserves all formats >=2. A downgrade to the beta-era writer therefore still preserves an installed format-4 launcher as before. The frozen format-4 peer test remains unchanged.
- Prior-head [CI](https://github.com/openclaw/openclaw/actions/runs/46228136551) and [update-restart-auth package acceptance](https://github.com/openclaw/openclaw/actions/runs/46228140802) passed on `c5ad15b432742fc4b8b5455f7f4a512f2a291953`; byte-refresh repair requires fresh hosted evidence. No full local build was run per task scope.

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

* fix: keep sandbox commands working when workspace scratch is not writable (#208005)

Use the container's private /tmp when the sandbox user cannot write the default workspace scratch directory. Keep explicit temp paths and workspace permissions intact.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 31357588-6850-4ea3-a68d-52e744874a24

* fix(gateway): invalidate session history when a transcript publication rejects (#208051)

## Problem

When a transcript publication rejects, Gateway clients that follow the session get no event. Examples: a synchronous projection read throws `SessionRowFactsPending` (the count-sequence fallback fixed by #208004), the history worker fails with a non-overload error (`readSessionMessageByIdAsync` rethrows it), or event-row preparation fails. The Gateway logs `Transcript update dispatch failed` (`src/gateway/server-runtime-subscriptions.ts`) and publishes nothing: no `session.message`, no `sessions.changed`. The open chat stays stale until something else refetches it.

Log signature, reproduced on main: `Transcript update dispatch failed` with `Session row facts require worker reconciliation` (seen in CI runs of `session-message-events.history-worker.test.ts`; root cause in #208004). Any other rejection in the handler loses events the same way.

## Fix

`createTranscriptUpdateBroadcastHandler` already runs every transcript publication in its per-session queue. When the publication rejects, the queue now emits the existing history invalidation: `sessions.changed` with `phase: "message"` and no `messageId`/`messageSeq`. It goes to the same audience as a normal publication (session-event and message subscribers, `canReceiveSessionEvent` authorization, private scope for retired unqualified owners). Then it rethrows, so the existing warning and the live-source fallback stay.

- No new protocol field, event or schema. The protocol docs (`docs/gateway/protocol/rpc-bootstrap-and-events.md`) already say "Refetch history on that invalidation". Clients refetch on it: Control UI `ui/src/pages/chat/chat-state-events.ts`, Apple `ChatViewModel+TransportEvents.swift`, Android `ChatController.kt`.
- If the invalidation itself throws, the rethrown `AggregateError` carries both errors, so the existing warning logs both.
- Accepted edges:
  - A pending assistant error keeps its existing deferral, so no early error row appears.
  - A legacy marker-only update has no session key and stays log-only.
  - A rejection after a `session.message` was sent causes one extra, harmless refetch.
- Out of scope: lifecycle and background-process row handlers. They publish row snapshots, and their resync would be a row invalidation, which is a different signal.

## Users

| PR | Users | Failure class | Evidence |
|---|---|---|---|
| this | Gateway clients following a session (Control UI, iOS/macOS, Android, SDK) | silent stale chat after a rejected transcript publication | `server-runtime-subscriptions.ts` catch logs only; new tests red on main |

One-shot CLI runs do not use this publisher, so they are not affected.

## Evidence

- `session-message-events.history-worker.test.ts` "invalidates selected-session history when a transcript publication rejects": the history worker read rejects with a generic error. The client receives `sessions.changed` (`phase: "message"`, no `messageSeq`), and `chat.history` returns the committed message. Red on main (120 s timeout, no event), green with the fix.
- `server-session-events.recovery.test.ts` "invalidates history and keeps the rejection when a transcript read fails": the handler still rejects with the original error (the caller's warning path) and broadcasts once. Red on main, green with the fix.
- Production +55/-9 (one shared audience helper replaces the inline loop); tests +64.

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

* fix(workboard): open the board in app from dashboard widgets (#199922)

* fix: keep confirmed sends in the receiving chat's model history (#208049)

Supersedes #207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `a65ac074b3d6`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

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

* fix(qa): run the live log tail browser test again (#208020)

Point the live log tail scenario at the consolidated auto-follow browser test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 34b4a470-dfdd-48fb-aaba-59aec526e812

* fix: check managed child delivery in the Codex live suite (#208011)

Check that the parent receives the UUID chosen by its managed child. Let the Docker live suite use the Gateway's delegation defaults.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7f1bb837-8d14-46f3-82e5-8aa559e33b3e

* improve: speed up Doctor database repair tests (#208103)

Build the healthy migrated agent database once for the repair guard table. Give each case an independent file, registry, and maintenance lease so it still exercises the real defect, repair, and clean recheck.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: f5bae5e0-5d87-4d07-9178-2e4ab0ca2637

* fix(gateway): keep count-path session updates through store discovery (#208004)

## Problem

Scheduled CI kept failing `session-message-events.history-worker.test.ts` (count case, "after worker overload"): 5 of 15 scheduled runs, most recently run 46220607204. After #207862 the case waits the full 120 s test limit, so the event was missing, not late.

A traced CI sample (PR CI, Linux x64, Bun) showed the stop: after the transcript update, the count publication never reached `readSessionMessageCountAsync`, and a `chat.metadata.changed` from a session-store topology change arrived in the same window. A local repro then showed the cause:

```
Error: Session row facts require worker reconciliation
    at readSessionRowEntry (src/gateway/session-row-projection-materialize.ts:460)
    ...
    at selectSessionRowEntries (src/gateway/session-row-scope.ts:551)
```

`handleTranscriptUpdateBroadcast` (`src/gateway/server-session-events.ts`) assigns a cursor sequence to updates that arrive without `messageSeq`. To do that it prepared membership with its own loop and then called `projection.selectEntries()` synchronously. When store discovery runs inside that loop, the row's entry is still unread, so selection throws `SessionRowFactsPending`. That error means "re-enter through exact worker preparation". The handler did not handle it, so the publication failed and clients got neither `session.message` nor `sessions.changed`. The update was lost until the next refetch.

## Change

The count fallback reads its row through the session event publication rows (`sessionEventPublicationRows(projection).withReadyRows`, metadata only), the same owner `withPreparedEventRow` uses. It reaches `withPreparedExactRows`, which prepares membership and retries `SessionRowFactsPending`. The hand-written `prepareMembership` loop is removed.

Known edge, left as is: other throws before publication still reject the update. Only worker overload turns into a `sessions.changed` invalidation. That is a wider change and is not part of this fix.

## Who sees it

Gateway clients that follow a session (`sessions.messages.subscribe`, for example the Control UI) and receive transcript updates without `messageSeq` (`server-session-events.ts`, count fallback), while session-store topology changes (a store added, removed or rediscovered). One-shot CLI runs do not follow session events and do not see this.

## Evidence

- New test `delivers a count-path session update when the store topology changes`: emits a store topology change, then a transcript update without `messageSeq`. Red on base (120 s timeout, 3 of 3 runs), green with the fix (3 of 3, no memo).
- The CI shape (overload case plus store topology churn): 10 of 10 red on base, green with the fix.
- Existing history-worker overload cases and the session event consumer suites pass.
- What starts the store topology change during the CI run is inferred, not traced. The CI trace shows the publication stopping before the count read, with a `chat.metadata.changed` in the same window. The local repro with an explicit topology change gives the same signature and the stack above.

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

* fix: keep Telegram login tests independent of startup speed (#208106)

Wait for the Telegram progress note before checking lane ownership. Release both fixture gates on assertion failure so a slow login cannot spill into the next test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 177934d0-1fb5-4a06-beb2-10916a09ee47

* fix(release): identify jobs blocking child evidence sealing

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

* fix(release): clarify pinned FRV recovery eligibility

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

* fix(ci): add tagged reply control to the PR wrapper inventory (#208120)

* fix(android): keep the snooze deadline test independent of runner timing (#208097)

Advance the handset and Gateway clocks together during the post-save refresh. Check the exact deadline sent to the Gateway and the wake time returned to the handset.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6fb940cc-e4ef-4c8f-94a9-060a736f8c11

* test(process): keep cancel parity off execa's force-kill race (#208126)

## Problem

Scheduled CI run 46234040123 (checks-node-compact-large-42, shard core-runtime-infra-process-hosted-2) failed `src/process/spawn-broker/execa.test.ts > broker command transports > matches buffered cancel results and errors`:

```
-   "isForcefullyTerminated": true,      (direct execa, the reference side)
+   "isForcefullyTerminated": false,     (spawn broker)
    "isCanceled": true, "signal": "SIGTERM"   (both sides)
```

Both sides agree that the command was canceled and that the child exited on SIGTERM. Only the reference side, which calls `execa` directly in the test process, said "forcefully terminated".

Cause: execa starts a `forceKillAfterDelay` timer when it sends SIGTERM (`execa/lib/terminate/kill.js` `killOnTimeout`). If the parent event loop stalls longer than the delay before it reaps the exited child, the timer fires first. `kill('SIGKILL')` then succeeds on the unreaped child and sets `isForcefullyTerminated`, even though the child already exited on SIGTERM. The fixture used a 50 ms delay for every case, so a loaded runner can hit this race.

Reproduced with direct execa 10.2.1, outside the broker: cancel a SIGTERM-honoring child with `forceKillAfterDelay: 50`, then block the event loop for 200 ms in a `setImmediate`. Result 3/3: `signal: "SIGTERM"`, `isCanceled: true`, `isForcefullyTerminated: true`. With no stall, `isForcefullyTerminated` is `false`.

## Change

Test-only. Children that honor SIGTERM get a 5 s force-kill delay, so the timer cannot win the race. These children exit at once, so the tests take no longer. The `forced cancel` case ignores SIGTERM and keeps its 50 ms delay, so it still proves forced termination matches across the broker and direct execa.

## Impact

No product change. Process cancellation results stay correct: in the failing run the broker reported a cancel as a cancel (`isCanceled: true`, `failed: true`). The mismatch was the reference side's timer race.

## Evidence

- CI failure: https://github.com/openclaw/openclaw/actions/runs/46234040123/job/141256229744
- No `src/process` change in the window 84ca43a1..758614e7.
- Before the change: 5/5 green locally with load average ~39 (the race needs a stall over 50 ms).
- After the change: `execa.test.ts` full file 5/5 green, 27 passed, 3 skipped.

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

* test(state): keep schema modules out of read-only agent database access (#185841)

* fix(state): avoid eager writer imports in agent database reads

* test(state): keep schema modules out of read-only agent database access

* chore(release): close out 2026.11.11 on main (#208114)

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

* fix(outbound): record a plugin action's visible send once (#208130)

Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

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

* fix: let a fallback model finish after Code Mode reads

Allow the configured fallback model to finish after a completed Code Mode cell when every host call has a successful read receipt and qualifies for direct retry. Shell writes, unfinished cells and plugin lookups without an audited replay classification still block fallback.

Closes #207895

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: d49db423-f997-43b6-b23c-4d0be08459c0

* fix: let older automations read their conversation's memory (#208143)

## What Problem This Solves

Automations created before OpenClaw recorded the creating conversation (every job without `sourceConversation`, i.e. created before #179062) name that conversation only by session key. Their scheduled runs get no memory at all: every `knowledge_*` or memory tool call fails with "the host granted this session no memory audience", and the Gateway logs `memory audience unavailable: root session agent:<agent>:cron:<job>:run:<run> has no durable chat type`. The same runs still hold owner-only tools such as `exec`. A production automation that reads and writes the owner's knowledge vault every week hit this on every run.

## User Impact

- A key-only detached automation (`isolated` / `current`) now reads its conversation's current memory, the same way a bound automation does:
  - created in the owner's direct chat: the owner's private memory;
  - created in a group or channel: only that conversation's memory, never owner-private.
- When the job recorded a requester (profile or channel sender), that requester's owner status is checked at each occurrence first; without one, the run's existing owner bit decides, as it already does for the run's tools.
- If the conversation row is gone, archived or cannot be read, the run proceeds exactly as before (no memory, no pause, no failure).
- Board, workspace, sandbox, event target and the run's tools are unchanged. `main` and `session:<key>` targets are unchanged.
- `automations bind` stays available for the exact-incarnation link but is no longer needed for memory. Docs (`cli/cron` "Binding older jobs", `automation/cron-jobs/payloads`) and Doctor's unbound note say so.

Accepted edge case: a key-only run whose agent sandbox mode is `non-main` or `all` now gets owner-private memory it did not have, when the job was created in the owner's direct chat. The owner created these jobs in their own DM, and the run already holds owner authority.

## Why This Change Was Made

`resolveScheduledPrincipal` classifies these jobs as `unbound-parent` and gives them legacy owner authority, but `buildScheduledExecutionContext` pointed their memory at the cron run row, which never has a chat type, so the memory resolver always denied. The fix stays in the existing owner:

- `admitScheduledOccurrence` (`src/cron/execution-context-admission.ts`): for an `unbound-parent` principal on a detached run, read the key-linked conversation row once. A failed read becomes "no row". No generation lease, workspace binding, sandbox or pause change. A recorded requester is admitted per occurrence through the existing `admitScheduledRequesterGrant`.
- `buildScheduledExecutionContext` (`src/cron/execution-context.ts`): with a live row, memory becomes `{ source: "parent", parent: <current sessionKey/sessionId/lifecycleRevision>, owner }`. Everything else for `unbound-parent` is unchanged.
- The memory resolver (`src/plugins/memory-audience.ts`) does not change: it already maps a direct root + owner to owner-private and direct/group/channel to that conversation's partition, for both the embedded and the CLI runtime.
- `scheduledParentKeyOf` now derives the key from `resolveScheduledPrincipal` itself, so Doctor's access review and the development replay read the same row the runtime does; the replay vector (`execution-context-projection.ts`) already labels the memory gain as intended, so it needed no edit.

Not changed: Doctor auto-bind or any stored-row write, jobs with no parent key, bound jobs with no recorded requester. On current `main`, bound jobs keep following their conversation after a reset (#205887), so no reset-degraded path exists to special-case.

## Evidence

Real-admission tests (red on the merge base `bb5c001bb6fc`, green on this head; 6 tests failed on base, all pass on head):

- `execution-context-memory-audience.test.ts` (real admission → registry → embedded and CLI resolvers): key-only owner-DM job → owner-private; key-only group job → that group's conversation only; key-only job with a revoked recorded requester → conversation only; key-only job whose conversation is gone → no audience, run admitted.
- `execution-context.test.ts`: key-only detached job gets parent memory and nothing else (board/workspace/sandbox stay the run's); archived, removed and in-session (`session:<key>`) cases keep run-session memory.
- `execution-context-admission.test.ts`: key-only read takes no generation lease; a failed read still admits the run with its own memory.
- `isolated-agent/run.bind-parent.test.ts` (real cron service + timer): the unbound job now reaches its conversation's memory, without a run-row receipt.

Local runs: the 27 test files that import the changed sources passed (`ocx test`, 6 shards). `pnpm check:changed`: typecheck, lint, guards all ok; the dead-export scan fails only on files this PR does not touch (`src/agents/command/types.ts`, `src/plugins/native-module-require.ts`, `ui/src/...`, `src/gateway/server-methods/update.test-harness.ts`), same as `main`.

End to end, scratch Gateway from source, `plugins.slots.memory: "knowledge"`, real model (`openai/gpt-5.5`). An owner Control UI direct chat was created by one real `chat.send` (row `chatType: "direct"`). A key-only isolated `agentTurn` job (owner key = that chat, no `sourceConversation`, no recorded requester, no tool policy, `toolsAllow` incl. `knowledge_remember`, `knowledge_grep`, `exec`) fired from its own `at` schedule about two minutes ahead (no forced run).

Base (`bb5c001bb6fc`):

```
[agent/embedded] memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```
```
knowledge_remember: "Knowledge access unavailable: the host granted this session no memory audience. The Gateway log entry "memory_audience_denied" for this session names the reason and its repair."
kn…
vyctorbrzezowski added a commit that referenced this pull request Nov 29, 2026
…mn (#207380)

* feat(ui): offer Add to Home agent when Home sidebar is open (#207773)

* fix(ui): remove Open PR from the session menu (#207808)

* fix(ui): remove Open PR from the session menu

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

* fix(ui): remove Open PR from the session menu

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 19ab49eb-2fdb-4e2a-ba0e-3fcf8de38db9

* fix(ui): preserve shared session menu copy

---------

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

* fix(workboard): let users delete an empty default board (#207909)

* test(gateway): isolate publication recovery memory pressure (#207993)

* fix: remove dismissed chat suggestions without waiting (#207792)

* fix: remove dismissed chat suggestions without waiting

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

* fix: remove dismissed chat suggestions without waiting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a7065126-58f4-41f4-ab35-887c77e05eac

* refactor: keep suggestion dismissal focus with the pane keyboard helpers

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

* fix: remove dismissed chat suggestions without waiting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 362ae3c3-16c8-4016-8f59-dc477414e07a

---------

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

* fix(ui): show a subtle placeholder while a new chat gets its title (#207809)

* fix(ui): show a subtle placeholder while a new chat gets its title

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

* fix(ui): show a subtle placeholder while a new chat gets its title

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 5a8d6d8e-7c91-4b07-9467-ff499cf2786a

---------

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

* fix: keep skill highlights in sent chat messages (#207828)

* fix: keep skill highlights in sent chat messages

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

* fix: keep skill highlights in sent chat messages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 303c108c-485c-4ee9-bcdc-b6845d507543

---------

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

* improve: keep Workboard editing and Save within reach on phones (#207839)

* improve: keep Workboard editing and Save within reach on phones

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

* improve: keep Workboard editing and Save within reach on phones

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 41fdebe7-35c4-435a-8128-eb9f12e2fabf

---------

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

* fix(ui): highlight skills and mentions in queued messages (#207829)

* fix(ui): highlight skills and mentions in queued messages

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

* fix(ui): highlight skills and mentions in queued messages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d26fee27-de6c-4b5f-8264-da07de4df6f9

---------

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

* fix: center a single tool row on the agent avatar in chat replies (#207748)

* fix(ui): even the gap below a lone tool row in chat

* fix(ui): center a lone tool row on the agent avatar

* improve(ui): show the project beside Cmd+K session settings (#203754)

Move project selection and its New worktree switch into the visible project field. Keep agent selection and Remember settings in their original menu.

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

* fix: stop warning about unsaved drafts when opening a chat (#203741)

* fix: stop warning about unsaved drafts when opening a chat

Keep failed background recovery reads distinct from failed edits in the composer and Side chat. Keep one access notice when browser storage is unavailable without consuming the warning for a later failed save.

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

* fix: stop warning about unsaved drafts when opening a chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 227e24ff-2a24-4a82-a325-e7787c443eed

---------

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

* fix(logbook): clear obsolete errors when retrying actions (#199461)

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

* fix(ui): keep the sidebar session list collapsed (#207832)

* fix(ui): keep the flat session list collapsed

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

* fix(ui): keep the sidebar session list collapsed

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d5d9e6c3-ba53-4dec-9efe-a5a9c5c29445

* fix(ui): page the sidebar only when it scrolls to the end

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

---------

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

* fix: stop treating limited access as an Inbox alert (#207737)

* fix: stop treating limited access as an inbox alert

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

* fix: stop treating limited access as an Inbox alert

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a014cab4-b01d-458b-aa67-ec83ad3a2a99

---------

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

* fix: child session activity ring freezes during startup (#188147)

* fix: child session activity ring freezes during startup

Project accepted preparation as running without starting the execution clock. Reserve queued presentation for actual mailbox/global-lane waits and preserve recorded capacity waits.

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

* fix: child session activity ring freezes during startup

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 2bf26c5b-2410-44b2-9915-d2289a90f388

* fix: align Gateway consumers with active session startup

Expect active accepted chat preparation, record a real lane wait in metrics, and distinguish preparation from actual queued input in describe/list coverage.

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

* Publish openclaw/plaid-crayfish

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 29690b6c-a214-45c1-9591-fd19b1d51336

* test(gateway): cover child startup in the current session checks

---------

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

* fix: remove hover tooltips from Workboard cards (#207928)

* improve: tighten Sessions board card typography (#207931)

* fix: keep Sessions board card hover neutral instead of column color (#207932)

* fix: keep wrapped Settings help links visibly focused on phones (#203819)

* fix(ui): keep wrapped device help links visibly focused

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

* fix: show the full focus outline on wrapped device help links

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 7b5d66ad-f165-8076-9dcf-5dd7cd64f0d9

* fix(ui): show wrapped settings help focus at the phone gutter

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

---------

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

* fix: keep the selected Review file compact when the tree is open (#203825)

* fix: show the full filename in Review diff headings

Allow the heading to wrap the whole filename instead of reserving the line for its extension. Keep the compact file tree presentation unchanged.

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

* fix: show the full filename in Review diff headings

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ba141dca-cfb0-85b2-a5bb-102d1536c092

* fix: identify the selected file in a narrow Review panel

Keep the destination filename visible above the diff and reserve room for its stem in the changed-files tree.

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

* fix: keep identifying filenames and diff actions on one row

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

* fix: keep short file extensions intact in Review headings

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

* test: verify renamed and short files in the compact Review tree

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

---------

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

* fix: hide desktop Details when there is nothing to show (#205093)

* fix: hide desktop Details when there is nothing to show

* fix(ui): discover session details before mounting the panel

* fix: keep tagged silent replies out of chat (#207738)

* fix(subagents): warn when cancel cannot confirm the worker stopped (#208041)

* fix: align Control UI tooling and docs with task card removal (#207747)

* improve: give assistant chat bubbles a calmer neutral background (#203729)

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

* fix: show empty chat search results while a collaborator types (#208010)

Use the filtered transcript to show when a chat search has no matches and to restore the reader’s place. Keep the collaborator’s typing preview visible.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fb4672e-d1b4-419c-8551-3ab267f39de3

* test(openai): expect progress instructions in the GPT-Live handshake (#208006)

Expect the direct GPT-Live session.update frame to include the operator's instructions followed by the progress-claims instruction. Keep the full-frame equality check.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 0e4639f8-64cf-4b54-8c52-6d1dd823278c

* fix: keep project picker errors readable (#203763)

* fix(ui): keep project picker errors and retry inside the menu

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

* fix: keep project picker errors readable

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e5cd3cf3-150f-4766-bab3-ca89f29252d1

* test: keep the project picker regression mergeable

---------

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

* fix: keep long answer summaries readable in chat (#203779)

* fix: keep long answer summaries readable in chat

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

* fix: keep long answer summaries readable in chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 40161eb2-ab93-4ac4-810c-656cc6a8d664

---------

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

* fix: check the refusal reason for revoked queued followups (#208025)

The Gateway intentionally reports a withheld failure for invalidated sign-in. Keep the model, executed-run, and queue assertions and distinguish this refusal from an unrelated error.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fd6e1bc9-ac1b-4a0b-86c8-4d15ea9d65ac

* fix(qa): replay Claude compaction completion in the Telegram live lane (#208001)

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: edeb5fcc-cfe8-4ad3-9b38-37bdb3073cd8

* refactor(ui): remove unused English catalog entries (#201419)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>

* refactor(ui): remove dead Settings text (Labs, Updates, forms, devices, memory) (#201421)

* refactor(ui): remove unused Labs parallel-task copy

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

* refactor(ui): remove Labs parallel-task text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3b47ea07-0bd0-8cab-9425-6c67975a8f24

* refactor(ui): remove unused Updates copy

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

* refactor(ui): remove unused settings form and appearance copy

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

* refactor(ui): remove unused device, desktop and systems copy

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

* refactor(ui): remove unused dream diary copy

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

* Publish openclaw/quick-lobster-5

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3512bcc3-a350-8bc4-8c43-92639564075b

---------

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

* refactor(ui): remove dead New session, Sessions, Agents, Templates and OpenClaw ID text (#201422)

* refactor(ui): remove unused New session copy

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

* refactor(ui): remove New session text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 609418e2-3a64-8b1d-a39e-9376e4b8949f

* refactor(ui): remove unused Sessions copy

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

* refactor(ui): remove unused Templates copy

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

* refactor(ui): remove unused agent identity and file copy

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

* refactor(ui): remove unused OpenClaw ID copy

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

* Publish openclaw/oceanic-claw-2

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: dcc9dcf1-1890-866a-b5d9-3dff693a5d98

---------

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

* refactor(ui): remove dead model setup, Models and model picker text (#201424)

* refactor(ui): remove unused model setup copy

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

* refactor(ui): remove model setup text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 18ddea1b-160c-8672-a918-2a952c072c15

* refactor(ui): remove unused model provider list copy

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

* refactor(ui): remove unused add-provider and default model copy

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

* refactor(ui): remove unused model picker labels

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

* refactor(ui): remove unused model picker loading copy

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

* refactor(ui): remove dead model setup, Models and model picker text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 6fac1775-a172-8071-8591-9561a51d33c3

---------

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

* refactor(ui): remove dead agent tools, Skills and Usage text (#201429)

* refactor(ui): remove unused agent tool access copy

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

* refactor(ui): remove agent tool access text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4211d89a-e4f4-80e4-9be2-de8848a06a63

* refactor(ui): remove unused Skills copy

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

* refactor(ui): remove unused Usage copy

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

* refactor(ui): remove dead agent tools, Skills and Usage text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 33be6fec-530e-814d-9867-ce808e91d99e

---------

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

* refactor(ui): remove unused English text from chat side panels (#201452)

* refactor(ui): remove unused side chat copy

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

* refactor(ui): remove unused subagent and process panel copy

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

* refactor(ui): remove unused session files and changes copy

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

* refactor(ui): remove unused English text from chat side panels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 32359a08-da6f-86b4-81de-e0c5dbb4226b

---------

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

* refactor(ui): remove unused English text from chat and pull request cards (#201454)

* refactor(ui): remove unused composer and message copy

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

* refactor(ui): remove unused chat status copy

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

* refactor(ui): remove unused pull request copy

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

* refactor(ui): remove unused English text from chat and pull request cards

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: cdb7136a-c0bc-888a-829e-af2403beb226

* test(ui): verify composer translations with a live menu label

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

---------

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

* refactor(ui): remove unused English text from plugin settings and catalog pages (#201455)

* refactor(ui): remove unused plugin settings and access copy

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

* refactor(ui): remove unused plugin lifecycle and catalog search copy

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

* refactor(ui): remove unused plugin catalog filter and paging copy

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

* refactor(ui): remove unused plugin detail fact copy

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

* refactor(ui): remove unused English text from plugin settings and catalog pages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f24e2625-05eb-8d99-8e8a-e31549355657

---------

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels (#201456)

* refactor(ui): remove unused plugin detail tab and install count copy

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

* refactor(ui): remove unused installed plugin list and category copy

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

* refactor(ui): remove unused plugin status and source copy

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 57d467b8-c62d-825a-a303-31d561f0d69c

---------

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

* test(live): reject failed Moonshot completions (#207728)

* test(live): reject failed Moonshot completions

* test(live): use the current Moonshot model and thinking policy

* test(live): exercise the Moonshot provider thinking policy

* test(live): run the registered Moonshot stream hook

* test(live): load the Moonshot catalog through its public facade

* test(live): type the Moonshot catalog builder as a function

* test(gateway): isolate publication notice memory pressure (#207995)

* fix: test provider review continuations after device removal (#208022)

Check that the removed device disconnects while the already-admitted continuation sends only its acknowledged steer and clears the accepted review. Keep the viewer rejection at admission.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7ff67804-adab-4c48-b5d8-f0b4334dff46

* improve: reduce memory used by concurrent agent runs (#208033)

* perf(agents): reduce heap held by concurrent runs

Reuse MCP input schema publications and Code Mode declarations through their bounded catalog owners. Resolve embedded runs with the selected-model registry view and hydrate sibling records on demand.

* fix(agents): preserve MCP refresh for deeply nested schemas

If the reuse comparison cannot serialize a changed wire schema, defer to the existing publisher and its depth handling.

* test(agents): update MCP recovery snapshot assertion

* fix: isolate the hook token reload check from plugin startup (#208040)

Keep the real Gateway, config reload, approval and child process. The token probe does not need plugins, whose startup can outlast its five-second child deadline.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b6aeceb4-1e62-4a21-af66-41b77081ed09

* chore: unblock core lint by fixing oxlint errors in Workboard e2e tests (#208075)

Origin: #207839

## What Problem This Solves

`main` fails `check-lint-core-5`, so every open PR shows that lint shard red. #207839 added three oxlint errors in two Control UI e2e tests:

- `ui/src/e2e/workboard-locale.e2e.test.ts:93`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:154`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:178`: `unicorn/prefer-dom-node-text-content`

## User Impact

No product change. This is test-only. Contributors get a green core lint shard again.

## Why This Change Was Made

- Two single-line `if` statements now have braces.
- The mobile editor test reads the column row with Playwright `textContent()` instead of `innerText()`. The assertion keeps its meaning: it checks that the renamed column label "Finished" shows in the row. The label is in the always-rendered `.settings-row__title` span. `textContent` also includes the row's description, and the test does not change it. The new label can only be found if the rename worked.
- Lint rules and other files are not changed.

## Evidence

- On `main` (8d3188542dce), `node scripts/run-oxlint.mjs` on the 2 files: 3 errors (the ones shown above). With this change: `Found 0 warnings and 0 errors`. `oxfmt --check`: clean.
- `vitest --config test/vitest/vitest.ui-e2e.config.ts` on both files, run 2 times: `Test Files 2 passed (2)`, `Tests 4 passed (4)` each time.

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

* perf(gateway): skip display preparation during history sharing checks (#208062)

* chore: simplify Workboard session filter tests (#207853)

* chore: simplify Workboard session filter tests

* test: retain session visibility and reference reset checks

* test: check revoked board references on a cached read

* test: fix prompt-cache journey tool and scope expectations (#208055)

Check web_fetch membership in the latest deferred-tool list. Send chat with
writer scope in Tool Search opt-out journeys so direct and internal turns
can compare the full automations schema.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 62582bff-c96b-4a17-9051-3daa5fa19044

* fix: make the chat sidebar swipe reachable on Android (#208037)

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6251590e-fd83-4a72-bf88-6000e34d9e6d

* improve(ios): avoid repeated Keychain reads when opening chat (#207667)

* perf(ios): keep Keychain reads out of chat identity

* improve(ios): avoid repeated Keychain reads when opening chat

OpenClaw-Publication: 4ebe6ce8-9b61-8209-be76-df43a417621d

* improve(ios): skip Talk PCM player setup until audio plays (#207668)

* perf(ios): defer PCM player initialization until playback

* improve(ios): skip Talk PCM player setup until audio plays

OpenClaw-Publication: 0fd39061-45a1-8858-970d-0b837bb5dac5

* fix: keep session writes working after a gateway restart (#208031)

Give a newly admitted schema its own validity cell when its markers change. Retain the existing cell when the markers match so unchanged borrowers stay valid.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 3c81c608-4a5c-4c8c-85b1-c3e5b827cd03

* fix: stop the live Tool Search probe from reporting false connection failures (#208034)

Scope the live probe’s session catalog to its fixture tools and discovery controls. Return service availability from the status tool and preserve the wire assertion if the runner throws.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4b9ea82e-e287-494d-a59e-9523243f60ee

* improve: reduce sidebar work when other chats update (#207791)

* improve: reduce sidebar work when other chats update

Reuse the already reconciled primary result for an identical retained window with the same agent and archive filter. Keep independent windows on their existing reconciliation path.

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

* improve: reduce sidebar work when other chats update

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f22b2da2-4071-8303-9ece-93ab4f3aacdf

---------

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

* improve: avoid rebuilding provider choices while typing a model API key (#207786)

* improve: avoid rebuilding provider choices while typing a model API key

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

* improve: avoid rebuilding provider choices while typing a model API key

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f5e75abf-1583-83f1-a72a-a8023ceb4625

---------

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

* improve: avoid re-sorting displayed runs when paging automation history (#207795)

* improve: reduce repeated work when paging automation history

Consume ordered history pages without re-sorting retained runs at every loading and append render. Keep stable ordering for shifted offset boundaries and immediate offline sort changes. Add an opt-in native-page count workload.

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

* improve: avoid re-sorting displayed runs when paging automation history

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e82048d2-da2c-8e54-a164-02a1db9a5532

---------

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

* fix: verify retained child results in the Ultra live check (#208026)

Read the matched child’s retained result after delivery and verify its run ID before checking the handoff token.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: bbaa86d0-6a79-4155-b69e-2701a35c57bd

* fix(ui): open the selected agent’s chat while reconnecting (#202680)

* fix(ui): open the selected agent chat while reconnecting

* fix(ui): open the selected agent’s chat while reconnecting

OpenClaw-Publication: 722da459-2f0c-4a1a-ac47-0e1899d47f20

* fix: give the installed Codex progress-reply test a conversation to reply to (#208063)

Create the isolated session with internal delivery before starting the installed agent. The transient WebChat flags alone do not advertise a message tool.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fdae7386-bdc9-4280-9e3e-a18ba8cea046

* fix: run the live trajectory export check against the built gateway (#208038)

Start a built Gateway for the live trajectory export test so the Codex plugin reads the configuration prepared by the Gateway. The test still requires an exact model reply, one-time export approval, and a bundle containing runtime and transcript events.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 055248a1-a1f2-441c-8237-58ff6cee3893

* fix: stop repair notices when their automation is removed (#208036)

Check the automation's ID and creation time before its repair notice continues. Deleting the automation stops the notice from resending its run history to the model. Ordinary edits let the notice finish.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 5d0644b7-f674-4578-ae3f-16f44b3b0e6d

* fix: restart launcher-managed Gateways after exit 78 (#207972)

## What Problem This Solves

A launcher-managed Gateway that exits 78 outside an update trial leaves the serving release down permanently.

## User Impact

The resident launcher now restarts that child with its existing crash backoff (1, 2, 5, 10, then 30 seconds). Trial configuration refusals still roll back. Direct-Gateway systemd services retain `RestartPreventExitStatus=78`. Launcher format 4, trial v2 and IPC bytes are unchanged. The existing launcher writer refreshes an installed file when its bytes differ, while preserving newer launcher formats.

## Why This Change Was Made

Delete the terminal non-trial exit branch rather than add another restart mechanism. Simplification retained the two-line deletion, one byte comparison in the existing writer, migrated lifecycle/replacement regressions and launcher-managed documentation. Production: -2 lines net; tests: +18 net; docs: +2.

## Evidence

- vitest-source, 600-second bounds: the migrated launcher test failed on unchanged main production code because the launcher exited before the first 1-second restart timer; the other 15 launcher tests passed.
- Immediately after the deletion, launcher and frozen-contract tests passed: 19 tests, including unchanged trial-78 rollback assertions and format-4 ready/stop exchange.
- Fake clock checks no child starts before each 1/2/5-second deadline and another child starts at each deadline.
- Focused Oxlint passed; formatter output matched the test file.
- Installed format-4 stale-content regression failed before the byte comparison: the old content remained. The replacement test also verifies a second identical write does not replace the file and newer launcher formats remain untouched.
- Rendering is deterministic: only static constants, flag arrays and source constants are interpolated; no timestamp, PID or install path enters the rendered bytes.
- Header-reader audit on main and shipped `v2026.12.1-beta.1`: `writeLauncher` previously replaced only older formats; `writeGitReleaseLauncher` preserves all formats >=2. A downgrade to the beta-era writer therefore still preserves an installed format-4 launcher as before. The frozen format-4 peer test remains unchanged.
- Prior-head [CI](https://github.com/openclaw/openclaw/actions/runs/46228136551) and [update-restart-auth package acceptance](https://github.com/openclaw/openclaw/actions/runs/46228140802) passed on `c5ad15b432742fc4b8b5455f7f4a512f2a291953`; byte-refresh repair requires fresh hosted evidence. No full local build was run per task scope.

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

* fix: keep sandbox commands working when workspace scratch is not writable (#208005)

Use the container's private /tmp when the sandbox user cannot write the default workspace scratch directory. Keep explicit temp paths and workspace permissions intact.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 31357588-6850-4ea3-a68d-52e744874a24

* fix(gateway): invalidate session history when a transcript publication rejects (#208051)

## Problem

When a transcript publication rejects, Gateway clients that follow the session get no event. Examples: a synchronous projection read throws `SessionRowFactsPending` (the count-sequence fallback fixed by #208004), the history worker fails with a non-overload error (`readSessionMessageByIdAsync` rethrows it), or event-row preparation fails. The Gateway logs `Transcript update dispatch failed` (`src/gateway/server-runtime-subscriptions.ts`) and publishes nothing: no `session.message`, no `sessions.changed`. The open chat stays stale until something else refetches it.

Log signature, reproduced on main: `Transcript update dispatch failed` with `Session row facts require worker reconciliation` (seen in CI runs of `session-message-events.history-worker.test.ts`; root cause in #208004). Any other rejection in the handler loses events the same way.

## Fix

`createTranscriptUpdateBroadcastHandler` already runs every transcript publication in its per-session queue. When the publication rejects, the queue now emits the existing history invalidation: `sessions.changed` with `phase: "message"` and no `messageId`/`messageSeq`. It goes to the same audience as a normal publication (session-event and message subscribers, `canReceiveSessionEvent` authorization, private scope for retired unqualified owners). Then it rethrows, so the existing warning and the live-source fallback stay.

- No new protocol field, event or schema. The protocol docs (`docs/gateway/protocol/rpc-bootstrap-and-events.md`) already say "Refetch history on that invalidation". Clients refetch on it: Control UI `ui/src/pages/chat/chat-state-events.ts`, Apple `ChatViewModel+TransportEvents.swift`, Android `ChatController.kt`.
- If the invalidation itself throws, the rethrown `AggregateError` carries both errors, so the existing warning logs both.
- Accepted edges:
  - A pending assistant error keeps its existing deferral, so no early error row appears.
  - A legacy marker-only update has no session key and stays log-only.
  - A rejection after a `session.message` was sent causes one extra, harmless refetch.
- Out of scope: lifecycle and background-process row handlers. They publish row snapshots, and their resync would be a row invalidation, which is a different signal.

## Users

| PR | Users | Failure class | Evidence |
|---|---|---|---|
| this | Gateway clients following a session (Control UI, iOS/macOS, Android, SDK) | silent stale chat after a rejected transcript publication | `server-runtime-subscriptions.ts` catch logs only; new tests red on main |

One-shot CLI runs do not use this publisher, so they are not affected.

## Evidence

- `session-message-events.history-worker.test.ts` "invalidates selected-session history when a transcript publication rejects": the history worker read rejects with a generic error. The client receives `sessions.changed` (`phase: "message"`, no `messageSeq`), and `chat.history` returns the committed message. Red on main (120 s timeout, no event), green with the fix.
- `server-session-events.recovery.test.ts` "invalidates history and keeps the rejection when a transcript read fails": the handler still rejects with the original error (the caller's warning path) and broadcasts once. Red on main, green with the fix.
- Production +55/-9 (one shared audience helper replaces the inline loop); tests +64.

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

* fix(workboard): open the board in app from dashboard widgets (#199922)

* fix: keep confirmed sends in the receiving chat's model history (#208049)

Supersedes #207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `a65ac074b3d6`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

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

* fix(qa): run the live log tail browser test again (#208020)

Point the live log tail scenario at the consolidated auto-follow browser test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 34b4a470-dfdd-48fb-aaba-59aec526e812

* fix: check managed child delivery in the Codex live suite (#208011)

Check that the parent receives the UUID chosen by its managed child. Let the Docker live suite use the Gateway's delegation defaults.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7f1bb837-8d14-46f3-82e5-8aa559e33b3e

* improve: speed up Doctor database repair tests (#208103)

Build the healthy migrated agent database once for the repair guard table. Give each case an independent file, registry, and maintenance lease so it still exercises the real defect, repair, and clean recheck.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: f5bae5e0-5d87-4d07-9178-2e4ab0ca2637

* fix(gateway): keep count-path session updates through store discovery (#208004)

## Problem

Scheduled CI kept failing `session-message-events.history-worker.test.ts` (count case, "after worker overload"): 5 of 15 scheduled runs, most recently run 46220607204. After #207862 the case waits the full 120 s test limit, so the event was missing, not late.

A traced CI sample (PR CI, Linux x64, Bun) showed the stop: after the transcript update, the count publication never reached `readSessionMessageCountAsync`, and a `chat.metadata.changed` from a session-store topology change arrived in the same window. A local repro then showed the cause:

```
Error: Session row facts require worker reconciliation
    at readSessionRowEntry (src/gateway/session-row-projection-materialize.ts:460)
    ...
    at selectSessionRowEntries (src/gateway/session-row-scope.ts:551)
```

`handleTranscriptUpdateBroadcast` (`src/gateway/server-session-events.ts`) assigns a cursor sequence to updates that arrive without `messageSeq`. To do that it prepared membership with its own loop and then called `projection.selectEntries()` synchronously. When store discovery runs inside that loop, the row's entry is still unread, so selection throws `SessionRowFactsPending`. That error means "re-enter through exact worker preparation". The handler did not handle it, so the publication failed and clients got neither `session.message` nor `sessions.changed`. The update was lost until the next refetch.

## Change

The count fallback reads its row through the session event publication rows (`sessionEventPublicationRows(projection).withReadyRows`, metadata only), the same owner `withPreparedEventRow` uses. It reaches `withPreparedExactRows`, which prepares membership and retries `SessionRowFactsPending`. The hand-written `prepareMembership` loop is removed.

Known edge, left as is: other throws before publication still reject the update. Only worker overload turns into a `sessions.changed` invalidation. That is a wider change and is not part of this fix.

## Who sees it

Gateway clients that follow a session (`sessions.messages.subscribe`, for example the Control UI) and receive transcript updates without `messageSeq` (`server-session-events.ts`, count fallback), while session-store topology changes (a store added, removed or rediscovered). One-shot CLI runs do not follow session events and do not see this.

## Evidence

- New test `delivers a count-path session update when the store topology changes`: emits a store topology change, then a transcript update without `messageSeq`. Red on base (120 s timeout, 3 of 3 runs), green with the fix (3 of 3, no memo).
- The CI shape (overload case plus store topology churn): 10 of 10 red on base, green with the fix.
- Existing history-worker overload cases and the session event consumer suites pass.
- What starts the store topology change during the CI run is inferred, not traced. The CI trace shows the publication stopping before the count read, with a `chat.metadata.changed` in the same window. The local repro with an explicit topology change gives the same signature and the stack above.

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

* fix: keep Telegram login tests independent of startup speed (#208106)

Wait for the Telegram progress note before checking lane ownership. Release both fixture gates on assertion failure so a slow login cannot spill into the next test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 177934d0-1fb5-4a06-beb2-10916a09ee47

* fix(release): identify jobs blocking child evidence sealing

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

* fix(release): clarify pinned FRV recovery eligibility

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

* fix(ci): add tagged reply control to the PR wrapper inventory (#208120)

* fix(android): keep the snooze deadline test independent of runner timing (#208097)

Advance the handset and Gateway clocks together during the post-save refresh. Check the exact deadline sent to the Gateway and the wake time returned to the handset.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6fb940cc-e4ef-4c8f-94a9-060a736f8c11

* test(process): keep cancel parity off execa's force-kill race (#208126)

## Problem

Scheduled CI run 46234040123 (checks-node-compact-large-42, shard core-runtime-infra-process-hosted-2) failed `src/process/spawn-broker/execa.test.ts > broker command transports > matches buffered cancel results and errors`:

```
-   "isForcefullyTerminated": true,      (direct execa, the reference side)
+   "isForcefullyTerminated": false,     (spawn broker)
    "isCanceled": true, "signal": "SIGTERM"   (both sides)
```

Both sides agree that the command was canceled and that the child exited on SIGTERM. Only the reference side, which calls `execa` directly in the test process, said "forcefully terminated".

Cause: execa starts a `forceKillAfterDelay` timer when it sends SIGTERM (`execa/lib/terminate/kill.js` `killOnTimeout`). If the parent event loop stalls longer than the delay before it reaps the exited child, the timer fires first. `kill('SIGKILL')` then succeeds on the unreaped child and sets `isForcefullyTerminated`, even though the child already exited on SIGTERM. The fixture used a 50 ms delay for every case, so a loaded runner can hit this race.

Reproduced with direct execa 10.2.1, outside the broker: cancel a SIGTERM-honoring child with `forceKillAfterDelay: 50`, then block the event loop for 200 ms in a `setImmediate`. Result 3/3: `signal: "SIGTERM"`, `isCanceled: true`, `isForcefullyTerminated: true`. With no stall, `isForcefullyTerminated` is `false`.

## Change

Test-only. Children that honor SIGTERM get a 5 s force-kill delay, so the timer cannot win the race. These children exit at once, so the tests take no longer. The `forced cancel` case ignores SIGTERM and keeps its 50 ms delay, so it still proves forced termination matches across the broker and direct execa.

## Impact

No product change. Process cancellation results stay correct: in the failing run the broker reported a cancel as a cancel (`isCanceled: true`, `failed: true`). The mismatch was the reference side's timer race.

## Evidence

- CI failure: https://github.com/openclaw/openclaw/actions/runs/46234040123/job/141256229744
- No `src/process` change in the window 84ca43a1..758614e7.
- Before the change: 5/5 green locally with load average ~39 (the race needs a stall over 50 ms).
- After the change: `execa.test.ts` full file 5/5 green, 27 passed, 3 skipped.

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

* test(state): keep schema modules out of read-only agent database access (#185841)

* fix(state): avoid eager writer imports in agent database reads

* test(state): keep schema modules out of read-only agent database access

* chore(release): close out 2026.11.11 on main (#208114)

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

* fix(outbound): record a plugin action's visible send once (#208130)

Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

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

* fix: let a fallback model finish after Code Mode reads

Allow the configured fallback model to finish after a completed Code Mode cell when every host call has a successful read receipt and qualifies for direct retry. Shell writes, unfinished cells and plugin lookups without an audited replay classification still block fallback.

Closes #207895

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: d49db423-f997-43b6-b23c-4d0be08459c0

* fix: let older automations read their conversation's memory (#208143)

## What Problem This Solves

Automations created before OpenClaw recorded the creating conversation (every job without `sourceConversation`, i.e. created before #179062) name that conversation only by session key. Their scheduled runs get no memory at all: every `knowledge_*` or memory tool call fails with "the host granted this session no memory audience", and the Gateway logs `memory audience unavailable: root session agent:<agent>:cron:<job>:run:<run> has no durable chat type`. The same runs still hold owner-only tools such as `exec`. A production automation that reads and writes the owner's knowledge vault every week hit this on every run.

## User Impact

- A key-only detached automation (`isolated` / `current`) now reads its conversation's current memory, the same way a bound automation does:
  - created in the owner's direct chat: the owner's private memory;
  - created in a group or channel: only that conversation's memory, never owner-private.
- When the job recorded a requester (profile or channel sender), that requester's owner status is checked at each occurrence first; without one, the run's existing owner bit decides, as it already does for the run's tools.
- If the conversation row is gone, archived or cannot be read, the run proceeds exactly as before (no memory, no pause, no failure).
- Board, workspace, sandbox, event target and the run's tools are unchanged. `main` and `session:<key>` targets are unchanged.
- `automations bind` stays available for the exact-incarnation link but is no longer needed for memory. Docs (`cli/cron` "Binding older jobs", `automation/cron-jobs/payloads`) and Doctor's unbound note say so.

Accepted edge case: a key-only run whose agent sandbox mode is `non-main` or `all` now gets owner-private memory it did not have, when the job was created in the owner's direct chat. The owner created these jobs in their own DM, and the run already holds owner authority.

## Why This Change Was Made

`resolveScheduledPrincipal` classifies these jobs as `unbound-parent` and gives them legacy owner authority, but `buildScheduledExecutionContext` pointed their memory at the cron run row, which never has a chat type, so the memory resolver always denied. The fix stays in the existing owner:

- `admitScheduledOccurrence` (`src/cron/execution-context-admission.ts`): for an `unbound-parent` principal on a detached run, read the key-linked conversation row once. A failed read becomes "no row". No generation lease, workspace binding, sandbox or pause change. A recorded requester is admitted per occurrence through the existing `admitScheduledRequesterGrant`.
- `buildScheduledExecutionContext` (`src/cron/execution-context.ts`): with a live row, memory becomes `{ source: "parent", parent: <current sessionKey/sessionId/lifecycleRevision>, owner }`. Everything else for `unbound-parent` is unchanged.
- The memory resolver (`src/plugins/memory-audience.ts`) does not change: it already maps a direct root + owner to owner-private and direct/group/channel to that conversation's partition, for both the embedded and the CLI runtime.
- `scheduledParentKeyOf` now derives the key from `resolveScheduledPrincipal` itself, so Doctor's access review and the development replay read the same row the runtime does; the replay vector (`execution-context-projection.ts`) already labels the memory gain as intended, so it needed no edit.

Not changed: Doctor auto-bind or any stored-row write, jobs with no parent key, bound jobs with no recorded requester. On current `main`, bound jobs keep following their conversation after a reset (#205887), so no reset-degraded path exists to special-case.

## Evidence

Real-admission tests (red on the merge base `bb5c001bb6fc`, green on this head; 6 tests failed on base, all pass on head):

- `execution-context-memory-audience.test.ts` (real admission → registry → embedded and CLI resolvers): key-only owner-DM job → owner-private; key-only group job → that group's conversation only; key-only job with a revoked recorded requester → conversation only; key-only job whose conversation is gone → no audience, run admitted.
- `execution-context.test.ts`: key-only detached job gets parent memory and nothing else (board/workspace/sandbox stay the run's); archived, removed and in-session (`session:<key>`) cases keep run-session memory.
- `execution-context-admission.test.ts`: key-only read takes no generation lease; a failed read still admits the run with its own memory.
- `isolated-agent/run.bind-parent.test.ts` (real cron service + timer): the unbound job now reaches its conversation's memory, without a run-row receipt.

Local runs: the 27 test files that import the changed sources passed (`ocx test`, 6 shards). `pnpm check:changed`: typecheck, lint, guards all ok; the dead-export scan fails only on files this PR does not touch (`src/agents/command/types.ts`, `src/plugins/native-module-require.ts`, `ui/src/...`, `src/gateway/server-methods/update.test-harness.ts`), same as `main`.

End to end, scratch Gateway from source, `plugins.slots.memory: "knowledge"`, real model (`openai/gpt-5.5`). An owner Control UI direct chat was created by one real `chat.send` (row `chatType: "direct"`). A key-only isolated `agentTurn` job (owner key = that chat, no `sourceConversation`, no recorded requester, no tool policy, `toolsAllow` incl. `knowledge_remember`, `knowledge_grep`, `exec`) fired from its own `at` schedule about two minutes ahead (no forced run).

Base (`bb5c001bb6fc`):

```
[agent/embedded] memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```
```
knowledge_remember: "Knowledge access unavailable: the host granted this session no memory audience. The Gateway log entry "memory_audience_denied" for this session names the reas…
vyctorbrzezowski added a commit that referenced this pull request Nov 29, 2026
…#207982)

* improve(ui): show the project beside Cmd+K session settings (#203754)

Move project selection and its New worktree switch into the visible project field. Keep agent selection and Remember settings in their original menu.

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

* fix: stop warning about unsaved drafts when opening a chat (#203741)

* fix: stop warning about unsaved drafts when opening a chat

Keep failed background recovery reads distinct from failed edits in the composer and Side chat. Keep one access notice when browser storage is unavailable without consuming the warning for a later failed save.

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

* fix: stop warning about unsaved drafts when opening a chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 227e24ff-2a24-4a82-a325-e7787c443eed

---------

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

* fix(logbook): clear obsolete errors when retrying actions (#199461)

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

* fix(ui): keep the sidebar session list collapsed (#207832)

* fix(ui): keep the flat session list collapsed

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

* fix(ui): keep the sidebar session list collapsed

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d5d9e6c3-ba53-4dec-9efe-a5a9c5c29445

* fix(ui): page the sidebar only when it scrolls to the end

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

---------

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

* fix: stop treating limited access as an Inbox alert (#207737)

* fix: stop treating limited access as an inbox alert

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

* fix: stop treating limited access as an Inbox alert

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a014cab4-b01d-458b-aa67-ec83ad3a2a99

---------

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

* fix: child session activity ring freezes during startup (#188147)

* fix: child session activity ring freezes during startup

Project accepted preparation as running without starting the execution clock. Reserve queued presentation for actual mailbox/global-lane waits and preserve recorded capacity waits.

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

* fix: child session activity ring freezes during startup

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 2bf26c5b-2410-44b2-9915-d2289a90f388

* fix: align Gateway consumers with active session startup

Expect active accepted chat preparation, record a real lane wait in metrics, and distinguish preparation from actual queued input in describe/list coverage.

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

* Publish openclaw/plaid-crayfish

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 29690b6c-a214-45c1-9591-fd19b1d51336

* test(gateway): cover child startup in the current session checks

---------

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

* fix: remove hover tooltips from Workboard cards (#207928)

* improve: tighten Sessions board card typography (#207931)

* fix: keep Sessions board card hover neutral instead of column color (#207932)

* fix: keep wrapped Settings help links visibly focused on phones (#203819)

* fix(ui): keep wrapped device help links visibly focused

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

* fix: show the full focus outline on wrapped device help links

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 7b5d66ad-f165-8076-9dcf-5dd7cd64f0d9

* fix(ui): show wrapped settings help focus at the phone gutter

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

---------

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

* fix: keep the selected Review file compact when the tree is open (#203825)

* fix: show the full filename in Review diff headings

Allow the heading to wrap the whole filename instead of reserving the line for its extension. Keep the compact file tree presentation unchanged.

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

* fix: show the full filename in Review diff headings

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ba141dca-cfb0-85b2-a5bb-102d1536c092

* fix: identify the selected file in a narrow Review panel

Keep the destination filename visible above the diff and reserve room for its stem in the changed-files tree.

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

* fix: keep identifying filenames and diff actions on one row

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

* fix: keep short file extensions intact in Review headings

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

* test: verify renamed and short files in the compact Review tree

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

---------

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

* fix: hide desktop Details when there is nothing to show (#205093)

* fix: hide desktop Details when there is nothing to show

* fix(ui): discover session details before mounting the panel

* fix: keep tagged silent replies out of chat (#207738)

* fix(subagents): warn when cancel cannot confirm the worker stopped (#208041)

* fix: align Control UI tooling and docs with task card removal (#207747)

* improve: give assistant chat bubbles a calmer neutral background (#203729)

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

* fix: show empty chat search results while a collaborator types (#208010)

Use the filtered transcript to show when a chat search has no matches and to restore the reader’s place. Keep the collaborator’s typing preview visible.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fb4672e-d1b4-419c-8551-3ab267f39de3

* test(openai): expect progress instructions in the GPT-Live handshake (#208006)

Expect the direct GPT-Live session.update frame to include the operator's instructions followed by the progress-claims instruction. Keep the full-frame equality check.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 0e4639f8-64cf-4b54-8c52-6d1dd823278c

* fix: keep project picker errors readable (#203763)

* fix(ui): keep project picker errors and retry inside the menu

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

* fix: keep project picker errors readable

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e5cd3cf3-150f-4766-bab3-ca89f29252d1

* test: keep the project picker regression mergeable

---------

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

* fix: keep long answer summaries readable in chat (#203779)

* fix: keep long answer summaries readable in chat

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

* fix: keep long answer summaries readable in chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 40161eb2-ab93-4ac4-810c-656cc6a8d664

---------

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

* fix: check the refusal reason for revoked queued followups (#208025)

The Gateway intentionally reports a withheld failure for invalidated sign-in. Keep the model, executed-run, and queue assertions and distinguish this refusal from an unrelated error.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fd6e1bc9-ac1b-4a0b-86c8-4d15ea9d65ac

* fix(qa): replay Claude compaction completion in the Telegram live lane (#208001)

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: edeb5fcc-cfe8-4ad3-9b38-37bdb3073cd8

* refactor(ui): remove unused English catalog entries (#201419)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>

* refactor(ui): remove dead Settings text (Labs, Updates, forms, devices, memory) (#201421)

* refactor(ui): remove unused Labs parallel-task copy

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

* refactor(ui): remove Labs parallel-task text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3b47ea07-0bd0-8cab-9425-6c67975a8f24

* refactor(ui): remove unused Updates copy

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

* refactor(ui): remove unused settings form and appearance copy

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

* refactor(ui): remove unused device, desktop and systems copy

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

* refactor(ui): remove unused dream diary copy

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

* Publish openclaw/quick-lobster-5

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3512bcc3-a350-8bc4-8c43-92639564075b

---------

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

* refactor(ui): remove dead New session, Sessions, Agents, Templates and OpenClaw ID text (#201422)

* refactor(ui): remove unused New session copy

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

* refactor(ui): remove New session text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 609418e2-3a64-8b1d-a39e-9376e4b8949f

* refactor(ui): remove unused Sessions copy

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

* refactor(ui): remove unused Templates copy

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

* refactor(ui): remove unused agent identity and file copy

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

* refactor(ui): remove unused OpenClaw ID copy

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

* Publish openclaw/oceanic-claw-2

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: dcc9dcf1-1890-866a-b5d9-3dff693a5d98

---------

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

* refactor(ui): remove dead model setup, Models and model picker text (#201424)

* refactor(ui): remove unused model setup copy

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

* refactor(ui): remove model setup text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 18ddea1b-160c-8672-a918-2a952c072c15

* refactor(ui): remove unused model provider list copy

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

* refactor(ui): remove unused add-provider and default model copy

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

* refactor(ui): remove unused model picker labels

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

* refactor(ui): remove unused model picker loading copy

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

* refactor(ui): remove dead model setup, Models and model picker text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 6fac1775-a172-8071-8591-9561a51d33c3

---------

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

* refactor(ui): remove dead agent tools, Skills and Usage text (#201429)

* refactor(ui): remove unused agent tool access copy

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

* refactor(ui): remove agent tool access text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4211d89a-e4f4-80e4-9be2-de8848a06a63

* refactor(ui): remove unused Skills copy

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

* refactor(ui): remove unused Usage copy

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

* refactor(ui): remove dead agent tools, Skills and Usage text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 33be6fec-530e-814d-9867-ce808e91d99e

---------

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

* refactor(ui): remove unused English text from chat side panels (#201452)

* refactor(ui): remove unused side chat copy

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

* refactor(ui): remove unused subagent and process panel copy

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

* refactor(ui): remove unused session files and changes copy

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

* refactor(ui): remove unused English text from chat side panels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 32359a08-da6f-86b4-81de-e0c5dbb4226b

---------

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

* refactor(ui): remove unused English text from chat and pull request cards (#201454)

* refactor(ui): remove unused composer and message copy

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

* refactor(ui): remove unused chat status copy

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

* refactor(ui): remove unused pull request copy

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

* refactor(ui): remove unused English text from chat and pull request cards

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: cdb7136a-c0bc-888a-829e-af2403beb226

* test(ui): verify composer translations with a live menu label

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

---------

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

* refactor(ui): remove unused English text from plugin settings and catalog pages (#201455)

* refactor(ui): remove unused plugin settings and access copy

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

* refactor(ui): remove unused plugin lifecycle and catalog search copy

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

* refactor(ui): remove unused plugin catalog filter and paging copy

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

* refactor(ui): remove unused plugin detail fact copy

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

* refactor(ui): remove unused English text from plugin settings and catalog pages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f24e2625-05eb-8d99-8e8a-e31549355657

---------

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels (#201456)

* refactor(ui): remove unused plugin detail tab and install count copy

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

* refactor(ui): remove unused installed plugin list and category copy

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

* refactor(ui): remove unused plugin status and source copy

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 57d467b8-c62d-825a-a303-31d561f0d69c

---------

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

* test(live): reject failed Moonshot completions (#207728)

* test(live): reject failed Moonshot completions

* test(live): use the current Moonshot model and thinking policy

* test(live): exercise the Moonshot provider thinking policy

* test(live): run the registered Moonshot stream hook

* test(live): load the Moonshot catalog through its public facade

* test(live): type the Moonshot catalog builder as a function

* test(gateway): isolate publication notice memory pressure (#207995)

* fix: test provider review continuations after device removal (#208022)

Check that the removed device disconnects while the already-admitted continuation sends only its acknowledged steer and clears the accepted review. Keep the viewer rejection at admission.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7ff67804-adab-4c48-b5d8-f0b4334dff46

* improve: reduce memory used by concurrent agent runs (#208033)

* perf(agents): reduce heap held by concurrent runs

Reuse MCP input schema publications and Code Mode declarations through their bounded catalog owners. Resolve embedded runs with the selected-model registry view and hydrate sibling records on demand.

* fix(agents): preserve MCP refresh for deeply nested schemas

If the reuse comparison cannot serialize a changed wire schema, defer to the existing publisher and its depth handling.

* test(agents): update MCP recovery snapshot assertion

* fix: isolate the hook token reload check from plugin startup (#208040)

Keep the real Gateway, config reload, approval and child process. The token probe does not need plugins, whose startup can outlast its five-second child deadline.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b6aeceb4-1e62-4a21-af66-41b77081ed09

* chore: unblock core lint by fixing oxlint errors in Workboard e2e tests (#208075)

Origin: #207839

## What Problem This Solves

`main` fails `check-lint-core-5`, so every open PR shows that lint shard red. #207839 added three oxlint errors in two Control UI e2e tests:

- `ui/src/e2e/workboard-locale.e2e.test.ts:93`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:154`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:178`: `unicorn/prefer-dom-node-text-content`

## User Impact

No product change. This is test-only. Contributors get a green core lint shard again.

## Why This Change Was Made

- Two single-line `if` statements now have braces.
- The mobile editor test reads the column row with Playwright `textContent()` instead of `innerText()`. The assertion keeps its meaning: it checks that the renamed column label "Finished" shows in the row. The label is in the always-rendered `.settings-row__title` span. `textContent` also includes the row's description, and the test does not change it. The new label can only be found if the rename worked.
- Lint rules and other files are not changed.

## Evidence

- On `main` (8d3188542dce), `node scripts/run-oxlint.mjs` on the 2 files: 3 errors (the ones shown above). With this change: `Found 0 warnings and 0 errors`. `oxfmt --check`: clean.
- `vitest --config test/vitest/vitest.ui-e2e.config.ts` on both files, run 2 times: `Test Files 2 passed (2)`, `Tests 4 passed (4)` each time.

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

* perf(gateway): skip display preparation during history sharing checks (#208062)

* chore: simplify Workboard session filter tests (#207853)

* chore: simplify Workboard session filter tests

* test: retain session visibility and reference reset checks

* test: check revoked board references on a cached read

* test: fix prompt-cache journey tool and scope expectations (#208055)

Check web_fetch membership in the latest deferred-tool list. Send chat with
writer scope in Tool Search opt-out journeys so direct and internal turns
can compare the full automations schema.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 62582bff-c96b-4a17-9051-3daa5fa19044

* fix: make the chat sidebar swipe reachable on Android (#208037)

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6251590e-fd83-4a72-bf88-6000e34d9e6d

* improve(ios): avoid repeated Keychain reads when opening chat (#207667)

* perf(ios): keep Keychain reads out of chat identity

* improve(ios): avoid repeated Keychain reads when opening chat

OpenClaw-Publication: 4ebe6ce8-9b61-8209-be76-df43a417621d

* improve(ios): skip Talk PCM player setup until audio plays (#207668)

* perf(ios): defer PCM player initialization until playback

* improve(ios): skip Talk PCM player setup until audio plays

OpenClaw-Publication: 0fd39061-45a1-8858-970d-0b837bb5dac5

* fix: keep session writes working after a gateway restart (#208031)

Give a newly admitted schema its own validity cell when its markers change. Retain the existing cell when the markers match so unchanged borrowers stay valid.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 3c81c608-4a5c-4c8c-85b1-c3e5b827cd03

* fix: stop the live Tool Search probe from reporting false connection failures (#208034)

Scope the live probe’s session catalog to its fixture tools and discovery controls. Return service availability from the status tool and preserve the wire assertion if the runner throws.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4b9ea82e-e287-494d-a59e-9523243f60ee

* improve: reduce sidebar work when other chats update (#207791)

* improve: reduce sidebar work when other chats update

Reuse the already reconciled primary result for an identical retained window with the same agent and archive filter. Keep independent windows on their existing reconciliation path.

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

* improve: reduce sidebar work when other chats update

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f22b2da2-4071-8303-9ece-93ab4f3aacdf

---------

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

* improve: avoid rebuilding provider choices while typing a model API key (#207786)

* improve: avoid rebuilding provider choices while typing a model API key

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

* improve: avoid rebuilding provider choices while typing a model API key

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f5e75abf-1583-83f1-a72a-a8023ceb4625

---------

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

* improve: avoid re-sorting displayed runs when paging automation history (#207795)

* improve: reduce repeated work when paging automation history

Consume ordered history pages without re-sorting retained runs at every loading and append render. Keep stable ordering for shifted offset boundaries and immediate offline sort changes. Add an opt-in native-page count workload.

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

* improve: avoid re-sorting displayed runs when paging automation history

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e82048d2-da2c-8e54-a164-02a1db9a5532

---------

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

* fix: verify retained child results in the Ultra live check (#208026)

Read the matched child’s retained result after delivery and verify its run ID before checking the handoff token.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: bbaa86d0-6a79-4155-b69e-2701a35c57bd

* fix(ui): open the selected agent’s chat while reconnecting (#202680)

* fix(ui): open the selected agent chat while reconnecting

* fix(ui): open the selected agent’s chat while reconnecting

OpenClaw-Publication: 722da459-2f0c-4a1a-ac47-0e1899d47f20

* fix: give the installed Codex progress-reply test a conversation to reply to (#208063)

Create the isolated session with internal delivery before starting the installed agent. The transient WebChat flags alone do not advertise a message tool.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fdae7386-bdc9-4280-9e3e-a18ba8cea046

* fix: run the live trajectory export check against the built gateway (#208038)

Start a built Gateway for the live trajectory export test so the Codex plugin reads the configuration prepared by the Gateway. The test still requires an exact model reply, one-time export approval, and a bundle containing runtime and transcript events.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 055248a1-a1f2-441c-8237-58ff6cee3893

* fix: stop repair notices when their automation is removed (#208036)

Check the automation's ID and creation time before its repair notice continues. Deleting the automation stops the notice from resending its run history to the model. Ordinary edits let the notice finish.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 5d0644b7-f674-4578-ae3f-16f44b3b0e6d

* fix: restart launcher-managed Gateways after exit 78 (#207972)

## What Problem This Solves

A launcher-managed Gateway that exits 78 outside an update trial leaves the serving release down permanently.

## User Impact

The resident launcher now restarts that child with its existing crash backoff (1, 2, 5, 10, then 30 seconds). Trial configuration refusals still roll back. Direct-Gateway systemd services retain `RestartPreventExitStatus=78`. Launcher format 4, trial v2 and IPC bytes are unchanged. The existing launcher writer refreshes an installed file when its bytes differ, while preserving newer launcher formats.

## Why This Change Was Made

Delete the terminal non-trial exit branch rather than add another restart mechanism. Simplification retained the two-line deletion, one byte comparison in the existing writer, migrated lifecycle/replacement regressions and launcher-managed documentation. Production: -2 lines net; tests: +18 net; docs: +2.

## Evidence

- vitest-source, 600-second bounds: the migrated launcher test failed on unchanged main production code because the launcher exited before the first 1-second restart timer; the other 15 launcher tests passed.
- Immediately after the deletion, launcher and frozen-contract tests passed: 19 tests, including unchanged trial-78 rollback assertions and format-4 ready/stop exchange.
- Fake clock checks no child starts before each 1/2/5-second deadline and another child starts at each deadline.
- Focused Oxlint passed; formatter output matched the test file.
- Installed format-4 stale-content regression failed before the byte comparison: the old content remained. The replacement test also verifies a second identical write does not replace the file and newer launcher formats remain untouched.
- Rendering is deterministic: only static constants, flag arrays and source constants are interpolated; no timestamp, PID or install path enters the rendered bytes.
- Header-reader audit on main and shipped `v2026.12.1-beta.1`: `writeLauncher` previously replaced only older formats; `writeGitReleaseLauncher` preserves all formats >=2. A downgrade to the beta-era writer therefore still preserves an installed format-4 launcher as before. The frozen format-4 peer test remains unchanged.
- Prior-head [CI](https://github.com/openclaw/openclaw/actions/runs/46228136551) and [update-restart-auth package acceptance](https://github.com/openclaw/openclaw/actions/runs/46228140802) passed on `c5ad15b432742fc4b8b5455f7f4a512f2a291953`; byte-refresh repair requires fresh hosted evidence. No full local build was run per task scope.

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

* fix: keep sandbox commands working when workspace scratch is not writable (#208005)

Use the container's private /tmp when the sandbox user cannot write the default workspace scratch directory. Keep explicit temp paths and workspace permissions intact.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 31357588-6850-4ea3-a68d-52e744874a24

* fix(gateway): invalidate session history when a transcript publication rejects (#208051)

## Problem

When a transcript publication rejects, Gateway clients that follow the session get no event. Examples: a synchronous projection read throws `SessionRowFactsPending` (the count-sequence fallback fixed by #208004), the history worker fails with a non-overload error (`readSessionMessageByIdAsync` rethrows it), or event-row preparation fails. The Gateway logs `Transcript update dispatch failed` (`src/gateway/server-runtime-subscriptions.ts`) and publishes nothing: no `session.message`, no `sessions.changed`. The open chat stays stale until something else refetches it.

Log signature, reproduced on main: `Transcript update dispatch failed` with `Session row facts require worker reconciliation` (seen in CI runs of `session-message-events.history-worker.test.ts`; root cause in #208004). Any other rejection in the handler loses events the same way.

## Fix

`createTranscriptUpdateBroadcastHandler` already runs every transcript publication in its per-session queue. When the publication rejects, the queue now emits the existing history invalidation: `sessions.changed` with `phase: "message"` and no `messageId`/`messageSeq`. It goes to the same audience as a normal publication (session-event and message subscribers, `canReceiveSessionEvent` authorization, private scope for retired unqualified owners). Then it rethrows, so the existing warning and the live-source fallback stay.

- No new protocol field, event or schema. The protocol docs (`docs/gateway/protocol/rpc-bootstrap-and-events.md`) already say "Refetch history on that invalidation". Clients refetch on it: Control UI `ui/src/pages/chat/chat-state-events.ts`, Apple `ChatViewModel+TransportEvents.swift`, Android `ChatController.kt`.
- If the invalidation itself throws, the rethrown `AggregateError` carries both errors, so the existing warning logs both.
- Accepted edges:
  - A pending assistant error keeps its existing deferral, so no early error row appears.
  - A legacy marker-only update has no session key and stays log-only.
  - A rejection after a `session.message` was sent causes one extra, harmless refetch.
- Out of scope: lifecycle and background-process row handlers. They publish row snapshots, and their resync would be a row invalidation, which is a different signal.

## Users

| PR | Users | Failure class | Evidence |
|---|---|---|---|
| this | Gateway clients following a session (Control UI, iOS/macOS, Android, SDK) | silent stale chat after a rejected transcript publication | `server-runtime-subscriptions.ts` catch logs only; new tests red on main |

One-shot CLI runs do not use this publisher, so they are not affected.

## Evidence

- `session-message-events.history-worker.test.ts` "invalidates selected-session history when a transcript publication rejects": the history worker read rejects with a generic error. The client receives `sessions.changed` (`phase: "message"`, no `messageSeq`), and `chat.history` returns the committed message. Red on main (120 s timeout, no event), green with the fix.
- `server-session-events.recovery.test.ts` "invalidates history and keeps the rejection when a transcript read fails": the handler still rejects with the original error (the caller's warning path) and broadcasts once. Red on main, green with the fix.
- Production +55/-9 (one shared audience helper replaces the inline loop); tests +64.

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

* fix(workboard): open the board in app from dashboard widgets (#199922)

* fix: keep confirmed sends in the receiving chat's model history (#208049)

Supersedes #207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `a65ac074b3d6`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

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

* fix(qa): run the live log tail browser test again (#208020)

Point the live log tail scenario at the consolidated auto-follow browser test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 34b4a470-dfdd-48fb-aaba-59aec526e812

* fix: check managed child delivery in the Codex live suite (#208011)

Check that the parent receives the UUID chosen by its managed child. Let the Docker live suite use the Gateway's delegation defaults.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7f1bb837-8d14-46f3-82e5-8aa559e33b3e

* improve: speed up Doctor database repair tests (#208103)

Build the healthy migrated agent database once for the repair guard table. Give each case an independent file, registry, and maintenance lease so it still exercises the real defect, repair, and clean recheck.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: f5bae5e0-5d87-4d07-9178-2e4ab0ca2637

* fix(gateway): keep count-path session updates through store discovery (#208004)

## Problem

Scheduled CI kept failing `session-message-events.history-worker.test.ts` (count case, "after worker overload"): 5 of 15 scheduled runs, most recently run 46220607204. After #207862 the case waits the full 120 s test limit, so the event was missing, not late.

A traced CI sample (PR CI, Linux x64, Bun) showed the stop: after the transcript update, the count publication never reached `readSessionMessageCountAsync`, and a `chat.metadata.changed` from a session-store topology change arrived in the same window. A local repro then showed the cause:

```
Error: Session row facts require worker reconciliation
    at readSessionRowEntry (src/gateway/session-row-projection-materialize.ts:460)
    ...
    at selectSessionRowEntries (src/gateway/session-row-scope.ts:551)
```

`handleTranscriptUpdateBroadcast` (`src/gateway/server-session-events.ts`) assigns a cursor sequence to updates that arrive without `messageSeq`. To do that it prepared membership with its own loop and then called `projection.selectEntries()` synchronously. When store discovery runs inside that loop, the row's entry is still unread, so selection throws `SessionRowFactsPending`. That error means "re-enter through exact worker preparation". The handler did not handle it, so the publication failed and clients got neither `session.message` nor `sessions.changed`. The update was lost until the next refetch.

## Change

The count fallback reads its row through the session event publication rows (`sessionEventPublicationRows(projection).withReadyRows`, metadata only), the same owner `withPreparedEventRow` uses. It reaches `withPreparedExactRows`, which prepares membership and retries `SessionRowFactsPending`. The hand-written `prepareMembership` loop is removed.

Known edge, left as is: other throws before publication still reject the update. Only worker overload turns into a `sessions.changed` invalidation. That is a wider change and is not part of this fix.

## Who sees it

Gateway clients that follow a session (`sessions.messages.subscribe`, for example the Control UI) and receive transcript updates without `messageSeq` (`server-session-events.ts`, count fallback), while session-store topology changes (a store added, removed or rediscovered). One-shot CLI runs do not follow session events and do not see this.

## Evidence

- New test `delivers a count-path session update when the store topology changes`: emits a store topology change, then a transcript update without `messageSeq`. Red on base (120 s timeout, 3 of 3 runs), green with the fix (3 of 3, no memo).
- The CI shape (overload case plus store topology churn): 10 of 10 red on base, green with the fix.
- Existing history-worker overload cases and the session event consumer suites pass.
- What starts the store topology change during the CI run is inferred, not traced. The CI trace shows the publication stopping before the count read, with a `chat.metadata.changed` in the same window. The local repro with an explicit topology change gives the same signature and the stack above.

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

* fix: keep Telegram login tests independent of startup speed (#208106)

Wait for the Telegram progress note before checking lane ownership. Release both fixture gates on assertion failure so a slow login cannot spill into the next test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 177934d0-1fb5-4a06-beb2-10916a09ee47

* fix(release): identify jobs blocking child evidence sealing

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

* fix(release): clarify pinned FRV recovery eligibility

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

* fix(ci): add tagged reply control to the PR wrapper inventory (#208120)

* fix(android): keep the snooze deadline test independent of runner timing (#208097)

Advance the handset and Gateway clocks together during the post-save refresh. Check the exact deadline sent to the Gateway and the wake time returned to the handset.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6fb940cc-e4ef-4c8f-94a9-060a736f8c11

* test(process): keep cancel parity off execa's force-kill race (#208126)

## Problem

Scheduled CI run 46234040123 (checks-node-compact-large-42, shard core-runtime-infra-process-hosted-2) failed `src/process/spawn-broker/execa.test.ts > broker command transports > matches buffered cancel results and errors`:

```
-   "isForcefullyTerminated": true,      (direct execa, the reference side)
+   "isForcefullyTerminated": false,     (spawn broker)
    "isCanceled": true, "signal": "SIGTERM"   (both sides)
```

Both sides agree that the command was canceled and that the child exited on SIGTERM. Only the reference side, which calls `execa` directly in the test process, said "forcefully terminated".

Cause: execa starts a `forceKillAfterDelay` timer when it sends SIGTERM (`execa/lib/terminate/kill.js` `killOnTimeout`). If the parent event loop stalls longer than the delay before it reaps the exited child, the timer fires first. `kill('SIGKILL')` then succeeds on the unreaped child and sets `isForcefullyTerminated`, even though the child already exited on SIGTERM. The fixture used a 50 ms delay for every case, so a loaded runner can hit this race.

Reproduced with direct execa 10.2.1, outside the broker: cancel a SIGTERM-honoring child with `forceKillAfterDelay: 50`, then block the event loop for 200 ms in a `setImmediate`. Result 3/3: `signal: "SIGTERM"`, `isCanceled: true`, `isForcefullyTerminated: true`. With no stall, `isForcefullyTerminated` is `false`.

## Change

Test-only. Children that honor SIGTERM get a 5 s force-kill delay, so the timer cannot win the race. These children exit at once, so the tests take no longer. The `forced cancel` case ignores SIGTERM and keeps its 50 ms delay, so it still proves forced termination matches across the broker and direct execa.

## Impact

No product change. Process cancellation results stay correct: in the failing run the broker reported a cancel as a cancel (`isCanceled: true`, `failed: true`). The mismatch was the reference side's timer race.

## Evidence

- CI failure: https://github.com/openclaw/openclaw/actions/runs/46234040123/job/141256229744
- No `src/process` change in the window 84ca43a1..758614e7.
- Before the change: 5/5 green locally with load average ~39 (the race needs a stall over 50 ms).
- After the change: `execa.test.ts` full file 5/5 green, 27 passed, 3 skipped.

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

* test(state): keep schema modules out of read-only agent database access (#185841)

* fix(state): avoid eager writer imports in agent database reads

* test(state): keep schema modules out of read-only agent database access

* chore(release): close out 2026.11.11 on main (#208114)

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

* fix(outbound): record a plugin action's visible send once (#208130)

Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

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

* fix: let a fallback model finish after Code Mode reads

Allow the configured fallback model to finish after a completed Code Mode cell when every host call has a successful read receipt and qualifies for direct retry. Shell writes, unfinished cells and plugin lookups without an audited replay classification still block fallback.

Closes #207895

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: d49db423-f997-43b6-b23c-4d0be08459c0

* fix: let older automations read their conversation's memory (#208143)

## What Problem This Solves

Automations created before OpenClaw recorded the creating conversation (every job without `sourceConversation`, i.e. created before #179062) name that conversation only by session key. Their scheduled runs get no memory at all: every `knowledge_*` or memory tool call fails with "the host granted this session no memory audience", and the Gateway logs `memory audience unavailable: root session agent:<agent>:cron:<job>:run:<run> has no durable chat type`. The same runs still hold owner-only tools such as `exec`. A production automation that reads and writes the owner's knowledge vault every week hit this on every run.

## User Impact

- A key-only detached automation (`isolated` / `current`) now reads its conversation's current memory, the same way a bound automation does:
  - created in the owner's direct chat: the owner's private memory;
  - created in a group or channel: only that conversation's memory, never owner-private.
- When the job recorded a requester (profile or channel sender), that requester's owner status is checked at each occurrence first; without one, the run's existing owner bit decides, as it already does for the run's tools.
- If the conversation row is gone, archived or cannot be read, the run proceeds exactly as before (no memory, no pause, no failure).
- Board, workspace, sandbox, event target and the run's tools are unchanged. `main` and `session:<key>` targets are unchanged.
- `automations bind` stays available for the exact-incarnation link but is no longer needed for memory. Docs (`cli/cron` "Binding older jobs", `automation/cron-jobs/payloads`) and Doctor's unbound note say so.

Accepted edge case: a key-only run whose agent sandbox mode is `non-main` or `all` now gets owner-private memory it did not have, when the job was created in the owner's direct chat. The owner created these jobs in their own DM, and the run already holds owner authority.

## Why This Change Was Made

`resolveScheduledPrincipal` classifies these jobs as `unbound-parent` and gives them legacy owner authority, but `buildScheduledExecutionContext` pointed their memory at the cron run row, which never has a chat type, so the memory resolver always denied. The fix stays in the existing owner:

- `admitScheduledOccurrence` (`src/cron/execution-context-admission.ts`): for an `unbound-parent` principal on a detached run, read the key-linked conversation row once. A failed read becomes "no row". No generation lease, workspace binding, sandbox or pause change. A recorded requester is admitted per occurrence through the existing `admitScheduledRequesterGrant`.
- `buildScheduledExecutionContext` (`src/cron/execution-context.ts`): with a live row, memory becomes `{ source: "parent", parent: <current sessionKey/sessionId/lifecycleRevision>, owner }`. Everything else for `unbound-parent` is unchanged.
- The memory resolver (`src/plugins/memory-audience.ts`) does not change: it already maps a direct root + owner to owner-private and direct/group/channel to that conversation's partition, for both the embedded and the CLI runtime.
- `scheduledParentKeyOf` now derives the key from `resolveScheduledPrincipal` itself, so Doctor's access review and the development replay read the same row the runtime does; the replay vector (`execution-context-projection.ts`) already labels the memory gain as intended, so it needed no edit.

Not changed: Doctor auto-bind or any stored-row write, jobs with no parent key, bound jobs with no recorded requester. On current `main`, bound jobs keep following their conversation after a reset (#205887), so no reset-degraded path exists to special-case.

## Evidence

Real-admission tests (red on the merge base `bb5c001bb6fc`, green on this head; 6 tests failed on base, all pass on head):

- `execution-context-memory-audience.test.ts` (real admission → registry → embedded and CLI resolvers): key-only owner-DM job → owner-private; key-only group job → that group's conversation only; key-only job with a revoked recorded requester → conversation only; key-only job whose conversation is gone → no audience, run admitted.
- `execution-context.test.ts`: key-only detached job gets parent memory and nothing else (board/workspace/sandbox stay the run's); archived, removed and in-session (`session:<key>`) cases keep run-session memory.
- `execution-context-admission.test.ts`: key-only read takes no generation lease; a failed read still admits the run with its own memory.
- `isolated-agent/run.bind-parent.test.ts` (real cron service + timer): the unbound job now reaches its conversation's memory, without a run-row receipt.

Local runs: the 27 test files that import the changed sources passed (`ocx test`, 6 shards). `pnpm check:changed`: typecheck, lint, guards all ok; the dead-export scan fails only on files this PR does not touch (`src/agents/command/types.ts`, `src/plugins/native-module-require.ts`, `ui/src/...`, `src/gateway/server-methods/update.test-harness.ts`), same as `main`.

End to end, scratch Gateway from source, `plugins.slots.memory: "knowledge"`, real model (`openai/gpt-5.5`). An owner Control UI direct chat was created by one real `chat.send` (row `chatType: "direct"`). A key-only isolated `agentTurn` job (owner key = that chat, no `sourceConversation`, no recorded requester, no tool policy, `toolsAllow` incl. `knowledge_remember`, `knowledge_grep`, `exec`) fired from its own `at` schedule about two minutes ahead (no forced run).

Base (`bb5c001bb6fc`):

```
[agent/embedded] memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```
```
knowledge_remember: "Knowledge access unavailable: the host granted this session no memory audience. The Gateway log entry "memory_audience_denied" for this session names the reason and its repair."
knowledge_grep: "Knowledge access unavailable: the host granted this session no memory audience. ..."
```

Head: no `memory audience unavailable` line in the Gateway log; the run's result:

```
knowledge_remember: inserted claim <claim-id>.
knowledge_grep: 1 hit — <claim-id>: "The owner's favorite tea is masala chai."
```

The claim was written under the store's `vault/private/` (owner-private).

Observed, not changed here: a session created only through `openclaw agent --session-key agent:main:main` from the CLI has no `chatType`, so a key-only job linked to such a row still gets no memory (Doctor already lists these under "no stored chat type"). Channel DMs and Control UI chats record `chatType: "direct"`.

Merge danger: two-way door. No schema, stored-row, config or protocol change; a revert restores the previous memory decision. Blast radius: memory audience of detached scheduled runs whose jobs have no `sourceConversation` but an owner/policy session key.

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

* fix(qa): let Matrix message-action checks run in creator-owned v12 rooms (#208029)

Verify the room creation event before exercising all five Matrix message actions. The homeserver authorizes the pin, and the observer verifies the event and final pinned state.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fd4ac3e-941b-4a56-8f9a-a0a6df7a5cae

* fix(workboard): clear lint errors in the board settings modal (#208113)

## Problem
`main` has two lint errors in `extensions/workboard/browser/pages/workboard/view-board-modal.tsx`, from #207839:
- `:218` `eslint(no-shadow)`: the save-time `columns` shadows the `columns()` accessor.
- `:497` `eslint(curly)`: the fallback-column `for-of` has no braces.

`main` CI skips `check-lint-*` for that push, so it stayed green. PRs that change `.github/workflows/ci.yml` run the full lint on the merge ref and go red (for example #207954, job `check-lint-core-5`).

## Change
- Rename the save-time variable to `changedColumns`. The request payload is unchanged: `{ columns: changedColumns }`.
- Brace the loop.

No behavior change.

## Evidence
- `pnpm exec oxlint <file>` on `main`: 2 errors (`no-shadow`, `curly`). With this change: 0 errors.
- `oxfmt --check`: clean.

## Also fixed (same class: `main` defects that `main` CI skips)
- `scripts/pr-lib/wrapper-components.txt` was missing `src/auto-reply/reply/tagged-reply-control.ts` (runtime import added by #207738), so `eager-import-closure.test.ts > keeps the PR wrapper inventory closed over runtime imports` fails on PR merge refs. Added the one line in sorted position. Test: 1 passed.
- Merged the latest `main` so the Control UI controller guard no longer compares against an old base that includes #207792's `chat-pane-shared.ts`.

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

* fix(telegram): stop false "delivery failed" alerts when a topic automation posts its report with the message tool (#208102)

Root cause: src/channels/conversation-resolution.ts:405 `deliveryRoutesShareConversation` returned "unknown" when a sent route's `to` already names a topic and an explicit threadId names the same topic, so `sourceDeliveryTargetsMatch` fell back to a raw compare that never matches the canonical automation target `<chat>:topic:N` + threadId N.

Fixes #208082


## What Problem This Solves

An automation that runs in a Telegram topic's session and is delivered to that topic posts its report with the `message` tool, but the send is not credited: the run is recorded `not-delivered`, and when the turn ends without reply text it is marked `failed` and the user gets a "delivery failed" alert for a message that arrived.

## User Impact

A send that reaches the planned topic counts as the delivery, so these runs are `delivered` and `succeeded` and the false alerts stop. A send to a different topic still doesn't count. The same matcher credits subagent completions and dedupes replies, so those paths stop missing topic sends too. No config or migration.

## Why This Change Was Made

The automation's planned target names its topic twice (`<chat>:topic:<N>` plus `threadId: N`): that is the canonical form the cron delivery resolver and Telegram's own `resolveDeliveryTarget` produce. `deliveryRoutesShareConversation` treats a route sent as given whose `to` encodes a thread and which also carries an explicit thread as ambiguous (#198934: core can't tell which one the send path uses) and returns "unknown", so `sourceDeliveryTargetsMatch` falls back to a raw string compare that fails. When the explicit thread is the thread `to` already encodes, t…
vyctorbrzezowski added a commit that referenced this pull request Nov 29, 2026
…201292)

* improve(ui): show the project beside Cmd+K session settings (#203754)

Move project selection and its New worktree switch into the visible project field. Keep agent selection and Remember settings in their original menu.

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

* fix: stop warning about unsaved drafts when opening a chat (#203741)

* fix: stop warning about unsaved drafts when opening a chat

Keep failed background recovery reads distinct from failed edits in the composer and Side chat. Keep one access notice when browser storage is unavailable without consuming the warning for a later failed save.

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

* fix: stop warning about unsaved drafts when opening a chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 227e24ff-2a24-4a82-a325-e7787c443eed

---------

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

* fix(logbook): clear obsolete errors when retrying actions (#199461)

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

* fix(ui): keep the sidebar session list collapsed (#207832)

* fix(ui): keep the flat session list collapsed

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

* fix(ui): keep the sidebar session list collapsed

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d5d9e6c3-ba53-4dec-9efe-a5a9c5c29445

* fix(ui): page the sidebar only when it scrolls to the end

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

---------

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

* fix: stop treating limited access as an Inbox alert (#207737)

* fix: stop treating limited access as an inbox alert

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

* fix: stop treating limited access as an Inbox alert

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a014cab4-b01d-458b-aa67-ec83ad3a2a99

---------

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

* fix: child session activity ring freezes during startup (#188147)

* fix: child session activity ring freezes during startup

Project accepted preparation as running without starting the execution clock. Reserve queued presentation for actual mailbox/global-lane waits and preserve recorded capacity waits.

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

* fix: child session activity ring freezes during startup

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 2bf26c5b-2410-44b2-9915-d2289a90f388

* fix: align Gateway consumers with active session startup

Expect active accepted chat preparation, record a real lane wait in metrics, and distinguish preparation from actual queued input in describe/list coverage.

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

* Publish openclaw/plaid-crayfish

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 29690b6c-a214-45c1-9591-fd19b1d51336

* test(gateway): cover child startup in the current session checks

---------

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

* fix: remove hover tooltips from Workboard cards (#207928)

* improve: tighten Sessions board card typography (#207931)

* fix: keep Sessions board card hover neutral instead of column color (#207932)

* fix: keep wrapped Settings help links visibly focused on phones (#203819)

* fix(ui): keep wrapped device help links visibly focused

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

* fix: show the full focus outline on wrapped device help links

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 7b5d66ad-f165-8076-9dcf-5dd7cd64f0d9

* fix(ui): show wrapped settings help focus at the phone gutter

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

---------

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

* fix: keep the selected Review file compact when the tree is open (#203825)

* fix: show the full filename in Review diff headings

Allow the heading to wrap the whole filename instead of reserving the line for its extension. Keep the compact file tree presentation unchanged.

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

* fix: show the full filename in Review diff headings

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ba141dca-cfb0-85b2-a5bb-102d1536c092

* fix: identify the selected file in a narrow Review panel

Keep the destination filename visible above the diff and reserve room for its stem in the changed-files tree.

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

* fix: keep identifying filenames and diff actions on one row

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

* fix: keep short file extensions intact in Review headings

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

* test: verify renamed and short files in the compact Review tree

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

---------

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

* fix: hide desktop Details when there is nothing to show (#205093)

* fix: hide desktop Details when there is nothing to show

* fix(ui): discover session details before mounting the panel

* fix: keep tagged silent replies out of chat (#207738)

* fix(subagents): warn when cancel cannot confirm the worker stopped (#208041)

* fix: align Control UI tooling and docs with task card removal (#207747)

* improve: give assistant chat bubbles a calmer neutral background (#203729)

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

* fix: show empty chat search results while a collaborator types (#208010)

Use the filtered transcript to show when a chat search has no matches and to restore the reader’s place. Keep the collaborator’s typing preview visible.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fb4672e-d1b4-419c-8551-3ab267f39de3

* test(openai): expect progress instructions in the GPT-Live handshake (#208006)

Expect the direct GPT-Live session.update frame to include the operator's instructions followed by the progress-claims instruction. Keep the full-frame equality check.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 0e4639f8-64cf-4b54-8c52-6d1dd823278c

* fix: keep project picker errors readable (#203763)

* fix(ui): keep project picker errors and retry inside the menu

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

* fix: keep project picker errors readable

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e5cd3cf3-150f-4766-bab3-ca89f29252d1

* test: keep the project picker regression mergeable

---------

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

* fix: keep long answer summaries readable in chat (#203779)

* fix: keep long answer summaries readable in chat

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

* fix: keep long answer summaries readable in chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 40161eb2-ab93-4ac4-810c-656cc6a8d664

---------

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

* fix: check the refusal reason for revoked queued followups (#208025)

The Gateway intentionally reports a withheld failure for invalidated sign-in. Keep the model, executed-run, and queue assertions and distinguish this refusal from an unrelated error.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fd6e1bc9-ac1b-4a0b-86c8-4d15ea9d65ac

* fix(qa): replay Claude compaction completion in the Telegram live lane (#208001)

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: edeb5fcc-cfe8-4ad3-9b38-37bdb3073cd8

* refactor(ui): remove unused English catalog entries (#201419)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>

* refactor(ui): remove dead Settings text (Labs, Updates, forms, devices, memory) (#201421)

* refactor(ui): remove unused Labs parallel-task copy

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

* refactor(ui): remove Labs parallel-task text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3b47ea07-0bd0-8cab-9425-6c67975a8f24

* refactor(ui): remove unused Updates copy

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

* refactor(ui): remove unused settings form and appearance copy

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

* refactor(ui): remove unused device, desktop and systems copy

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

* refactor(ui): remove unused dream diary copy

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

* Publish openclaw/quick-lobster-5

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3512bcc3-a350-8bc4-8c43-92639564075b

---------

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

* refactor(ui): remove dead New session, Sessions, Agents, Templates and OpenClaw ID text (#201422)

* refactor(ui): remove unused New session copy

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

* refactor(ui): remove New session text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 609418e2-3a64-8b1d-a39e-9376e4b8949f

* refactor(ui): remove unused Sessions copy

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

* refactor(ui): remove unused Templates copy

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

* refactor(ui): remove unused agent identity and file copy

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

* refactor(ui): remove unused OpenClaw ID copy

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

* Publish openclaw/oceanic-claw-2

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: dcc9dcf1-1890-866a-b5d9-3dff693a5d98

---------

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

* refactor(ui): remove dead model setup, Models and model picker text (#201424)

* refactor(ui): remove unused model setup copy

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

* refactor(ui): remove model setup text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 18ddea1b-160c-8672-a918-2a952c072c15

* refactor(ui): remove unused model provider list copy

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

* refactor(ui): remove unused add-provider and default model copy

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

* refactor(ui): remove unused model picker labels

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

* refactor(ui): remove unused model picker loading copy

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

* refactor(ui): remove dead model setup, Models and model picker text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 6fac1775-a172-8071-8591-9561a51d33c3

---------

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

* refactor(ui): remove dead agent tools, Skills and Usage text (#201429)

* refactor(ui): remove unused agent tool access copy

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

* refactor(ui): remove agent tool access text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4211d89a-e4f4-80e4-9be2-de8848a06a63

* refactor(ui): remove unused Skills copy

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

* refactor(ui): remove unused Usage copy

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

* refactor(ui): remove dead agent tools, Skills and Usage text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 33be6fec-530e-814d-9867-ce808e91d99e

---------

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

* refactor(ui): remove unused English text from chat side panels (#201452)

* refactor(ui): remove unused side chat copy

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

* refactor(ui): remove unused subagent and process panel copy

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

* refactor(ui): remove unused session files and changes copy

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

* refactor(ui): remove unused English text from chat side panels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 32359a08-da6f-86b4-81de-e0c5dbb4226b

---------

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

* refactor(ui): remove unused English text from chat and pull request cards (#201454)

* refactor(ui): remove unused composer and message copy

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

* refactor(ui): remove unused chat status copy

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

* refactor(ui): remove unused pull request copy

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

* refactor(ui): remove unused English text from chat and pull request cards

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: cdb7136a-c0bc-888a-829e-af2403beb226

* test(ui): verify composer translations with a live menu label

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

---------

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

* refactor(ui): remove unused English text from plugin settings and catalog pages (#201455)

* refactor(ui): remove unused plugin settings and access copy

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

* refactor(ui): remove unused plugin lifecycle and catalog search copy

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

* refactor(ui): remove unused plugin catalog filter and paging copy

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

* refactor(ui): remove unused plugin detail fact copy

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

* refactor(ui): remove unused English text from plugin settings and catalog pages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f24e2625-05eb-8d99-8e8a-e31549355657

---------

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels (#201456)

* refactor(ui): remove unused plugin detail tab and install count copy

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

* refactor(ui): remove unused installed plugin list and category copy

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

* refactor(ui): remove unused plugin status and source copy

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 57d467b8-c62d-825a-a303-31d561f0d69c

---------

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

* test(live): reject failed Moonshot completions (#207728)

* test(live): reject failed Moonshot completions

* test(live): use the current Moonshot model and thinking policy

* test(live): exercise the Moonshot provider thinking policy

* test(live): run the registered Moonshot stream hook

* test(live): load the Moonshot catalog through its public facade

* test(live): type the Moonshot catalog builder as a function

* test(gateway): isolate publication notice memory pressure (#207995)

* fix: test provider review continuations after device removal (#208022)

Check that the removed device disconnects while the already-admitted continuation sends only its acknowledged steer and clears the accepted review. Keep the viewer rejection at admission.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7ff67804-adab-4c48-b5d8-f0b4334dff46

* improve: reduce memory used by concurrent agent runs (#208033)

* perf(agents): reduce heap held by concurrent runs

Reuse MCP input schema publications and Code Mode declarations through their bounded catalog owners. Resolve embedded runs with the selected-model registry view and hydrate sibling records on demand.

* fix(agents): preserve MCP refresh for deeply nested schemas

If the reuse comparison cannot serialize a changed wire schema, defer to the existing publisher and its depth handling.

* test(agents): update MCP recovery snapshot assertion

* fix: isolate the hook token reload check from plugin startup (#208040)

Keep the real Gateway, config reload, approval and child process. The token probe does not need plugins, whose startup can outlast its five-second child deadline.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b6aeceb4-1e62-4a21-af66-41b77081ed09

* chore: unblock core lint by fixing oxlint errors in Workboard e2e tests (#208075)

Origin: #207839

## What Problem This Solves

`main` fails `check-lint-core-5`, so every open PR shows that lint shard red. #207839 added three oxlint errors in two Control UI e2e tests:

- `ui/src/e2e/workboard-locale.e2e.test.ts:93`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:154`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:178`: `unicorn/prefer-dom-node-text-content`

## User Impact

No product change. This is test-only. Contributors get a green core lint shard again.

## Why This Change Was Made

- Two single-line `if` statements now have braces.
- The mobile editor test reads the column row with Playwright `textContent()` instead of `innerText()`. The assertion keeps its meaning: it checks that the renamed column label "Finished" shows in the row. The label is in the always-rendered `.settings-row__title` span. `textContent` also includes the row's description, and the test does not change it. The new label can only be found if the rename worked.
- Lint rules and other files are not changed.

## Evidence

- On `main` (8d3188542dce), `node scripts/run-oxlint.mjs` on the 2 files: 3 errors (the ones shown above). With this change: `Found 0 warnings and 0 errors`. `oxfmt --check`: clean.
- `vitest --config test/vitest/vitest.ui-e2e.config.ts` on both files, run 2 times: `Test Files 2 passed (2)`, `Tests 4 passed (4)` each time.

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

* perf(gateway): skip display preparation during history sharing checks (#208062)

* chore: simplify Workboard session filter tests (#207853)

* chore: simplify Workboard session filter tests

* test: retain session visibility and reference reset checks

* test: check revoked board references on a cached read

* test: fix prompt-cache journey tool and scope expectations (#208055)

Check web_fetch membership in the latest deferred-tool list. Send chat with
writer scope in Tool Search opt-out journeys so direct and internal turns
can compare the full automations schema.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 62582bff-c96b-4a17-9051-3daa5fa19044

* fix: make the chat sidebar swipe reachable on Android (#208037)

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6251590e-fd83-4a72-bf88-6000e34d9e6d

* improve(ios): avoid repeated Keychain reads when opening chat (#207667)

* perf(ios): keep Keychain reads out of chat identity

* improve(ios): avoid repeated Keychain reads when opening chat

OpenClaw-Publication: 4ebe6ce8-9b61-8209-be76-df43a417621d

* improve(ios): skip Talk PCM player setup until audio plays (#207668)

* perf(ios): defer PCM player initialization until playback

* improve(ios): skip Talk PCM player setup until audio plays

OpenClaw-Publication: 0fd39061-45a1-8858-970d-0b837bb5dac5

* fix: keep session writes working after a gateway restart (#208031)

Give a newly admitted schema its own validity cell when its markers change. Retain the existing cell when the markers match so unchanged borrowers stay valid.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 3c81c608-4a5c-4c8c-85b1-c3e5b827cd03

* fix: stop the live Tool Search probe from reporting false connection failures (#208034)

Scope the live probe’s session catalog to its fixture tools and discovery controls. Return service availability from the status tool and preserve the wire assertion if the runner throws.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4b9ea82e-e287-494d-a59e-9523243f60ee

* improve: reduce sidebar work when other chats update (#207791)

* improve: reduce sidebar work when other chats update

Reuse the already reconciled primary result for an identical retained window with the same agent and archive filter. Keep independent windows on their existing reconciliation path.

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

* improve: reduce sidebar work when other chats update

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f22b2da2-4071-8303-9ece-93ab4f3aacdf

---------

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

* improve: avoid rebuilding provider choices while typing a model API key (#207786)

* improve: avoid rebuilding provider choices while typing a model API key

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

* improve: avoid rebuilding provider choices while typing a model API key

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f5e75abf-1583-83f1-a72a-a8023ceb4625

---------

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

* improve: avoid re-sorting displayed runs when paging automation history (#207795)

* improve: reduce repeated work when paging automation history

Consume ordered history pages without re-sorting retained runs at every loading and append render. Keep stable ordering for shifted offset boundaries and immediate offline sort changes. Add an opt-in native-page count workload.

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

* improve: avoid re-sorting displayed runs when paging automation history

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e82048d2-da2c-8e54-a164-02a1db9a5532

---------

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

* fix: verify retained child results in the Ultra live check (#208026)

Read the matched child’s retained result after delivery and verify its run ID before checking the handoff token.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: bbaa86d0-6a79-4155-b69e-2701a35c57bd

* fix(ui): open the selected agent’s chat while reconnecting (#202680)

* fix(ui): open the selected agent chat while reconnecting

* fix(ui): open the selected agent’s chat while reconnecting

OpenClaw-Publication: 722da459-2f0c-4a1a-ac47-0e1899d47f20

* fix: give the installed Codex progress-reply test a conversation to reply to (#208063)

Create the isolated session with internal delivery before starting the installed agent. The transient WebChat flags alone do not advertise a message tool.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fdae7386-bdc9-4280-9e3e-a18ba8cea046

* fix: run the live trajectory export check against the built gateway (#208038)

Start a built Gateway for the live trajectory export test so the Codex plugin reads the configuration prepared by the Gateway. The test still requires an exact model reply, one-time export approval, and a bundle containing runtime and transcript events.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 055248a1-a1f2-441c-8237-58ff6cee3893

* fix: stop repair notices when their automation is removed (#208036)

Check the automation's ID and creation time before its repair notice continues. Deleting the automation stops the notice from resending its run history to the model. Ordinary edits let the notice finish.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 5d0644b7-f674-4578-ae3f-16f44b3b0e6d

* fix: restart launcher-managed Gateways after exit 78 (#207972)

## What Problem This Solves

A launcher-managed Gateway that exits 78 outside an update trial leaves the serving release down permanently.

## User Impact

The resident launcher now restarts that child with its existing crash backoff (1, 2, 5, 10, then 30 seconds). Trial configuration refusals still roll back. Direct-Gateway systemd services retain `RestartPreventExitStatus=78`. Launcher format 4, trial v2 and IPC bytes are unchanged. The existing launcher writer refreshes an installed file when its bytes differ, while preserving newer launcher formats.

## Why This Change Was Made

Delete the terminal non-trial exit branch rather than add another restart mechanism. Simplification retained the two-line deletion, one byte comparison in the existing writer, migrated lifecycle/replacement regressions and launcher-managed documentation. Production: -2 lines net; tests: +18 net; docs: +2.

## Evidence

- vitest-source, 600-second bounds: the migrated launcher test failed on unchanged main production code because the launcher exited before the first 1-second restart timer; the other 15 launcher tests passed.
- Immediately after the deletion, launcher and frozen-contract tests passed: 19 tests, including unchanged trial-78 rollback assertions and format-4 ready/stop exchange.
- Fake clock checks no child starts before each 1/2/5-second deadline and another child starts at each deadline.
- Focused Oxlint passed; formatter output matched the test file.
- Installed format-4 stale-content regression failed before the byte comparison: the old content remained. The replacement test also verifies a second identical write does not replace the file and newer launcher formats remain untouched.
- Rendering is deterministic: only static constants, flag arrays and source constants are interpolated; no timestamp, PID or install path enters the rendered bytes.
- Header-reader audit on main and shipped `v2026.12.1-beta.1`: `writeLauncher` previously replaced only older formats; `writeGitReleaseLauncher` preserves all formats >=2. A downgrade to the beta-era writer therefore still preserves an installed format-4 launcher as before. The frozen format-4 peer test remains unchanged.
- Prior-head [CI](https://github.com/openclaw/openclaw/actions/runs/46228136551) and [update-restart-auth package acceptance](https://github.com/openclaw/openclaw/actions/runs/46228140802) passed on `c5ad15b432742fc4b8b5455f7f4a512f2a291953`; byte-refresh repair requires fresh hosted evidence. No full local build was run per task scope.

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

* fix: keep sandbox commands working when workspace scratch is not writable (#208005)

Use the container's private /tmp when the sandbox user cannot write the default workspace scratch directory. Keep explicit temp paths and workspace permissions intact.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 31357588-6850-4ea3-a68d-52e744874a24

* fix(gateway): invalidate session history when a transcript publication rejects (#208051)

## Problem

When a transcript publication rejects, Gateway clients that follow the session get no event. Examples: a synchronous projection read throws `SessionRowFactsPending` (the count-sequence fallback fixed by #208004), the history worker fails with a non-overload error (`readSessionMessageByIdAsync` rethrows it), or event-row preparation fails. The Gateway logs `Transcript update dispatch failed` (`src/gateway/server-runtime-subscriptions.ts`) and publishes nothing: no `session.message`, no `sessions.changed`. The open chat stays stale until something else refetches it.

Log signature, reproduced on main: `Transcript update dispatch failed` with `Session row facts require worker reconciliation` (seen in CI runs of `session-message-events.history-worker.test.ts`; root cause in #208004). Any other rejection in the handler loses events the same way.

## Fix

`createTranscriptUpdateBroadcastHandler` already runs every transcript publication in its per-session queue. When the publication rejects, the queue now emits the existing history invalidation: `sessions.changed` with `phase: "message"` and no `messageId`/`messageSeq`. It goes to the same audience as a normal publication (session-event and message subscribers, `canReceiveSessionEvent` authorization, private scope for retired unqualified owners). Then it rethrows, so the existing warning and the live-source fallback stay.

- No new protocol field, event or schema. The protocol docs (`docs/gateway/protocol/rpc-bootstrap-and-events.md`) already say "Refetch history on that invalidation". Clients refetch on it: Control UI `ui/src/pages/chat/chat-state-events.ts`, Apple `ChatViewModel+TransportEvents.swift`, Android `ChatController.kt`.
- If the invalidation itself throws, the rethrown `AggregateError` carries both errors, so the existing warning logs both.
- Accepted edges:
  - A pending assistant error keeps its existing deferral, so no early error row appears.
  - A legacy marker-only update has no session key and stays log-only.
  - A rejection after a `session.message` was sent causes one extra, harmless refetch.
- Out of scope: lifecycle and background-process row handlers. They publish row snapshots, and their resync would be a row invalidation, which is a different signal.

## Users

| PR | Users | Failure class | Evidence |
|---|---|---|---|
| this | Gateway clients following a session (Control UI, iOS/macOS, Android, SDK) | silent stale chat after a rejected transcript publication | `server-runtime-subscriptions.ts` catch logs only; new tests red on main |

One-shot CLI runs do not use this publisher, so they are not affected.

## Evidence

- `session-message-events.history-worker.test.ts` "invalidates selected-session history when a transcript publication rejects": the history worker read rejects with a generic error. The client receives `sessions.changed` (`phase: "message"`, no `messageSeq`), and `chat.history` returns the committed message. Red on main (120 s timeout, no event), green with the fix.
- `server-session-events.recovery.test.ts` "invalidates history and keeps the rejection when a transcript read fails": the handler still rejects with the original error (the caller's warning path) and broadcasts once. Red on main, green with the fix.
- Production +55/-9 (one shared audience helper replaces the inline loop); tests +64.

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

* fix(workboard): open the board in app from dashboard widgets (#199922)

* fix: keep confirmed sends in the receiving chat's model history (#208049)

Supersedes #207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `a65ac074b3d6`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

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

* fix(qa): run the live log tail browser test again (#208020)

Point the live log tail scenario at the consolidated auto-follow browser test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 34b4a470-dfdd-48fb-aaba-59aec526e812

* fix: check managed child delivery in the Codex live suite (#208011)

Check that the parent receives the UUID chosen by its managed child. Let the Docker live suite use the Gateway's delegation defaults.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7f1bb837-8d14-46f3-82e5-8aa559e33b3e

* improve: speed up Doctor database repair tests (#208103)

Build the healthy migrated agent database once for the repair guard table. Give each case an independent file, registry, and maintenance lease so it still exercises the real defect, repair, and clean recheck.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: f5bae5e0-5d87-4d07-9178-2e4ab0ca2637

* fix(gateway): keep count-path session updates through store discovery (#208004)

## Problem

Scheduled CI kept failing `session-message-events.history-worker.test.ts` (count case, "after worker overload"): 5 of 15 scheduled runs, most recently run 46220607204. After #207862 the case waits the full 120 s test limit, so the event was missing, not late.

A traced CI sample (PR CI, Linux x64, Bun) showed the stop: after the transcript update, the count publication never reached `readSessionMessageCountAsync`, and a `chat.metadata.changed` from a session-store topology change arrived in the same window. A local repro then showed the cause:

```
Error: Session row facts require worker reconciliation
    at readSessionRowEntry (src/gateway/session-row-projection-materialize.ts:460)
    ...
    at selectSessionRowEntries (src/gateway/session-row-scope.ts:551)
```

`handleTranscriptUpdateBroadcast` (`src/gateway/server-session-events.ts`) assigns a cursor sequence to updates that arrive without `messageSeq`. To do that it prepared membership with its own loop and then called `projection.selectEntries()` synchronously. When store discovery runs inside that loop, the row's entry is still unread, so selection throws `SessionRowFactsPending`. That error means "re-enter through exact worker preparation". The handler did not handle it, so the publication failed and clients got neither `session.message` nor `sessions.changed`. The update was lost until the next refetch.

## Change

The count fallback reads its row through the session event publication rows (`sessionEventPublicationRows(projection).withReadyRows`, metadata only), the same owner `withPreparedEventRow` uses. It reaches `withPreparedExactRows`, which prepares membership and retries `SessionRowFactsPending`. The hand-written `prepareMembership` loop is removed.

Known edge, left as is: other throws before publication still reject the update. Only worker overload turns into a `sessions.changed` invalidation. That is a wider change and is not part of this fix.

## Who sees it

Gateway clients that follow a session (`sessions.messages.subscribe`, for example the Control UI) and receive transcript updates without `messageSeq` (`server-session-events.ts`, count fallback), while session-store topology changes (a store added, removed or rediscovered). One-shot CLI runs do not follow session events and do not see this.

## Evidence

- New test `delivers a count-path session update when the store topology changes`: emits a store topology change, then a transcript update without `messageSeq`. Red on base (120 s timeout, 3 of 3 runs), green with the fix (3 of 3, no memo).
- The CI shape (overload case plus store topology churn): 10 of 10 red on base, green with the fix.
- Existing history-worker overload cases and the session event consumer suites pass.
- What starts the store topology change during the CI run is inferred, not traced. The CI trace shows the publication stopping before the count read, with a `chat.metadata.changed` in the same window. The local repro with an explicit topology change gives the same signature and the stack above.

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

* fix: keep Telegram login tests independent of startup speed (#208106)

Wait for the Telegram progress note before checking lane ownership. Release both fixture gates on assertion failure so a slow login cannot spill into the next test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 177934d0-1fb5-4a06-beb2-10916a09ee47

* fix(release): identify jobs blocking child evidence sealing

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

* fix(release): clarify pinned FRV recovery eligibility

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

* fix(ci): add tagged reply control to the PR wrapper inventory (#208120)

* fix(android): keep the snooze deadline test independent of runner timing (#208097)

Advance the handset and Gateway clocks together during the post-save refresh. Check the exact deadline sent to the Gateway and the wake time returned to the handset.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6fb940cc-e4ef-4c8f-94a9-060a736f8c11

* test(process): keep cancel parity off execa's force-kill race (#208126)

## Problem

Scheduled CI run 46234040123 (checks-node-compact-large-42, shard core-runtime-infra-process-hosted-2) failed `src/process/spawn-broker/execa.test.ts > broker command transports > matches buffered cancel results and errors`:

```
-   "isForcefullyTerminated": true,      (direct execa, the reference side)
+   "isForcefullyTerminated": false,     (spawn broker)
    "isCanceled": true, "signal": "SIGTERM"   (both sides)
```

Both sides agree that the command was canceled and that the child exited on SIGTERM. Only the reference side, which calls `execa` directly in the test process, said "forcefully terminated".

Cause: execa starts a `forceKillAfterDelay` timer when it sends SIGTERM (`execa/lib/terminate/kill.js` `killOnTimeout`). If the parent event loop stalls longer than the delay before it reaps the exited child, the timer fires first. `kill('SIGKILL')` then succeeds on the unreaped child and sets `isForcefullyTerminated`, even though the child already exited on SIGTERM. The fixture used a 50 ms delay for every case, so a loaded runner can hit this race.

Reproduced with direct execa 10.2.1, outside the broker: cancel a SIGTERM-honoring child with `forceKillAfterDelay: 50`, then block the event loop for 200 ms in a `setImmediate`. Result 3/3: `signal: "SIGTERM"`, `isCanceled: true`, `isForcefullyTerminated: true`. With no stall, `isForcefullyTerminated` is `false`.

## Change

Test-only. Children that honor SIGTERM get a 5 s force-kill delay, so the timer cannot win the race. These children exit at once, so the tests take no longer. The `forced cancel` case ignores SIGTERM and keeps its 50 ms delay, so it still proves forced termination matches across the broker and direct execa.

## Impact

No product change. Process cancellation results stay correct: in the failing run the broker reported a cancel as a cancel (`isCanceled: true`, `failed: true`). The mismatch was the reference side's timer race.

## Evidence

- CI failure: https://github.com/openclaw/openclaw/actions/runs/46234040123/job/141256229744
- No `src/process` change in the window 84ca43a1..758614e7.
- Before the change: 5/5 green locally with load average ~39 (the race needs a stall over 50 ms).
- After the change: `execa.test.ts` full file 5/5 green, 27 passed, 3 skipped.

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

* test(state): keep schema modules out of read-only agent database access (#185841)

* fix(state): avoid eager writer imports in agent database reads

* test(state): keep schema modules out of read-only agent database access

* chore(release): close out 2026.11.11 on main (#208114)

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

* fix(outbound): record a plugin action's visible send once (#208130)

Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

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

* fix: let a fallback model finish after Code Mode reads

Allow the configured fallback model to finish after a completed Code Mode cell when every host call has a successful read receipt and qualifies for direct retry. Shell writes, unfinished cells and plugin lookups without an audited replay classification still block fallback.

Closes #207895

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: d49db423-f997-43b6-b23c-4d0be08459c0

* fix: let older automations read their conversation's memory (#208143)

## What Problem This Solves

Automations created before OpenClaw recorded the creating conversation (every job without `sourceConversation`, i.e. created before #179062) name that conversation only by session key. Their scheduled runs get no memory at all: every `knowledge_*` or memory tool call fails with "the host granted this session no memory audience", and the Gateway logs `memory audience unavailable: root session agent:<agent>:cron:<job>:run:<run> has no durable chat type`. The same runs still hold owner-only tools such as `exec`. A production automation that reads and writes the owner's knowledge vault every week hit this on every run.

## User Impact

- A key-only detached automation (`isolated` / `current`) now reads its conversation's current memory, the same way a bound automation does:
  - created in the owner's direct chat: the owner's private memory;
  - created in a group or channel: only that conversation's memory, never owner-private.
- When the job recorded a requester (profile or channel sender), that requester's owner status is checked at each occurrence first; without one, the run's existing owner bit decides, as it already does for the run's tools.
- If the conversation row is gone, archived or cannot be read, the run proceeds exactly as before (no memory, no pause, no failure).
- Board, workspace, sandbox, event target and the run's tools are unchanged. `main` and `session:<key>` targets are unchanged.
- `automations bind` stays available for the exact-incarnation link but is no longer needed for memory. Docs (`cli/cron` "Binding older jobs", `automation/cron-jobs/payloads`) and Doctor's unbound note say so.

Accepted edge case: a key-only run whose agent sandbox mode is `non-main` or `all` now gets owner-private memory it did not have, when the job was created in the owner's direct chat. The owner created these jobs in their own DM, and the run already holds owner authority.

## Why This Change Was Made

`resolveScheduledPrincipal` classifies these jobs as `unbound-parent` and gives them legacy owner authority, but `buildScheduledExecutionContext` pointed their memory at the cron run row, which never has a chat type, so the memory resolver always denied. The fix stays in the existing owner:

- `admitScheduledOccurrence` (`src/cron/execution-context-admission.ts`): for an `unbound-parent` principal on a detached run, read the key-linked conversation row once. A failed read becomes "no row". No generation lease, workspace binding, sandbox or pause change. A recorded requester is admitted per occurrence through the existing `admitScheduledRequesterGrant`.
- `buildScheduledExecutionContext` (`src/cron/execution-context.ts`): with a live row, memory becomes `{ source: "parent", parent: <current sessionKey/sessionId/lifecycleRevision>, owner }`. Everything else for `unbound-parent` is unchanged.
- The memory resolver (`src/plugins/memory-audience.ts`) does not change: it already maps a direct root + owner to owner-private and direct/group/channel to that conversation's partition, for both the embedded and the CLI runtime.
- `scheduledParentKeyOf` now derives the key from `resolveScheduledPrincipal` itself, so Doctor's access review and the development replay read the same row the runtime does; the replay vector (`execution-context-projection.ts`) already labels the memory gain as intended, so it needed no edit.

Not changed: Doctor auto-bind or any stored-row write, jobs with no parent key, bound jobs with no recorded requester. On current `main`, bound jobs keep following their conversation after a reset (#205887), so no reset-degraded path exists to special-case.

## Evidence

Real-admission tests (red on the merge base `bb5c001bb6fc`, green on this head; 6 tests failed on base, all pass on head):

- `execution-context-memory-audience.test.ts` (real admission → registry → embedded and CLI resolvers): key-only owner-DM job → owner-private; key-only group job → that group's conversation only; key-only job with a revoked recorded requester → conversation only; key-only job whose conversation is gone → no audience, run admitted.
- `execution-context.test.ts`: key-only detached job gets parent memory and nothing else (board/workspace/sandbox stay the run's); archived, removed and in-session (`session:<key>`) cases keep run-session memory.
- `execution-context-admission.test.ts`: key-only read takes no generation lease; a failed read still admits the run with its own memory.
- `isolated-agent/run.bind-parent.test.ts` (real cron service + timer): the unbound job now reaches its conversation's memory, without a run-row receipt.

Local runs: the 27 test files that import the changed sources passed (`ocx test`, 6 shards). `pnpm check:changed`: typecheck, lint, guards all ok; the dead-export scan fails only on files this PR does not touch (`src/agents/command/types.ts`, `src/plugins/native-module-require.ts`, `ui/src/...`, `src/gateway/server-methods/update.test-harness.ts`), same as `main`.

End to end, scratch Gateway from source, `plugins.slots.memory: "knowledge"`, real model (`openai/gpt-5.5`). An owner Control UI direct chat was created by one real `chat.send` (row `chatType: "direct"`). A key-only isolated `agentTurn` job (owner key = that chat, no `sourceConversation`, no recorded requester, no tool policy, `toolsAllow` incl. `knowledge_remember`, `knowledge_grep`, `exec`) fired from its own `at` schedule about two minutes ahead (no forced run).

Base (`bb5c001bb6fc`):

```
[agent/embedded] memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```
```
knowledge_remember: "Knowledge access unavailable: the host granted this session no memory audience. The Gateway log entry "memory_audience_denied" for this session names the reason and its repair."
knowledge_grep: "Knowledge access unavailable: the host granted this session no memory audience. ..."
```

Head: no `memory audience unavailable` line in the Gateway log; the run's result:

```
knowledge_remember: inserted claim <claim-id>.
knowledge_grep: 1 hit — <claim-id>: "The owner's favorite tea is masala chai."
```

The claim was written under the store's `vault/private/` (owner-private).

Observed, not changed here: a session created only through `openclaw agent --session-key agent:main:main` from the CLI has no `chatType`, so a key-only job linked to such a row still gets no memory (Doctor already lists these under "no stored chat type"). Channel DMs and Control UI chats record `chatType: "direct"`.

Merge danger: two-way door. No schema, stored-row, config or protocol change; a revert restores the previous memory decision. Blast radius: memory audience of detached scheduled runs whose jobs have no `sourceConversation` but an owner/policy session key.

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

* fix(qa): let Matrix message-action checks run in creator-owned v12 rooms (#208029)

Verify the room creation event before exercising all five Matrix message actions. The homeserver authorizes the pin, and the observer verifies the event and final pinned state.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fd4ac3e-941b-4a56-8f9a-a0a6df7a5cae

* fix(workboard): clear lint errors in the board settings modal (#208113)

## Problem
`main` has two lint errors in `extensions/workboard/browser/pages/workboard/view-board-modal.tsx`, from #207839:
- `:218` `eslint(no-shadow)`: the save-time `columns` shadows the `columns()` accessor.
- `:497` `eslint(curly)`: the fallback-column `for-of` has no braces.

`main` CI skips `check-lint-*` for that push, so it stayed green. PRs that change `.github/workflows/ci.yml` run the full lint on the merge ref and go red (for example #207954, job `check-lint-core-5`).

## Change
- Rename the save-time variable to `changedColumns`. The request payload is unchanged: `{ columns: changedColumns }`.
- Brace the loop.

No behavior change.

## Evidence
- `pnpm exec oxlint <file>` on `main`: 2 errors (`no-shadow`, `curly`). With this change: 0 errors.
- `oxfmt --check`: clean.

## Also fixed (same class: `main` defects that `main` CI skips)
- `scripts/pr-lib/wrapper-components.txt` was missing `src/auto-reply/reply/tagged-reply-control.ts` (runtime import added by #207738), so `eager-import-closure.test.ts > keeps the PR wrapper inventory closed over runtime imports` fails on PR merge refs. Added the one line in sorted position. Test: 1 passed.
- Merged the latest `main` so the Control UI controller guard no longer compares against an old base that includes #207792's `chat-pane-shared.ts`.

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

* fix(telegram): stop false "delivery failed" alerts when a topic automation posts its report with the message tool (#208102)

Root cause: src/channels/conversation-resolution.ts:405 `deliveryRoutesShareConversation` returned "unknown" when a sent route's `to` already names a topic and an explicit threadId names the same topic, so `sourceDeliveryTargetsMatch` fell back to a raw compare that never matches the canonical automation target `<chat>:topic:N` + threadId N.

Fixes #208082


## What Problem This Solves

An automation that runs in a Telegram topic's session and is delivered to that topic posts its report with the `message` tool, but the send is not credited: the run is recorded `not-delivered`, and when the turn ends without reply text it is marked `failed` and the user gets a "delivery failed" alert for a message that arrived.

## User Impact

A send that reaches the planned topic counts as the delivery, so these runs are `delivered` and `succeeded` and the false alerts stop. A send to a different topic still doesn't count. The same matcher credits subagent completions and dedupes replies, so those paths stop missing topic sends too. No config or migration.

## Why This Change Was Made

The automation's planned target names its topic twice (`<chat>:topic:<N>` plus `threadId: N`): that is the canonical form the cron delivery resolver and Telegram's own `resolveDeliveryTarget` produce. `deliveryRoutesShareConversation` treats a route sent as given whose `to` encodes a thread and which also carries an explicit thread as ambiguous (#198934: core can't tell which one the send path uses) and returns "unknown", so `sourceDeliveryTargetsMatch` falls back to a raw string compare that fails. When the explicit thread is the thread `to` already encodes, the…
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
…ory (#208204)

Follows #208049, #208130 and #208169.

## What Problem This Solves

When an agent run needs approval (exec, plugin or OpenClaw change) and Telegram or Signal shows the approval prompt in a different chat than the one that asked (for example the approver's DM, for a cron job, background run or another chat's turn), the user sees the prompt but that chat's agent has no record of it. Asking the DM agent "what did that approval ask?" gets a blank stare.

Cause: the Telegram and Signal approval adapters sent the prompt straight through their own platform clients (`sendMessageTelegram`, `sendMessageSignal`), bypassing core delivery, so the confirmed-send history owner (`src/sessions/confirmed-visible-message.ts`) never saw it.

## User Impact

- Telegram and Signal approval prompts for another conversation now enter the receiving chat's model history once, so the agent there can quote and explain them on the next turn.
- A prompt in the chat whose own turn asked for approval adds no row (that turn already owns its history), so there is no duplicate.
- Signal's approval outcome ("approved", "expired") is a new message (Signal cannot edit), so it is recorded the same way. Telegram edits its prompt in place; edits add no row.
- What the user sees does not change: same text, buttons, topic/thread, reactions, and the same monitor endpoint for Signal. No config, schema, stored-row, protocol or SDK change.

## Why This Change Was Made

The goal: every message a user sees is in that chat's model history, through one owner. The adapters now send through `sendDurableMessageBatch` (as other plugin sends already do) and the direct client calls are deleted, so the existing owner records the prompt. No new hook, flag, guard or state.

- `skipQueue: true`: approval prompts are not replayed after a restart, same as before (a replayed prompt would carry dead buttons for an approval that no longer exists).
- The requesting session is passed as the producer, so the owner's existing same-session rule skips the requesting chat.
- Signal keeps the monitor's `baseUrl`/`account` through the send dependency, as before.
- Side effect: `message_sending` hooks now see approval prompts, like every other core send.

### Direct sends reviewed (classified, not moved)

- **Reply of the turn running in that chat (its turn owns history):** Discord interaction replies (`native-command-reply.ts`), Telegram native command replies, Telegram system-agent approval outcome sent back to the origin chat.
- **Access control before a conversation exists (must never enter a transcript):** Telegram pairing codes and "not allowed" (`dm-access.ts`), "You are not authorized to use this command." (`bot-native-command-dispatch.ts`), provider login device codes (`bot-native-command-login.ts`).
- **Last-resort failure notices:** Telegram "Something went wrong…" after dispatch itself threw (`bot-message.ts`) and "Configured ACP binding is unavailable" (`bot-native-command-dispatch.ts`). They bypass core delivery on purpose so they still arrive when delivery is what failed. Default chosen: keep them direct.

`docs/refactor/conversation-transcript-ownership.md` now lists these classes.

## Evidence

- Red on base, green here (real core delivery, real history owner, SQLite session store; only the platform send function is mocked):
  - `extensions/telegram/src/approval-handler.runtime.test.ts` "records a DM approval prompt: another conversation's approval enters the approver chat once": base 0 rows, head exactly 1 row with the prompt. "…the requesting chat's approval stays with its own turn": 0 rows on both.
  - `extensions/signal/src/approval-handler.runtime.test.ts` "adds a prompt for another conversation's approval to the approver chat once": base 0 rows, head 1. "leaves a prompt in the requesting chat to that chat's own turn": 0 rows.
- Existing Telegram approval cases (topics, Direct Messages topics, fan-out, terminal edits, origin fallback) stay green; their send assertions now check the routed target (`telegram:<chat>:topic:<n>`), which the real sender resolves.
- Both test files moved to the `extension-database-workers` lane (forks pool), since history writes need the main-thread SQLite broker.
- Real Telegram (Test Server, source Gateway, deterministic mock model, real transport and history). The DM user first got READY, so the DM session (`agent:main:main`) existed. Then `gateway call agent {sessionKey: "agent:main:vcn-e2e"}` ran with no channel delivery; the mock made one `exec` call with a marker, and Telegram exec approvals (approver = the DM user, target DM, ask always) showed the prompt with Allow Once / Deny buttons in the DM. After that, the user asked "What did the approval prompt say?" The prompt was left unanswered.

  | Side | Prompts in the DM | DM history rows with marker | Follow-up model request contains marker |
  |---|---:|---:|---|
  | base `b904594b0377` | 1 | 0 | no |
  | head `5462cde7ee6a` | 1 | 1 | yes |

  On base the user saw the approval prompt, but the DM agent had no record of it. On head the DM agent's next request includes it. This proves delivery and history inclusion, not visual rendering.

## Follow-ups (out of scope)

- Approval prompts on Discord, Slack, Matrix, WhatsApp, iMessage, Microsoft Teams and Google Chat still send directly; each needs its native presentation (components, blocks, cards, reactions) through core delivery.
- Matrix shared-DM context notice (`m.notice`; core delivery has no notice message type).
- Storing not-recorded reasons (schema); inbound accepted ⇒ transcript; failed-delivery history and overlap dedupe.

## Merge risk

Two-way door: a revert restores the direct sends. No stored format, schema or contract change. Blast radius: Telegram and Signal native approval prompt delivery (and Signal approval outcome messages).

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

(cherry picked from commit 94ee07a)

Companion mentions reviewed for #208204: 34d4f8f improve: list Docker streams and flag unconfirmed cleanup in Doctor (#201292); 21786f6 refactor(ui): stop sending 28 additional unused labels to translators (#207982); 9cec330 refactor(workboard): group session tiles without rescanning each column (#207380); 16a2d4b refactor(ui): lowercase log search text only once (#207383)

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
## Class: foreign updater records must not grant admission

Instances: #203486, #205736, #203917, and the modern release route refusing an old unfinished recovery.

The release preparation owner now takes its existing lock, checks the installation and physical restore guard, then records other unfinished runs as `failed: interrupted` and continues. It preserves its current run and the serving trial's handed-over run. The bounded drain reads current rows, not an enclosing Doctor snapshot.

In modern release preparation, the two recovery refusals remain: a positively live in-place lease holder, and `.openclaw-restore-*` that may contain the original state. Current modern locks/trials and normal preflight still apply.

## What disappears

- The 808-line interrupted plugin-cohort settlement owner, its run/finalize/repair discovery and replay paths, and obsolete killed-driver/death-proof suites.
- Foreign saved-row permission for plugin peer links, snapshot collection, interruption/reconciliation and terminal capture. Foreign cohort rows remain unchanged; another update does not replay their rollback.
- The critical-path retained-runtime census and its timeout branches. Existing owned-release path collection runs after ready; Doctor retains its separate old-runtime cleanup.
- Current mutation and Gateway completion read only their named pair. Main's existing all-row admission reader is retained only by the shipped package-finalization bridge, as the accepted fallback below.

Current source/executor/lifecycle/transaction/finalizer checks remain. Explicit repeated repair uses its existing abandonment and exclusive-ownership checks, not a foreign stored-recovery veto; it does not replay the saved cohort. Snapshot collection defers only inside this operation's existing live publication capture, preserving its rollback bytes without consulting foreign records. The shipped `finishInterruptedUpdate` export keeps its real staged finalization, pinned as a source build entry because the compatibility inventory names it.

No new state, flag, timer, death proof, schema/stored shape, or launcher/Gateway protocol change. Doctor-compatible reads remain for legitimate current cross-build bookkeeping, not foreign admission.

**Accepted legacy edge:** package-only finalization retains main's `recoveryAdmission` worker, coherent facts and assertion on its selected service/history roots. The schema-refusal/copy-cost cleanup is not redesigned here. Ordinary readiness guards keep their original no-recovery early return; modern release admission remains physical-only.

## Size

`tokei` on this PR's 39 runtime source files, excluding tests/support/harnesses and fixtures, against merged main `1e6d3f9bd9ecdbb061908ed30090bcf2fd6d7c2f` (original before-code base: `5c815265d5281c7929ab7483bd4e471e54e5c0ff`):

| | Before | After | Net |
| --- | ---: | ---: | ---: |
| Production code lines | 11,335 | 10,362 | **−973** |
| Test/support lines | | | **−2,447** |

Tooling routing/inventory and the update implementation contract are updated with the cut; their deletions are not counted as runtime savings.

## Verification

- Current head `b4e588ff5f9e35a27faa20232819c7f73e100d4a`, tree `12b76c0debe4b9b4ee2274c3459acce54acc1c3d`, fixes the landing review's lease-permission regression: slot inspection opens through the existing lease-store preparation owner, not direct identity capture. The existing slot table now covers an idle owned `0644` store being repaired to `0600` without refusing admission or changing history. Normal hooks passed; **current-head CI is pending**. Predecessor `63010e7d0af9` completed 87 successful checks with no failures/pending checks, including schema, copy-cost, healthy-caller, type, lint, ratchet and extension-boundary gates ([run](https://github.com/openclaw/openclaw/actions/runs/45952703299)).
- Corrected AWS Linux base proof: seven selected contracts, **six meaningful failures and one terminal-history control pass**. A pre-repair repeated-repair comparison selected two positive cases; both failed meaningfully. This supersedes the initial host-only baseline, which is not counted as Linux proof.
- AWS `747bd654fa01`: **145 passed, two skipped** across nine files; core/core-test/scripts/tooling types, changed lint/format and dead-export scans passed. AWS `9901b03a6ae4`: **132 passed** across six affected files, including real snapshot rollback and CLI deadline integration; core/core-test types, scoped lint/format and dead-export scans passed. [Final run](https://crabbox.openclaw.ai/portal/runs/run_95deb2b3c2b56df85ff53e839750f5c5). These are qualified source snapshots, not exact `2dfc213fbdc6` proof.
- The final local identity ratchet could not resolve the original base object after normal synthetic-source sync; that is a setup gap, not a policy verdict. Current CI owns the ratchet and the later two-root schema repair. Both owned AWS leases were released with exact `stop --wait` receipts; no paid resource remains.
- Predecessor `63010e7d0af9` passed the Linux published-to-head [`docker-seed-e2e` / `release-update-survivor` lane](https://github.com/openclaw/openclaw/actions/runs/45952703299/job/140352861920) in 2,615 seconds; healthy/crash/downgrade receipts are artifact 15179778195. Latest-head CI remains the landing gate. The standalone fixture-kit producer remains unsupported unchanged on AWS Linux because it requires Studio/macOS-only ocx cloning; no kit patch, host build, shim or separate paid campaign was used.
- Two local review rounds completed. The first review's request to restore foreign cohort settlement is [explicitly rejected](#206295 (comment)) under Ayaan's rule; its concrete repeated-repair case, build reachability and real path-state testing concerns are addressed. The second review's current-operation snapshot-retention finding is fixed through the existing live capture, not a foreign-row permission check. The maintainer reviews only this final delta.
- The active-list query now excludes the two protected named rows before its limit; `run.ts` has no ID comparisons and the identity allowlist does not grow. Four CI failures that asserted the deliberately retired foreign-record refusal were removed or migrated while retaining current-operation, service-profile and saved-evidence assertions.
- `47d896edda06` passed the two split-root schema cases but added a second snapshot on the common readiness path (`update-command-recovery-cost.test.ts:77`). Per maintainer direction, the move is reverted and main's admission is retained only for package finalization. Both schema assertions and the copy-cost assertion remain unchanged. Current reporting refusal remains; only the retired global-malformed-row policy tail is deleted. Current CI owns the fallback's qualification; earlier AWS snapshots do not prove it. Runner-shutdown ratchets and WebKit apt 403 were infrastructure failures, not product verdicts.
- Maintainer landing review and latest-head CI remain required; no worker merge performed.

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

(cherry picked from commit 91d4912)

Release adaptation: Port the modern release preparation admission boundary only: retain the published package updater’s existing recovery contract, check live in-place custody and restore directories, interrupt only unowned run history, and preserve beta.2 release/runtime cleanup outside that boundary. No schema or row-shape changes.

Later same-path commits from the pinned scan (separate behavior unless named as folded/selected below): f84b705 fix: preserve lower-token guidance for unaffordable requests (#201392); dae01a9 fix: keep other agents running when one store is refused (#208364); a20fd1c fix: avoid competing Gateway test boots and cold agent mutation imports (#208203); c9f7a98 fix: keep container Gateway commands from rolling back host updates (#208271); edb6820 fix: let the Gateway restart while boot plugin maintenance is running (#208074); 516166c fix: exit once when gateway run rejects an argument after an update (#208068); 07e96dc fix: restart the Gateway after real plugin repairs (#208207); 13059ef fix: keep the PostgreSQL Doctor preflight test from timing out on module loading (#208225); 50d7708 fix: keep Claude fork compaction out of the parent chat (#208192); bd48ff6 fix: avoid restarting the Gateway for plugin timestamp changes (#208119); 259f71c fix: stop Linux service starts from copying the whole agent database (#207969); 7cb8975 fix: keep forked Claude chats separate after a Gateway crash (#208048); 407b523 fix(slack): thread queued DM replies under the triggering message (#208133); 43b5b52 chore(release): close out 2026.11.11 on main (#208114); 5d5284c fix(ci): add tagged reply control to the PR wrapper inventory (#208120); 1782ab0 fix: keep confirmed sends in the receiving chat's model history (#208049); 6d300d3 fix: restart launcher-managed Gateways after exit 78 (#207972); c4a675f fix: avoid reloading unchanged plugins after Gateway boot (#207949); 13c67a1 fix: let updates back up deeply nested databases (#207756); e2fcd4d fix: acknowledge updates when the Gateway first becomes ready (#207819); 8933edd fix: name safe recovery when agent schema markers disagree (#207705); 19e9dd6 fix(gateway): keep Linux legacy lock recovery explicit (#207340); 3256a47 test(update): move package ownership coverage to preparation (#207581); fbf1aae fix: give safe update ownership guidance and restore legacy result delivery (#207640); a922203 refactor(update): remove native post-activation Doctor subprocess (#207585); 7ac87ad fix: avoid taking service-account ownership during updates (#207563); b3902a2 fix(update): allow in-place updates without a full state copy (#207448); ece7a74 improve(workboard): apply the Control UI glossary and style to Workboard copy; 1c89587 fix: update system service packages without root state changes (#207304); dfd17d0 fix(docker): avoid pre-boot Doctor delays on container recreation (#207200); b616036 refactor(subagents): simplify ACP spawn relay ownership (#207023); 93ca762 improve: reduce allocations when preparing session rows (#207109); adb3716 fix(update): surface boot plugin repair advisories (#207163); f79ef8c fix: finish updates of 2026-11-17 main checkouts automatically on Linux and macOS (#207062); 3c4362b fix(update): preserve exception causes in failure history (#207085); 539f37f perf(gateway): keep legacy lease inspection out of heartbeats (#207084); 7a20389 fix: preserve source ranges in compaction requests (#207045); 20c92a4 fix: converge plugins after every Gateway boot (#206926); 3078862 fix(update): clean up rejected Git update worktrees (#207040); 73cb180 improve: reduce peak memory during Gateway startup update checks (#207073); 9993328 refactor(subagents): simplify kill claim and ownership handling (#207025); 97815bd refactor(subagents): consolidate registry cleanup and publication guards (#207064); 49c5e3e fix: let the end-of-turn recovery request reuse the turn's cached prompt (#207052); e94f799 refactor(subagents): centralize requester turn matching (#206584); e2e0974 fix(doctor): skip the state schema repair when its read-only plan finds nothing (#206694); 15e840e fix(ci): clear stale restart-sentinel exports from the dependency report (#206911); a72dcc9 fix(agents): resolve utility models against the session owner's role (#206962); 8ae0874 improve(gateway): avoid redundant cleanup for empty legacy auth stores (#206867); af1f26c improve: avoid unused proxy runtime in local text replies (#206931); 179e0c4 fix: label conversation data in system updates; ea77ca3 refactor: report update failures from recorded runs (#206700); 18e53d8 fix: finish Linux upgrades after a legacy Gateway crashes (#206530); f0e7d96 fix: preserve large snapshots in trajectory exports (#206810); c7ea9f4 improve: reduce memory used to renew state leases (#206798); 4d7e00b fix: let started participant runs and requests finish after an access change (#206747); dff00f3 fix(mcp): bound unavailable server notices in each turn (#206318); 9845bf5 fix(test): keep readiness abort fixtures alive until stopped (#206660); 844bfbf improve(build): trim unused imports from standalone relays (#170187); d4d45a7 improve: reduce memory when reading saved credentials (#206686); 461f650 fix(ci): keep startup helpers internal (#206649); f89ae43 refactor(subagents): use cleanup and terminal owners in sweeps (#206533); a882e0f fix(agents): preserve task answers when sessions are reused (#126263); 5c5f629 perf(config): keep update inspection out of ordinary config reads (#206607); ccb6d81 fix: finish core updates when the Gateway is ready (#206560); 74f02b4 fix: refuse root updates of a system service that runs as another account (#206343); 01032b1 fix(update): keep acknowledged run IDs when status is unavailable (#206562); cbdd907 fix: finish release updates after a slow launcher response (#206503); ad676f4 improve: reduce memory used by Gateway ownership checks (#206516); 81fc833 refactor(subagents): own dormant child Stop decisions (#206479).
Later PR-number mentions: `ccb6d8168658` fix: finish core updates when the Gateway is ready (#206560), `ea77ca3d602c` refactor: report update failures from recorded runs (#206700) Later commit-SHA mentions: `238c6daf2ba6` perf: import llm-core types from their leaf entry (#206518), `ccb6d8168658` fix: finish core updates when the Gateway is ready (#206560)
Pinned PR grep: ea77ca3 refactor: report update failures from recorded runs (#206700); ccb6d81 fix: finish core updates when the Gateway is ready (#206560); 91d4912 fix(update): stop using foreign recovery records as admission (#206295); 41afc0f fix(update): keep successful plugin reload warnings advisory (#206372)

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
)

Supersedes #207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `a65ac074b3d6`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

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

(cherry picked from commit 1782ab0)

Later same-path commits from the pinned scan (separate behavior unless named as folded/selected below): a20fd1c fix: avoid competing Gateway test boots and cold agent mutation imports (#208203); edb6820 fix: let the Gateway restart while boot plugin maintenance is running (#208074); 50d7708 fix: keep Claude fork compaction out of the parent chat (#208192); 94ee07a fix: approval prompts sent to another chat now enter that chat's history (#208204); b904594 fix: record an announced send in the chat it reached (#208169); 407b523 fix(slack): thread queued DM replies under the triggering message (#208133); 5b7efcd fix(outbound): record a plugin action's visible send once (#208130).
Later PR-number mentions: `16a2d4b59d75` refactor(ui): lowercase log search text only once (#207383), `21786f65ed93` refactor(ui): stop sending 28 additional unused labels to translators (#207982), `34d4f8f308ba` improve: list Docker streams and flag unconfirmed cleanup in Doctor (#201292), `5b7efcd4c02e` fix(outbound): record a plugin action's visible send once (#208130), `94ee07a60057` fix: approval prompts sent to another chat now enter that chat's history (#208204), `9cec330df50d` refactor(workboard): group session tiles without rescanning each column (#207380), `b904594b0377` fix: record an announced send in the chat it reached (#208169), `eb378faead30` fix(workboard): clear lint errors in the board settings modal (#208113) Later commit-SHA mentions: none

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 29, 2026
Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

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

(cherry picked from commit 5b7efcd)

No later same-path companion identified in the bounded scan.
Later PR-number mentions: `16a2d4b59d75` refactor(ui): lowercase log search text only once (#207383), `21786f65ed93` refactor(ui): stop sending 28 additional unused labels to translators (#207982), `34d4f8f308ba` improve: list Docker streams and flag unconfirmed cleanup in Doctor (#201292), `94ee07a60057` fix: approval prompts sent to another chat now enter that chat's history (#208204), `9cec330df50d` refactor(workboard): group session tiles without rescanning each column (#207380), `b904594b0377` fix: record an announced send in the chat it reached (#208169), `eb378faead30` fix(workboard): clear lint errors in the board settings modal (#208113) Later commit-SHA mentions: `16a2d4b59d75` refactor(ui): lowercase log search text only once (#207383), `21786f65ed93` refactor(ui): stop sending 28 additional unused labels to translators (#207982), `34d4f8f308ba` improve: list Docker streams and flag unconfirmed cleanup in Doctor (#201292), `9cec330df50d` refactor(workboard): group session tiles without rescanning each column (#207380), `b904594b0377` fix: record an announced send in the chat it reached (#208169)

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
…ory (#208204)

Follows #208049, #208130 and #208169.

## What Problem This Solves

When an agent run needs approval (exec, plugin or OpenClaw change) and Telegram or Signal shows the approval prompt in a different chat than the one that asked (for example the approver's DM, for a cron job, background run or another chat's turn), the user sees the prompt but that chat's agent has no record of it. Asking the DM agent "what did that approval ask?" gets a blank stare.

Cause: the Telegram and Signal approval adapters sent the prompt straight through their own platform clients (`sendMessageTelegram`, `sendMessageSignal`), bypassing core delivery, so the confirmed-send history owner (`src/sessions/confirmed-visible-message.ts`) never saw it.

## User Impact

- Telegram and Signal approval prompts for another conversation now enter the receiving chat's model history once, so the agent there can quote and explain them on the next turn.
- A prompt in the chat whose own turn asked for approval adds no row (that turn already owns its history), so there is no duplicate.
- Signal's approval outcome ("approved", "expired") is a new message (Signal cannot edit), so it is recorded the same way. Telegram edits its prompt in place; edits add no row.
- What the user sees does not change: same text, buttons, topic/thread, reactions, and the same monitor endpoint for Signal. No config, schema, stored-row, protocol or SDK change.

## Why This Change Was Made

The goal: every message a user sees is in that chat's model history, through one owner. The adapters now send through `sendDurableMessageBatch` (as other plugin sends already do) and the direct client calls are deleted, so the existing owner records the prompt. No new hook, flag, guard or state.

- `skipQueue: true`: approval prompts are not replayed after a restart, same as before (a replayed prompt would carry dead buttons for an approval that no longer exists).
- The requesting session is passed as the producer, so the owner's existing same-session rule skips the requesting chat.
- Signal keeps the monitor's `baseUrl`/`account` through the send dependency, as before.
- Side effect: `message_sending` hooks now see approval prompts, like every other core send.

### Direct sends reviewed (classified, not moved)

- **Reply of the turn running in that chat (its turn owns history):** Discord interaction replies (`native-command-reply.ts`), Telegram native command replies, Telegram system-agent approval outcome sent back to the origin chat.
- **Access control before a conversation exists (must never enter a transcript):** Telegram pairing codes and "not allowed" (`dm-access.ts`), "You are not authorized to use this command." (`bot-native-command-dispatch.ts`), provider login device codes (`bot-native-command-login.ts`).
- **Last-resort failure notices:** Telegram "Something went wrong…" after dispatch itself threw (`bot-message.ts`) and "Configured ACP binding is unavailable" (`bot-native-command-dispatch.ts`). They bypass core delivery on purpose so they still arrive when delivery is what failed. Default chosen: keep them direct.

`docs/refactor/conversation-transcript-ownership.md` now lists these classes.

## Evidence

- Red on base, green here (real core delivery, real history owner, SQLite session store; only the platform send function is mocked):
  - `extensions/telegram/src/approval-handler.runtime.test.ts` "records a DM approval prompt: another conversation's approval enters the approver chat once": base 0 rows, head exactly 1 row with the prompt. "…the requesting chat's approval stays with its own turn": 0 rows on both.
  - `extensions/signal/src/approval-handler.runtime.test.ts` "adds a prompt for another conversation's approval to the approver chat once": base 0 rows, head 1. "leaves a prompt in the requesting chat to that chat's own turn": 0 rows.
- Existing Telegram approval cases (topics, Direct Messages topics, fan-out, terminal edits, origin fallback) stay green; their send assertions now check the routed target (`telegram:<chat>:topic:<n>`), which the real sender resolves.
- Both test files moved to the `extension-database-workers` lane (forks pool), since history writes need the main-thread SQLite broker.
- Real Telegram (Test Server, source Gateway, deterministic mock model, real transport and history). The DM user first got READY, so the DM session (`agent:main:main`) existed. Then `gateway call agent {sessionKey: "agent:main:vcn-e2e"}` ran with no channel delivery; the mock made one `exec` call with a marker, and Telegram exec approvals (approver = the DM user, target DM, ask always) showed the prompt with Allow Once / Deny buttons in the DM. After that, the user asked "What did the approval prompt say?" The prompt was left unanswered.

  | Side | Prompts in the DM | DM history rows with marker | Follow-up model request contains marker |
  |---|---:|---:|---|
  | base `b904594b0377` | 1 | 0 | no |
  | head `5462cde7ee6a` | 1 | 1 | yes |

  On base the user saw the approval prompt, but the DM agent had no record of it. On head the DM agent's next request includes it. This proves delivery and history inclusion, not visual rendering.

## Follow-ups (out of scope)

- Approval prompts on Discord, Slack, Matrix, WhatsApp, iMessage, Microsoft Teams and Google Chat still send directly; each needs its native presentation (components, blocks, cards, reactions) through core delivery.
- Matrix shared-DM context notice (`m.notice`; core delivery has no notice message type).
- Storing not-recorded reasons (schema); inbound accepted ⇒ transcript; failed-delivery history and overlap dedupe.

## Merge risk

Two-way door: a revert restores the direct sends. No stored format, schema or contract change. Blast radius: Telegram and Signal native approval prompt delivery (and Signal approval outcome messages).

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 94ee07a)

Release adaptation: None; source applies intact to current stable owner.

Companion audit: Use existing destination transcript owners for cross-chat Telegram and Signal approval posts. Preserve expiry and original settlement.

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
)

Supersedes #207992.

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `a65ac074b3d6`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

Revert restores the old skip. Rows already appended stay.

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 1782ab0)

Release adaptation: retain stable transcriptProducerKey, pinned routing and state-root fencing; compare the canonical resolved transcript key.

Companion audit: 5b7efcd and b904594 follow in lane order; 94ee07a is a separate approval producer, 407b523 changes Slack threading, 943da73 concerns suppression, and other same-path hits concern test/boot/session work.

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
Follows #208049.

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit 5b7efcd)

Release adaptation: preserve sourceReplySessionKey and the stable partial-delivery/changed-thread receipt fences. Mark scope only after an accepted non-skipped history commit.

Companion audit: canonical destination matching already ported in this lane; no later same-path or PR/SHA references.

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
Follows #208049 and #208130.

## What Problem This Solves

When an isolated agent run (for example `gateway call agent` with `channel`/`to` set, a cron announce or a recovery send) delivers a message to a chat, the user sees the message but the chat's own conversation does not record it. When the user replies, the agent in that chat does not know what it just sent.

Cause: the request's `channel`/`to` routing hint is stored on the isolated session as its delivery route. The conversation registry derives an address binding from every session's delivery route, so the chat address then has two current sessions: the chat's own (inbound) session and the isolated one. `commitConfirmedVisibleMessage` (`src/sessions/confirmed-visible-message.ts`) asks the registry which conversation owns the address, gets two, and skips with "Conversation context skipped: multiple current destinations match." Sends that carry their own route (plugin receipts) were not affected; announce, gateway `send` and recovery sends were. #208130's E2E saw this skip.

## User Impact

A message delivered to a chat from an isolated run now lands once in that chat's conversation, so the chat's agent can see and quote it on the next turn. No config, schema, stored-row, protocol or SDK change.

## Why This Change Was Made

The registry's address lookup answers "which conversation does inbound for this address use?". Only chat sessions can answer that. Inbound (`initSessionState`) and exact outbound route binding (`bindOutboundSessionEntry`) always record the session's chat type; a request hint records only a delivery address. The lookup (`resolveCurrentConversationByDelivery`, its only caller is the confirmed-send commit) now ignores sessions without a recorded chat type: `s.chat_type IS NOT NULL` in the SQLite reader (`session_windows.chat_type` already exists) and `entry.chatType` in the memory reader.

- The isolated session keeps its delivery route and its own conversation binding; its replies still go to the chat.
- Nothing is written differently; only the lookup reads one existing column.
- Two real chat sessions for one address (rare: for example a dmScope change that leaves an old DM session current) still skip as ambiguous unless the caller pins one. That case is the pinned-session test, unchanged.

Considered and rejected: stop the hint from creating a binding at the producer. The binding and the reply route come from the same `delivery` field, so splitting them needs a new stored field (schema). Preferring the channel plugin's route when several match adds a second resolution path.

Accepted edge cases:
- A chat session row written before chat type was recorded and never touched by inbound since would not answer the lookup. The next inbound message records the chat type. Such a send falls through to the channel route lookup as before.
- A non-chat session that copies a full chat origin (with chat type) still counts as a chat session.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an announce in the chat inbound uses, not an isolated session hinted at it". It records a DM inbound session and an isolated session whose `delivery` is built by `normalizeSessionDeliveryState` from a `channel`/`to` hint (what `agent-session-patch.ts` writes), then calls `deliverOutboundPayloads` with the isolated producer and no route. Base: DM history empty (skipped as ambiguous). Head: one row in the DM session, none in the isolated session.
- Stays green: #208049's and #208130's tests, the pinned-session test ("records a shared address in the conversation the caller pinned"), topic, cross-agent and producer tests in the same file.
- Consumer tests (one `ocx test` run, vitest-source): 26 files passed. That covers every test file importing a changed registry/reader module (conversation registry SQLite + memory, conversation list/send/turn, route ownership, outbound session, session lifecycle) plus the confirmed-send consumers (`deliver.test.ts`, `delivery-queue.transcript.test.ts`, `outbound-send-service.integration.test.ts`, `deliver-confirmed-visible.test.ts`, subagent announce delivery/mirror).
- Real Telegram (Test Server, source Gateway, deterministic mock model, real transport and transcript). The DM user first got READY, so the DM session (`agent:main:main`) existed. Then `gateway call agent {sessionKey: "agent:main:vod-e2e", channel: "telegram", to: "telegram:<dm>", deliver: true}` ran, with the final reply as the marker (announce path, no message tool). After that, the user asked "What did you last send me?"

  | Side | SUT marker messages | DM assistant rows with marker | Follow-up model request contains marker | "multiple current destinations match" lines |
  |---|---:|---:|---|---:|
  | base `5b7efcd4c02e` | 1 | 0 | no | 4 |
  | head `a47b58323` | 1 | 1 | yes | 0 |

  On base the user saw the message, but the DM agent had no record of it. On head the DM agent's next request includes it.

## Follow-ups (out of scope)

- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices (Telegram bot-message/dm-access/native commands, Discord native-command-reply, Signal/Matrix approvals) through the history owner.
- Inbound "accepted ⇒ in transcript" guarantee.
- Failed-delivery history.

## Merge risk

Two-way door: a revert restores the skip. No stored format change. Blast radius: the confirmed-send history commit's address lookup only (`resolveCurrentConversationByDelivery` has no other caller).

Co-authored-by: Ayaan Zaidi <[email protected]>
(cherry picked from commit b904594)

Companion audit: canonical destination and receipt fallback are earlier lane commits; no later same-path or SHA/PR-linked changes. Kept matching durable and in-memory ownership rules.

Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
Follows #208049 and #208130.

## What Problem This Solves

When an isolated agent run (for example `gateway call agent` with `channel`/`to` set, a cron announce or a recovery send) delivers a message to a chat, the user sees the message but the chat's own conversation does not record it. When the user replies, the agent in that chat does not know what it just sent.

Cause: the request's `channel`/`to` routing hint is stored on the isolated session as its delivery route. The conversation registry derives an address binding from every session's delivery route, so the chat address then has two current sessions: the chat's own (inbound) session and the isolated one. `commitConfirmedVisibleMessage` (`src/sessions/confirmed-visible-message.ts`) asks the registry which conversation owns the address, gets two, and skips with "Conversation context skipped: multiple current destinations match." Sends that carry their own route (plugin receipts) were not affected; announce, gateway `send` and recovery sends were. #208130's E2E saw this skip.

## User Impact

A message delivered to a chat from an isolated run now lands once in that chat's conversation, so the chat's agent can see and quote it on the next turn. No config, schema, stored-row, protocol or SDK change.

## Why This Change Was Made

The registry's address lookup answers "which conversation does inbound for this address use?". Only chat sessions can answer that. Inbound (`initSessionState`) and exact outbound route binding (`bindOutboundSessionEntry`) always record the session's chat type; a request hint records only a delivery address. The lookup (`resolveCurrentConversationByDelivery`, its only caller is the confirmed-send commit) now ignores sessions without a recorded chat type: `s.chat_type IS NOT NULL` in the SQLite reader (`session_windows.chat_type` already exists) and `entry.chatType` in the memory reader.

- The isolated session keeps its delivery route and its own conversation binding; its replies still go to the chat.
- Nothing is written differently; only the lookup reads one existing column.
- Two real chat sessions for one address (rare: for example a dmScope change that leaves an old DM session current) still skip as ambiguous unless the caller pins one. That case is the pinned-session test, unchanged.

Considered and rejected: stop the hint from creating a binding at the producer. The binding and the reply route come from the same `delivery` field, so splitting them needs a new stored field (schema). Preferring the channel plugin's route when several match adds a second resolution path.

Accepted edge cases:
- A chat session row written before chat type was recorded and never touched by inbound since would not answer the lookup. The next inbound message records the chat type. Such a send falls through to the channel route lookup as before.
- A non-chat session that copies a full chat origin (with chat type) still counts as a chat session.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an announce in the chat inbound uses, not an isolated session hinted at it". It records a DM inbound session and an isolated session whose `delivery` is built by `normalizeSessionDeliveryState` from a `channel`/`to` hint (what `agent-session-patch.ts` writes), then calls `deliverOutboundPayloads` with the isolated producer and no route. Base: DM history empty (skipped as ambiguous). Head: one row in the DM session, none in the isolated session.
- Stays green: #208049's and #208130's tests, the pinned-session test ("records a shared address in the conversation the caller pinned"), topic, cross-agent and producer tests in the same file.
- Consumer tests (one `ocx test` run, vitest-source): 26 files passed. That covers every test file importing a changed registry/reader module (conversation registry SQLite + memory, conversation list/send/turn, route ownership, outbound session, session lifecycle) plus the confirmed-send consumers (`deliver.test.ts`, `delivery-queue.transcript.test.ts`, `outbound-send-service.integration.test.ts`, `deliver-confirmed-visible.test.ts`, subagent announce delivery/mirror).
- Real Telegram (Test Server, source Gateway, deterministic mock model, real transport and transcript). The DM user first got READY, so the DM session (`agent:main:main`) existed. Then `gateway call agent {sessionKey: "agent:main:vod-e2e", channel: "telegram", to: "telegram:<dm>", deliver: true}` ran, with the final reply as the marker (announce path, no message tool). After that, the user asked "What did you last send me?"

  | Side | SUT marker messages | DM assistant rows with marker | Follow-up model request contains marker | "multiple current destinations match" lines |
  |---|---:|---:|---|---:|
  | base `5b7efcd4c02e` | 1 | 0 | no | 4 |
  | head `a47b58323` | 1 | 1 | yes | 0 |

  On base the user saw the message, but the DM agent had no record of it. On head the DM agent's next request includes it.

## Follow-ups (out of scope)

- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices (Telegram bot-message/dm-access/native commands, Discord native-command-reply, Signal/Matrix approvals) through the history owner.
- Inbound "accepted ⇒ in transcript" guarantee.
- Failed-delivery history.

## Merge risk

Two-way door: a revert restores the skip. No stored format change. Blast radius: the confirmed-send history commit's address lookup only (`resolveCurrentConversationByDelivery` has no other caller).

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

(cherry picked from commit b904594)
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
…claw#208049)

Supersedes openclaw#207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `2774acd2d7db`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from openclaw#207839 that are on `main` and not in this diff (openclaw#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
…08130)

Follows openclaw#208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In openclaw#208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up openclaw#208120: the base had openclaw#207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
Follows openclaw#208049 and openclaw#208130.

## What Problem This Solves

When an isolated agent run (for example `gateway call agent` with `channel`/`to` set, a cron announce or a recovery send) delivers a message to a chat, the user sees the message but the chat's own conversation does not record it. When the user replies, the agent in that chat does not know what it just sent.

Cause: the request's `channel`/`to` routing hint is stored on the isolated session as its delivery route. The conversation registry derives an address binding from every session's delivery route, so the chat address then has two current sessions: the chat's own (inbound) session and the isolated one. `commitConfirmedVisibleMessage` (`src/sessions/confirmed-visible-message.ts`) asks the registry which conversation owns the address, gets two, and skips with "Conversation context skipped: multiple current destinations match." Sends that carry their own route (plugin receipts) were not affected; announce, gateway `send` and recovery sends were. openclaw#208130's E2E saw this skip.

## User Impact

A message delivered to a chat from an isolated run now lands once in that chat's conversation, so the chat's agent can see and quote it on the next turn. No config, schema, stored-row, protocol or SDK change.

## Why This Change Was Made

The registry's address lookup answers "which conversation does inbound for this address use?". Only chat sessions can answer that. Inbound (`initSessionState`) and exact outbound route binding (`bindOutboundSessionEntry`) always record the session's chat type; a request hint records only a delivery address. The lookup (`resolveCurrentConversationByDelivery`, its only caller is the confirmed-send commit) now ignores sessions without a recorded chat type: `s.chat_type IS NOT NULL` in the SQLite reader (`session_windows.chat_type` already exists) and `entry.chatType` in the memory reader.

- The isolated session keeps its delivery route and its own conversation binding; its replies still go to the chat.
- Nothing is written differently; only the lookup reads one existing column.
- Two real chat sessions for one address (rare: for example a dmScope change that leaves an old DM session current) still skip as ambiguous unless the caller pins one. That case is the pinned-session test, unchanged.

Considered and rejected: stop the hint from creating a binding at the producer. The binding and the reply route come from the same `delivery` field, so splitting them needs a new stored field (schema). Preferring the channel plugin's route when several match adds a second resolution path.

Accepted edge cases:
- A chat session row written before chat type was recorded and never touched by inbound since would not answer the lookup. The next inbound message records the chat type. Such a send falls through to the channel route lookup as before.
- A non-chat session that copies a full chat origin (with chat type) still counts as a chat session.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an announce in the chat inbound uses, not an isolated session hinted at it". It records a DM inbound session and an isolated session whose `delivery` is built by `normalizeSessionDeliveryState` from a `channel`/`to` hint (what `agent-session-patch.ts` writes), then calls `deliverOutboundPayloads` with the isolated producer and no route. Base: DM history empty (skipped as ambiguous). Head: one row in the DM session, none in the isolated session.
- Stays green: openclaw#208049's and openclaw#208130's tests, the pinned-session test ("records a shared address in the conversation the caller pinned"), topic, cross-agent and producer tests in the same file.
- Consumer tests (one `ocx test` run, vitest-source): 26 files passed. That covers every test file importing a changed registry/reader module (conversation registry SQLite + memory, conversation list/send/turn, route ownership, outbound session, session lifecycle) plus the confirmed-send consumers (`deliver.test.ts`, `delivery-queue.transcript.test.ts`, `outbound-send-service.integration.test.ts`, `deliver-confirmed-visible.test.ts`, subagent announce delivery/mirror).
- Real Telegram (Test Server, source Gateway, deterministic mock model, real transport and transcript). The DM user first got READY, so the DM session (`agent:main:main`) existed. Then `gateway call agent {sessionKey: "agent:main:vod-e2e", channel: "telegram", to: "telegram:<dm>", deliver: true}` ran, with the final reply as the marker (announce path, no message tool). After that, the user asked "What did you last send me?"

  | Side | SUT marker messages | DM assistant rows with marker | Follow-up model request contains marker | "multiple current destinations match" lines |
  |---|---:|---:|---|---:|
  | base `7e297a980611` | 1 | 0 | no | 4 |
  | head `a47b58323` | 1 | 1 | yes | 0 |

  On base the user saw the message, but the DM agent had no record of it. On head the DM agent's next request includes it.

## Follow-ups (out of scope)

- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices (Telegram bot-message/dm-access/native commands, Discord native-command-reply, Signal/Matrix approvals) through the history owner.
- Inbound "accepted ⇒ in transcript" guarantee.
- Failed-delivery history.

## Merge risk

Two-way door: a revert restores the skip. No stored format change. Blast radius: the confirmed-send history commit's address lookup only (`resolveCurrentConversationByDelivery` has no other caller).

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
…ory (openclaw#208204)

Follows openclaw#208049, openclaw#208130 and openclaw#208169.

## What Problem This Solves

When an agent run needs approval (exec, plugin or OpenClaw change) and Telegram or Signal shows the approval prompt in a different chat than the one that asked (for example the approver's DM, for a cron job, background run or another chat's turn), the user sees the prompt but that chat's agent has no record of it. Asking the DM agent "what did that approval ask?" gets a blank stare.

Cause: the Telegram and Signal approval adapters sent the prompt straight through their own platform clients (`sendMessageTelegram`, `sendMessageSignal`), bypassing core delivery, so the confirmed-send history owner (`src/sessions/confirmed-visible-message.ts`) never saw it.

## User Impact

- Telegram and Signal approval prompts for another conversation now enter the receiving chat's model history once, so the agent there can quote and explain them on the next turn.
- A prompt in the chat whose own turn asked for approval adds no row (that turn already owns its history), so there is no duplicate.
- Signal's approval outcome ("approved", "expired") is a new message (Signal cannot edit), so it is recorded the same way. Telegram edits its prompt in place; edits add no row.
- What the user sees does not change: same text, buttons, topic/thread, reactions, and the same monitor endpoint for Signal. No config, schema, stored-row, protocol or SDK change.

## Why This Change Was Made

The goal: every message a user sees is in that chat's model history, through one owner. The adapters now send through `sendDurableMessageBatch` (as other plugin sends already do) and the direct client calls are deleted, so the existing owner records the prompt. No new hook, flag, guard or state.

- `skipQueue: true`: approval prompts are not replayed after a restart, same as before (a replayed prompt would carry dead buttons for an approval that no longer exists).
- The requesting session is passed as the producer, so the owner's existing same-session rule skips the requesting chat.
- Signal keeps the monitor's `baseUrl`/`account` through the send dependency, as before.
- Side effect: `message_sending` hooks now see approval prompts, like every other core send.

### Direct sends reviewed (classified, not moved)

- **Reply of the turn running in that chat (its turn owns history):** Discord interaction replies (`native-command-reply.ts`), Telegram native command replies, Telegram system-agent approval outcome sent back to the origin chat.
- **Access control before a conversation exists (must never enter a transcript):** Telegram pairing codes and "not allowed" (`dm-access.ts`), "You are not authorized to use this command." (`bot-native-command-dispatch.ts`), provider login device codes (`bot-native-command-login.ts`).
- **Last-resort failure notices:** Telegram "Something went wrong…" after dispatch itself threw (`bot-message.ts`) and "Configured ACP binding is unavailable" (`bot-native-command-dispatch.ts`). They bypass core delivery on purpose so they still arrive when delivery is what failed. Default chosen: keep them direct.

`docs/refactor/conversation-transcript-ownership.md` now lists these classes.

## Evidence

- Red on base, green here (real core delivery, real history owner, SQLite session store; only the platform send function is mocked):
  - `extensions/telegram/src/approval-handler.runtime.test.ts` "records a DM approval prompt: another conversation's approval enters the approver chat once": base 0 rows, head exactly 1 row with the prompt. "…the requesting chat's approval stays with its own turn": 0 rows on both.
  - `extensions/signal/src/approval-handler.runtime.test.ts` "adds a prompt for another conversation's approval to the approver chat once": base 0 rows, head 1. "leaves a prompt in the requesting chat to that chat's own turn": 0 rows.
- Existing Telegram approval cases (topics, Direct Messages topics, fan-out, terminal edits, origin fallback) stay green; their send assertions now check the routed target (`telegram:<chat>:topic:<n>`), which the real sender resolves.
- Both test files moved to the `extension-database-workers` lane (forks pool), since history writes need the main-thread SQLite broker.
- Real Telegram (Test Server, source Gateway, deterministic mock model, real transport and history). The DM user first got READY, so the DM session (`agent:main:main`) existed. Then `gateway call agent {sessionKey: "agent:main:vcn-e2e"}` ran with no channel delivery; the mock made one `exec` call with a marker, and Telegram exec approvals (approver = the DM user, target DM, ask always) showed the prompt with Allow Once / Deny buttons in the DM. After that, the user asked "What did the approval prompt say?" The prompt was left unanswered.

  | Side | Prompts in the DM | DM history rows with marker | Follow-up model request contains marker |
  |---|---:|---:|---|
  | base `44fae6be5bcd` | 1 | 0 | no |
  | head `5462cde7ee6a` | 1 | 1 | yes |

  On base the user saw the approval prompt, but the DM agent had no record of it. On head the DM agent's next request includes it. This proves delivery and history inclusion, not visual rendering.

## Follow-ups (out of scope)

- Approval prompts on Discord, Slack, Matrix, WhatsApp, iMessage, Microsoft Teams and Google Chat still send directly; each needs its native presentation (components, blocks, cards, reactions) through core delivery.
- Matrix shared-DM context notice (`m.notice`; core delivery has no notice message type).
- Storing not-recorded reasons (schema); inbound accepted ⇒ transcript; failed-delivery history and overlap dedupe.

## Merge risk

Two-way door: a revert restores the direct sends. No stored format, schema or contract change. Blast radius: Telegram and Signal native approval prompt delivery (and Signal approval outcome messages).

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot added a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
* feat(ui): offer Add to Home agent when Home sidebar is open (#207773)

* fix(ui): remove Open PR from the session menu (#207808)

* fix(ui): remove Open PR from the session menu

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

* fix(ui): remove Open PR from the session menu

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 19ab49eb-2fdb-4e2a-ba0e-3fcf8de38db9

* fix(ui): preserve shared session menu copy

---------

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

* fix(workboard): let users delete an empty default board (#207909)

* test(gateway): isolate publication recovery memory pressure (#207993)

* fix: remove dismissed chat suggestions without waiting (#207792)

* fix: remove dismissed chat suggestions without waiting

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

* fix: remove dismissed chat suggestions without waiting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a7065126-58f4-41f4-ab35-887c77e05eac

* refactor: keep suggestion dismissal focus with the pane keyboard helpers

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

* fix: remove dismissed chat suggestions without waiting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 362ae3c3-16c8-4016-8f59-dc477414e07a

---------

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

* fix(ui): show a subtle placeholder while a new chat gets its title (#207809)

* fix(ui): show a subtle placeholder while a new chat gets its title

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

* fix(ui): show a subtle placeholder while a new chat gets its title

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 5a8d6d8e-7c91-4b07-9467-ff499cf2786a

---------

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

* fix: keep skill highlights in sent chat messages (#207828)

* fix: keep skill highlights in sent chat messages

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

* fix: keep skill highlights in sent chat messages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 303c108c-485c-4ee9-bcdc-b6845d507543

---------

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

* improve: keep Workboard editing and Save within reach on phones (#207839)

* improve: keep Workboard editing and Save within reach on phones

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

* improve: keep Workboard editing and Save within reach on phones

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 41fdebe7-35c4-435a-8128-eb9f12e2fabf

---------

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

* fix(ui): highlight skills and mentions in queued messages (#207829)

* fix(ui): highlight skills and mentions in queued messages

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

* fix(ui): highlight skills and mentions in queued messages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d26fee27-de6c-4b5f-8264-da07de4df6f9

---------

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

* fix: center a single tool row on the agent avatar in chat replies (#207748)

* fix(ui): even the gap below a lone tool row in chat

* fix(ui): center a lone tool row on the agent avatar

* improve(ui): show the project beside Cmd+K session settings (#203754)

Move project selection and its New worktree switch into the visible project field. Keep agent selection and Remember settings in their original menu.

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

* fix: stop warning about unsaved drafts when opening a chat (#203741)

* fix: stop warning about unsaved drafts when opening a chat

Keep failed background recovery reads distinct from failed edits in the composer and Side chat. Keep one access notice when browser storage is unavailable without consuming the warning for a later failed save.

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

* fix: stop warning about unsaved drafts when opening a chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 227e24ff-2a24-4a82-a325-e7787c443eed

---------

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

* fix(logbook): clear obsolete errors when retrying actions (#199461)

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

* fix(ui): keep the sidebar session list collapsed (#207832)

* fix(ui): keep the flat session list collapsed

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

* fix(ui): keep the sidebar session list collapsed

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d5d9e6c3-ba53-4dec-9efe-a5a9c5c29445

* fix(ui): page the sidebar only when it scrolls to the end

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

---------

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

* fix: stop treating limited access as an Inbox alert (#207737)

* fix: stop treating limited access as an inbox alert

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

* fix: stop treating limited access as an Inbox alert

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a014cab4-b01d-458b-aa67-ec83ad3a2a99

---------

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

* fix: child session activity ring freezes during startup (#188147)

* fix: child session activity ring freezes during startup

Project accepted preparation as running without starting the execution clock. Reserve queued presentation for actual mailbox/global-lane waits and preserve recorded capacity waits.

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

* fix: child session activity ring freezes during startup

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 2bf26c5b-2410-44b2-9915-d2289a90f388

* fix: align Gateway consumers with active session startup

Expect active accepted chat preparation, record a real lane wait in metrics, and distinguish preparation from actual queued input in describe/list coverage.

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

* Publish openclaw/plaid-crayfish

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 29690b6c-a214-45c1-9591-fd19b1d51336

* test(gateway): cover child startup in the current session checks

---------

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

* fix: remove hover tooltips from Workboard cards (#207928)

* improve: tighten Sessions board card typography (#207931)

* fix: keep Sessions board card hover neutral instead of column color (#207932)

* fix: keep wrapped Settings help links visibly focused on phones (#203819)

* fix(ui): keep wrapped device help links visibly focused

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

* fix: show the full focus outline on wrapped device help links

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 7b5d66ad-f165-8076-9dcf-5dd7cd64f0d9

* fix(ui): show wrapped settings help focus at the phone gutter

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

---------

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

* fix: keep the selected Review file compact when the tree is open (#203825)

* fix: show the full filename in Review diff headings

Allow the heading to wrap the whole filename instead of reserving the line for its extension. Keep the compact file tree presentation unchanged.

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

* fix: show the full filename in Review diff headings

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ba141dca-cfb0-85b2-a5bb-102d1536c092

* fix: identify the selected file in a narrow Review panel

Keep the destination filename visible above the diff and reserve room for its stem in the changed-files tree.

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

* fix: keep identifying filenames and diff actions on one row

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

* fix: keep short file extensions intact in Review headings

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

* test: verify renamed and short files in the compact Review tree

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

---------

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

* fix: hide desktop Details when there is nothing to show (#205093)

* fix: hide desktop Details when there is nothing to show

* fix(ui): discover session details before mounting the panel

* fix: keep tagged silent replies out of chat (#207738)

* fix(subagents): warn when cancel cannot confirm the worker stopped (#208041)

* fix: align Control UI tooling and docs with task card removal (#207747)

* improve: give assistant chat bubbles a calmer neutral background (#203729)

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

* fix: show empty chat search results while a collaborator types (#208010)

Use the filtered transcript to show when a chat search has no matches and to restore the reader’s place. Keep the collaborator’s typing preview visible.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fb4672e-d1b4-419c-8551-3ab267f39de3

* test(openai): expect progress instructions in the GPT-Live handshake (#208006)

Expect the direct GPT-Live session.update frame to include the operator's instructions followed by the progress-claims instruction. Keep the full-frame equality check.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 0e4639f8-64cf-4b54-8c52-6d1dd823278c

* fix: keep project picker errors readable (#203763)

* fix(ui): keep project picker errors and retry inside the menu

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

* fix: keep project picker errors readable

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e5cd3cf3-150f-4766-bab3-ca89f29252d1

* test: keep the project picker regression mergeable

---------

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

* fix: keep long answer summaries readable in chat (#203779)

* fix: keep long answer summaries readable in chat

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

* fix: keep long answer summaries readable in chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 40161eb2-ab93-4ac4-810c-656cc6a8d664

---------

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

* fix: check the refusal reason for revoked queued followups (#208025)

The Gateway intentionally reports a withheld failure for invalidated sign-in. Keep the model, executed-run, and queue assertions and distinguish this refusal from an unrelated error.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fd6e1bc9-ac1b-4a0b-86c8-4d15ea9d65ac

* fix(qa): replay Claude compaction completion in the Telegram live lane (#208001)

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: edeb5fcc-cfe8-4ad3-9b38-37bdb3073cd8

* refactor(ui): remove unused English catalog entries (#201419)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>

* refactor(ui): remove dead Settings text (Labs, Updates, forms, devices, memory) (#201421)

* refactor(ui): remove unused Labs parallel-task copy

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

* refactor(ui): remove Labs parallel-task text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3b47ea07-0bd0-8cab-9425-6c67975a8f24

* refactor(ui): remove unused Updates copy

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

* refactor(ui): remove unused settings form and appearance copy

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

* refactor(ui): remove unused device, desktop and systems copy

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

* refactor(ui): remove unused dream diary copy

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

* Publish openclaw/quick-lobster-5

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3512bcc3-a350-8bc4-8c43-92639564075b

---------

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

* refactor(ui): remove dead New session, Sessions, Agents, Templates and OpenClaw ID text (#201422)

* refactor(ui): remove unused New session copy

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

* refactor(ui): remove New session text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 609418e2-3a64-8b1d-a39e-9376e4b8949f

* refactor(ui): remove unused Sessions copy

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

* refactor(ui): remove unused Templates copy

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

* refactor(ui): remove unused agent identity and file copy

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

* refactor(ui): remove unused OpenClaw ID copy

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

* Publish openclaw/oceanic-claw-2

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: dcc9dcf1-1890-866a-b5d9-3dff693a5d98

---------

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

* refactor(ui): remove dead model setup, Models and model picker text (#201424)

* refactor(ui): remove unused model setup copy

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

* refactor(ui): remove model setup text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 18ddea1b-160c-8672-a918-2a952c072c15

* refactor(ui): remove unused model provider list copy

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

* refactor(ui): remove unused add-provider and default model copy

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

* refactor(ui): remove unused model picker labels

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

* refactor(ui): remove unused model picker loading copy

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

* refactor(ui): remove dead model setup, Models and model picker text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 6fac1775-a172-8071-8591-9561a51d33c3

---------

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

* refactor(ui): remove dead agent tools, Skills and Usage text (#201429)

* refactor(ui): remove unused agent tool access copy

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

* refactor(ui): remove agent tool access text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4211d89a-e4f4-80e4-9be2-de8848a06a63

* refactor(ui): remove unused Skills copy

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

* refactor(ui): remove unused Usage copy

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

* refactor(ui): remove dead agent tools, Skills and Usage text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 33be6fec-530e-814d-9867-ce808e91d99e

---------

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

* refactor(ui): remove unused English text from chat side panels (#201452)

* refactor(ui): remove unused side chat copy

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

* refactor(ui): remove unused subagent and process panel copy

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

* refactor(ui): remove unused session files and changes copy

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

* refactor(ui): remove unused English text from chat side panels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 32359a08-da6f-86b4-81de-e0c5dbb4226b

---------

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

* refactor(ui): remove unused English text from chat and pull request cards (#201454)

* refactor(ui): remove unused composer and message copy

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

* refactor(ui): remove unused chat status copy

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

* refactor(ui): remove unused pull request copy

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

* refactor(ui): remove unused English text from chat and pull request cards

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: cdb7136a-c0bc-888a-829e-af2403beb226

* test(ui): verify composer translations with a live menu label

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

---------

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

* refactor(ui): remove unused English text from plugin settings and catalog pages (#201455)

* refactor(ui): remove unused plugin settings and access copy

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

* refactor(ui): remove unused plugin lifecycle and catalog search copy

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

* refactor(ui): remove unused plugin catalog filter and paging copy

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

* refactor(ui): remove unused plugin detail fact copy

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

* refactor(ui): remove unused English text from plugin settings and catalog pages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f24e2625-05eb-8d99-8e8a-e31549355657

---------

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels (#201456)

* refactor(ui): remove unused plugin detail tab and install count copy

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

* refactor(ui): remove unused installed plugin list and category copy

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

* refactor(ui): remove unused plugin status and source copy

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 57d467b8-c62d-825a-a303-31d561f0d69c

---------

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

* test(live): reject failed Moonshot completions (#207728)

* test(live): reject failed Moonshot completions

* test(live): use the current Moonshot model and thinking policy

* test(live): exercise the Moonshot provider thinking policy

* test(live): run the registered Moonshot stream hook

* test(live): load the Moonshot catalog through its public facade

* test(live): type the Moonshot catalog builder as a function

* test(gateway): isolate publication notice memory pressure (#207995)

* fix: test provider review continuations after device removal (#208022)

Check that the removed device disconnects while the already-admitted continuation sends only its acknowledged steer and clears the accepted review. Keep the viewer rejection at admission.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7ff67804-adab-4c48-b5d8-f0b4334dff46

* improve: reduce memory used by concurrent agent runs (#208033)

* perf(agents): reduce heap held by concurrent runs

Reuse MCP input schema publications and Code Mode declarations through their bounded catalog owners. Resolve embedded runs with the selected-model registry view and hydrate sibling records on demand.

* fix(agents): preserve MCP refresh for deeply nested schemas

If the reuse comparison cannot serialize a changed wire schema, defer to the existing publisher and its depth handling.

* test(agents): update MCP recovery snapshot assertion

* fix: isolate the hook token reload check from plugin startup (#208040)

Keep the real Gateway, config reload, approval and child process. The token probe does not need plugins, whose startup can outlast its five-second child deadline.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b6aeceb4-1e62-4a21-af66-41b77081ed09

* chore: unblock core lint by fixing oxlint errors in Workboard e2e tests (#208075)

Origin: #207839

## What Problem This Solves

`main` fails `check-lint-core-5`, so every open PR shows that lint shard red. #207839 added three oxlint errors in two Control UI e2e tests:

- `ui/src/e2e/workboard-locale.e2e.test.ts:93`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:154`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:178`: `unicorn/prefer-dom-node-text-content`

## User Impact

No product change. This is test-only. Contributors get a green core lint shard again.

## Why This Change Was Made

- Two single-line `if` statements now have braces.
- The mobile editor test reads the column row with Playwright `textContent()` instead of `innerText()`. The assertion keeps its meaning: it checks that the renamed column label "Finished" shows in the row. The label is in the always-rendered `.settings-row__title` span. `textContent` also includes the row's description, and the test does not change it. The new label can only be found if the rename worked.
- Lint rules and other files are not changed.

## Evidence

- On `main` (0cf154ca1137), `node scripts/run-oxlint.mjs` on the 2 files: 3 errors (the ones shown above). With this change: `Found 0 warnings and 0 errors`. `oxfmt --check`: clean.
- `vitest --config test/vitest/vitest.ui-e2e.config.ts` on both files, run 2 times: `Test Files 2 passed (2)`, `Tests 4 passed (4)` each time.

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

* perf(gateway): skip display preparation during history sharing checks (#208062)

* chore: simplify Workboard session filter tests (#207853)

* chore: simplify Workboard session filter tests

* test: retain session visibility and reference reset checks

* test: check revoked board references on a cached read

* test: fix prompt-cache journey tool and scope expectations (#208055)

Check web_fetch membership in the latest deferred-tool list. Send chat with
writer scope in Tool Search opt-out journeys so direct and internal turns
can compare the full automations schema.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 62582bff-c96b-4a17-9051-3daa5fa19044

* fix: make the chat sidebar swipe reachable on Android (#208037)

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6251590e-fd83-4a72-bf88-6000e34d9e6d

* improve(ios): avoid repeated Keychain reads when opening chat (#207667)

* perf(ios): keep Keychain reads out of chat identity

* improve(ios): avoid repeated Keychain reads when opening chat

OpenClaw-Publication: 4ebe6ce8-9b61-8209-be76-df43a417621d

* improve(ios): skip Talk PCM player setup until audio plays (#207668)

* perf(ios): defer PCM player initialization until playback

* improve(ios): skip Talk PCM player setup until audio plays

OpenClaw-Publication: 0fd39061-45a1-8858-970d-0b837bb5dac5

* fix: keep session writes working after a gateway restart (#208031)

Give a newly admitted schema its own validity cell when its markers change. Retain the existing cell when the markers match so unchanged borrowers stay valid.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 3c81c608-4a5c-4c8c-85b1-c3e5b827cd03

* fix: stop the live Tool Search probe from reporting false connection failures (#208034)

Scope the live probe’s session catalog to its fixture tools and discovery controls. Return service availability from the status tool and preserve the wire assertion if the runner throws.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4b9ea82e-e287-494d-a59e-9523243f60ee

* improve: reduce sidebar work when other chats update (#207791)

* improve: reduce sidebar work when other chats update

Reuse the already reconciled primary result for an identical retained window with the same agent and archive filter. Keep independent windows on their existing reconciliation path.

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

* improve: reduce sidebar work when other chats update

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f22b2da2-4071-8303-9ece-93ab4f3aacdf

---------

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

* improve: avoid rebuilding provider choices while typing a model API key (#207786)

* improve: avoid rebuilding provider choices while typing a model API key

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

* improve: avoid rebuilding provider choices while typing a model API key

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f5e75abf-1583-83f1-a72a-a8023ceb4625

---------

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

* improve: avoid re-sorting displayed runs when paging automation history (#207795)

* improve: reduce repeated work when paging automation history

Consume ordered history pages without re-sorting retained runs at every loading and append render. Keep stable ordering for shifted offset boundaries and immediate offline sort changes. Add an opt-in native-page count workload.

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

* improve: avoid re-sorting displayed runs when paging automation history

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e82048d2-da2c-8e54-a164-02a1db9a5532

---------

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

* fix: verify retained child results in the Ultra live check (#208026)

Read the matched child’s retained result after delivery and verify its run ID before checking the handoff token.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: bbaa86d0-6a79-4155-b69e-2701a35c57bd

* fix(ui): open the selected agent’s chat while reconnecting (#202680)

* fix(ui): open the selected agent chat while reconnecting

* fix(ui): open the selected agent’s chat while reconnecting

OpenClaw-Publication: 722da459-2f0c-4a1a-ac47-0e1899d47f20

* fix: give the installed Codex progress-reply test a conversation to reply to (#208063)

Create the isolated session with internal delivery before starting the installed agent. The transient WebChat flags alone do not advertise a message tool.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fdae7386-bdc9-4280-9e3e-a18ba8cea046

* fix: run the live trajectory export check against the built gateway (#208038)

Start a built Gateway for the live trajectory export test so the Codex plugin reads the configuration prepared by the Gateway. The test still requires an exact model reply, one-time export approval, and a bundle containing runtime and transcript events.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 055248a1-a1f2-441c-8237-58ff6cee3893

* fix: stop repair notices when their automation is removed (#208036)

Check the automation's ID and creation time before its repair notice continues. Deleting the automation stops the notice from resending its run history to the model. Ordinary edits let the notice finish.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 5d0644b7-f674-4578-ae3f-16f44b3b0e6d

* fix: restart launcher-managed Gateways after exit 78 (#207972)

## What Problem This Solves

A launcher-managed Gateway that exits 78 outside an update trial leaves the serving release down permanently.

## User Impact

The resident launcher now restarts that child with its existing crash backoff (1, 2, 5, 10, then 30 seconds). Trial configuration refusals still roll back. Direct-Gateway systemd services retain `RestartPreventExitStatus=78`. Launcher format 4, trial v2 and IPC bytes are unchanged. The existing launcher writer refreshes an installed file when its bytes differ, while preserving newer launcher formats.

## Why This Change Was Made

Delete the terminal non-trial exit branch rather than add another restart mechanism. Simplification retained the two-line deletion, one byte comparison in the existing writer, migrated lifecycle/replacement regressions and launcher-managed documentation. Production: -2 lines net; tests: +18 net; docs: +2.

## Evidence

- vitest-source, 600-second bounds: the migrated launcher test failed on unchanged main production code because the launcher exited before the first 1-second restart timer; the other 15 launcher tests passed.
- Immediately after the deletion, launcher and frozen-contract tests passed: 19 tests, including unchanged trial-78 rollback assertions and format-4 ready/stop exchange.
- Fake clock checks no child starts before each 1/2/5-second deadline and another child starts at each deadline.
- Focused Oxlint passed; formatter output matched the test file.
- Installed format-4 stale-content regression failed before the byte comparison: the old content remained. The replacement test also verifies a second identical write does not replace the file and newer launcher formats remain untouched.
- Rendering is deterministic: only static constants, flag arrays and source constants are interpolated; no timestamp, PID or install path enters the rendered bytes.
- Header-reader audit on main and shipped `v2026.12.1-beta.1`: `writeLauncher` previously replaced only older formats; `writeGitReleaseLauncher` preserves all formats >=2. A downgrade to the beta-era writer therefore still preserves an installed format-4 launcher as before. The frozen format-4 peer test remains unchanged.
- Prior-head [CI](https://github.com/openclaw/openclaw/actions/runs/46228136551) and [update-restart-auth package acceptance](https://github.com/openclaw/openclaw/actions/runs/46228140802) passed on `c5ad15b432742fc4b8b5455f7f4a512f2a291953`; byte-refresh repair requires fresh hosted evidence. No full local build was run per task scope.

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

* fix: keep sandbox commands working when workspace scratch is not writable (#208005)

Use the container's private /tmp when the sandbox user cannot write the default workspace scratch directory. Keep explicit temp paths and workspace permissions intact.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 31357588-6850-4ea3-a68d-52e744874a24

* fix(gateway): invalidate session history when a transcript publication rejects (#208051)

## Problem

When a transcript publication rejects, Gateway clients that follow the session get no event. Examples: a synchronous projection read throws `SessionRowFactsPending` (the count-sequence fallback fixed by #208004), the history worker fails with a non-overload error (`readSessionMessageByIdAsync` rethrows it), or event-row preparation fails. The Gateway logs `Transcript update dispatch failed` (`src/gateway/server-runtime-subscriptions.ts`) and publishes nothing: no `session.message`, no `sessions.changed`. The open chat stays stale until something else refetches it.

Log signature, reproduced on main: `Transcript update dispatch failed` with `Session row facts require worker reconciliation` (seen in CI runs of `session-message-events.history-worker.test.ts`; root cause in #208004). Any other rejection in the handler loses events the same way.

## Fix

`createTranscriptUpdateBroadcastHandler` already runs every transcript publication in its per-session queue. When the publication rejects, the queue now emits the existing history invalidation: `sessions.changed` with `phase: "message"` and no `messageId`/`messageSeq`. It goes to the same audience as a normal publication (session-event and message subscribers, `canReceiveSessionEvent` authorization, private scope for retired unqualified owners). Then it rethrows, so the existing warning and the live-source fallback stay.

- No new protocol field, event or schema. The protocol docs (`docs/gateway/protocol/rpc-bootstrap-and-events.md`) already say "Refetch history on that invalidation". Clients refetch on it: Control UI `ui/src/pages/chat/chat-state-events.ts`, Apple `ChatViewModel+TransportEvents.swift`, Android `ChatController.kt`.
- If the invalidation itself throws, the rethrown `AggregateError` carries both errors, so the existing warning logs both.
- Accepted edges:
  - A pending assistant error keeps its existing deferral, so no early error row appears.
  - A legacy marker-only update has no session key and stays log-only.
  - A rejection after a `session.message` was sent causes one extra, harmless refetch.
- Out of scope: lifecycle and background-process row handlers. They publish row snapshots, and their resync would be a row invalidation, which is a different signal.

## Users

| PR | Users | Failure class | Evidence |
|---|---|---|---|
| this | Gateway clients following a session (Control UI, iOS/macOS, Android, SDK) | silent stale chat after a rejected transcript publication | `server-runtime-subscriptions.ts` catch logs only; new tests red on main |

One-shot CLI runs do not use this publisher, so they are not affected.

## Evidence

- `session-message-events.history-worker.test.ts` "invalidates selected-session history when a transcript publication rejects": the history worker read rejects with a generic error. The client receives `sessions.changed` (`phase: "message"`, no `messageSeq`), and `chat.history` returns the committed message. Red on main (120 s timeout, no event), green with the fix.
- `server-session-events.recovery.test.ts` "invalidates history and keeps the rejection when a transcript read fails": the handler still rejects with the original error (the caller's warning path) and broadcasts once. Red on main, green with the fix.
- Production +55/-9 (one shared audience helper replaces the inline loop); tests +64.

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

* fix(workboard): open the board in app from dashboard widgets (#199922)

* fix: keep confirmed sends in the receiving chat's model history (#208049)

Supersedes #207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `2774acd2d7db`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

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

* fix(qa): run the live log tail browser test again (#208020)

Point the live log tail scenario at the consolidated auto-follow browser test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 34b4a470-dfdd-48fb-aaba-59aec526e812

* fix: check managed child delivery in the Codex live suite (#208011)

Check that the parent receives the UUID chosen by its managed child. Let the Docker live suite use the Gateway's delegation defaults.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7f1bb837-8d14-46f3-82e5-8aa559e33b3e

* improve: speed up Doctor database repair tests (#208103)

Build the healthy migrated agent database once for the repair guard table. Give each case an independent file, registry, and maintenance lease so it still exercises the real defect, repair, and clean recheck.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: f5bae5e0-5d87-4d07-9178-2e4ab0ca2637

* fix(gateway): keep count-path session updates through store discovery (#208004)

## Problem

Scheduled CI kept failing `session-message-events.history-worker.test.ts` (count case, "after worker overload"): 5 of 15 scheduled runs, most recently run 46220607204. After #207862 the case waits the full 120 s test limit, so the event was missing, not late.

A traced CI sample (PR CI, Linux x64, Bun) showed the stop: after the transcript update, the count publication never reached `readSessionMessageCountAsync`, and a `chat.metadata.changed` from a session-store topology change arrived in the same window. A local repro then showed the cause:

```
Error: Session row facts require worker reconciliation
    at readSessionRowEntry (src/gateway/session-row-projection-materialize.ts:460)
    ...
    at selectSessionRowEntries (src/gateway/session-row-scope.ts:551)
```

`handleTranscriptUpdateBroadcast` (`src/gateway/server-session-events.ts`) assigns a cursor sequence to updates that arrive without `messageSeq`. To do that it prepared membership with its own loop and then called `projection.selectEntries()` synchronously. When store discovery runs inside that loop, the row's entry is still unread, so selection throws `SessionRowFactsPending`. That error means "re-enter through exact worker preparation". The handler did not handle it, so the publication failed and clients got neither `session.message` nor `sessions.changed`. The update was lost until the next refetch.

## Change

The count fallback reads its row through the session event publication rows (`sessionEventPublicationRows(projection).withReadyRows`, metadata only), the same owner `withPreparedEventRow` uses. It reaches `withPreparedExactRows`, which prepares membership and retries `SessionRowFactsPending`. The hand-written `prepareMembership` loop is removed.

Known edge, left as is: other throws before publication still reject the update. Only worker overload turns into a `sessions.changed` invalidation. That is a wider change and is not part of this fix.

## Who sees it

Gateway clients that follow a session (`sessions.messages.subscribe`, for example the Control UI) and receive transcript updates without `messageSeq` (`server-session-events.ts`, count fallback), while session-store topology changes (a store added, removed or rediscovered). One-shot CLI runs do not follow session events and do not see this.

## Evidence

- New test `delivers a count-path session update when the store topology changes`: emits a store topology change, then a transcript update without `messageSeq`. Red on base (120 s timeout, 3 of 3 runs), green with the fix (3 of 3, no memo).
- The CI shape (overload case plus store topology churn): 10 of 10 red on base, green with the fix.
- Existing history-worker overload cases and the session event consumer suites pass.
- What starts the store topology change during the CI run is inferred, not traced. The CI trace shows the publication stopping before the count read, with a `chat.metadata.changed` in the same window. The local repro with an explicit topology change gives the same signature and the stack above.

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

* fix: keep Telegram login tests independent of startup speed (#208106)

Wait for the Telegram progress note before checking lane ownership. Release both fixture gates on assertion failure so a slow login cannot spill into the next test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 177934d0-1fb5-4a06-beb2-10916a09ee47

* fix(release): identify jobs blocking child evidence sealing

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

* fix(release): clarify pinned FRV recovery eligibility

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

* fix(ci): add tagged reply control to the PR wrapper inventory (#208120)

* fix(android): keep the snooze deadline test independent of runner timing (#208097)

Advance the handset and Gateway clocks together during the post-save refresh. Check the exact deadline sent to the Gateway and the wake time returned to the handset.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6fb940cc-e4ef-4c8f-94a9-060a736f8c11

* test(process): keep cancel parity off execa's force-kill race (#208126)

## Problem

Scheduled CI run 46234040123 (checks-node-compact-large-42, shard core-runtime-infra-process-hosted-2) failed `src/process/spawn-broker/execa.test.ts > broker command transports > matches buffered cancel results and errors`:

```
-   "isForcefullyTerminated": true,      (direct execa, the reference side)
+   "isForcefullyTerminated": false,     (spawn broker)
    "isCanceled": true, "signal": "SIGTERM"   (both sides)
```

Both sides agree that the command was canceled and that the child exited on SIGTERM. Only the reference side, which calls `execa` directly in the test process, said "forcefully terminated".

Cause: execa starts a `forceKillAfterDelay` timer when it sends SIGTERM (`execa/lib/terminate/kill.js` `killOnTimeout`). If the parent event loop stalls longer than the delay before it reaps the exited child, the timer fires first. `kill('SIGKILL')` then succeeds on the unreaped child and sets `isForcefullyTerminated`, even though the child already exited on SIGTERM. The fixture used a 50 ms delay for every case, so a loaded runner can hit this race.

Reproduced with direct execa 10.2.1, outside the broker: cancel a SIGTERM-honoring child with `forceKillAfterDelay: 50`, then block the event loop for 200 ms in a `setImmediate`. Result 3/3: `signal: "SIGTERM"`, `isCanceled: true`, `isForcefullyTerminated: true`. With no stall, `isForcefullyTerminated` is `false`.

## Change

Test-only. Children that honor SIGTERM get a 5 s force-kill delay, so the timer cannot win the race. These children exit at once, so the tests take no longer. The `forced cancel` case ignores SIGTERM and keeps its 50 ms delay, so it still proves forced termination matches across the broker and direct execa.

## Impact

No product change. Process cancellation results stay correct: in the failing run the broker reported a cancel as a cancel (`isCanceled: true`, `failed: true`). The mismatch was the reference side's timer race.

## Evidence

- CI failure: https://github.com/openclaw/openclaw/actions/runs/46234040123/job/141256229744
- No `src/process` change in the window 11df80a4..3b24ff7c.
- Before the change: 5/5 green locally with load average ~39 (the race needs a stall over 50 ms).
- After the change: `execa.test.ts` full file 5/5 green, 27 passed, 3 skipped.

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

* test(state): keep schema modules out of read-only agent database access (#185841)

* fix(state): avoid eager writer imports in agent database reads

* test(state): keep schema modules out of read-only agent database access

* chore(release): close out 2026.11.11 on main (#208114)

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

* fix(outbound): record a plugin action's visible send once (#208130)

Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

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

* fix: let a fallback model finish after Code Mode reads

Allow the configured fallback model to finish after a completed Code Mode cell when every host call has a successful read receipt and qualifies for direct retry. Shell writes, unfinished cells and plugin lookups without an audited replay classification still block fallback.

Closes #207895

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: d49db423-f997-43b6-b23c-4d0be08459c0

* fix: let older automations read their conversation's memory (#208143)

## What Problem This Solves

Automations created before OpenClaw recorded the creating conversation (every job without `sourceConversation`, i.e. created before #179062) name that conversation only by session key. Their scheduled runs get no memory at all: every `knowledge_*` or memory tool call fails with "the host granted this session no memory audience", and the Gateway logs `memory audience unavailable: root session agent:<agent>:cron:<job>:run:<run> has no durable chat type`. The same runs still hold owner-only tools such as `exec`. A production automation that reads and writes the owner's knowledge vault every week hit this on every run.

## User Impact

- A key-only detached automation (`isolated` / `current`) now reads its conversation's current memory, the same way a bound automation does:
  - created in the owner's direct chat: the owner's private memory;
  - created in a group or channel: only that conversation's memory, never owner-private.
- When the job recorded a requester (profile or channel sender), that requester's owner status is checked at each occurrence first; without one, the run's existing owner bit decides, as it already does for the run's tools.
- If the conversation row is gone, archived or cannot be read, the run proceeds exactly as before (no memory, no pause, no failure).
- Board, workspace, sandbox, event target and the run's tools are unchanged. `main` and `session:<key>` targets are unchanged.
- `automations bind` stays available for the exact-incarnation link but is no longer needed for memory. Docs (`cli/cron` "Binding older jobs", `automation/cron-jobs/payloads`) and Doctor's unbound note say so.

Accepted edge case: a key-only run whose agent sandbox mode is `non-main` or `all` now gets owner-private memory it did not have, when the job was created in the owner's direct chat. The owner created these jobs in their own DM, and the run already holds owner authority.

## Why This Change Was Made

`resolveScheduledPrincipal` classifies these jobs as `unbound-parent` and gives them legacy owner authority, but `buildScheduledExecutionContext` pointed their memory at the cron run row, which never has a chat type, so the memory resolver always denied. The fix stays in the existing owner:

- `admitScheduledOccurrence` (`src/cron/execution-context-admission.ts`): for an `unbound-parent` principal on a detached run, read the key-linked conversation row once. A failed read becomes "no row". No generation lease, workspace binding, sandbox or pause change. A recorded requester is admitted per occurrence through the existing `admitScheduledRequesterGrant`.
- `buildScheduledExecutionContext` (`src/cron/execution-context.ts`): with a live row, memory becomes `{ source: "parent", parent: <current sessionKey/sessionId/lifecycleRevision>, owner }`. Everything else for `unbound-parent` is unchanged.
- The memory resolver (`src/plugins/memory-audience.ts`) does not change: it already maps a direct root + owner to owner-private and direct/group/channel to that conversation's partition, for both the embedded and the CLI runtime.
- `scheduledParentKeyOf` now derives the key from `resolveScheduledPrincipal` itself, so Doctor's access review and the development replay read the same row the runtime does; the replay vector (`execution-context-projection.ts`) already labels the memory gain as intended, so it needed no edit.

Not changed: Doctor auto-bind or any stored-row write, jobs with no parent key, bound jobs with no recorded requester. On current `main`, bound jobs keep following their conversation after a reset (#205887), so no reset-degraded path exists to special-case.

## Evidence

Real-admission tests (red on the merge base `65d94342e813`, green on this head; 6 tests failed on base, all pass on head):

- `execution-context-memory-audience.test.ts` (real admission → registry → embedded and CLI resolvers): key-only owner-DM job → owner-private; key-only group job → that group's conversation only; key-only job with a revoked recorded requester → conversation only; key-only job whose conversation is gone → no audience, run admitted.
- `execution-context.test.ts`: key-only detached job gets parent memory and nothing else (board/workspace/sandbox stay the run's); archived, removed and in-session (`session:<key>`) cases keep run-session memory.
- `execution-context-admission.test.ts`: key-only read takes no generation lease; a failed read still admits the run with its own memory.
- `isolated-agent/run.bind-parent.test.ts` (real cron service + timer): the unbound job now reaches its conversation's memory, without a run-row receipt.

Local runs: the 27 test files that import the changed sources passed (`ocx test`, 6 shards). `pnpm check:changed`: typecheck, lint, guards all ok; the dead-export scan fails only on files this PR does not touch (`src/agents/command/types.ts`, `src/plugins/native-module-require.ts`, `ui/src/...`, `src/gateway/server-methods/update.test-harness.ts`), same as `main`.

End to end, scratch Gateway from source, `plugins.slots.memory: "knowledge"`, real model (`openai/gpt-5.5`). An owner Control UI direct chat was created by one real `chat.send` (row `chatType: "direct"`). A key-only isolated `agentTurn` job (owner key = that chat, no `sourceConversation`, no recorded requester, no tool policy, `toolsAllow` incl. `knowledge_remember`, `knowledge_grep`, `exec`) fired from its own `at` schedule about two minutes ahead (no forced run).

Base (`65d94342e813`):

```
[agent/embedded] memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```
```
knowledge_remember: "Knowledge access unavailable: the host granted this session no memory audience. The Gateway log entry "memory_audience_denied" for this session names the reason and its repair."
kn…
github-actions Bot added a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
…mn (openclaw#207380)

* feat(ui): offer Add to Home agent when Home sidebar is open (#207773)

* fix(ui): remove Open PR from the session menu (#207808)

* fix(ui): remove Open PR from the session menu

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

* fix(ui): remove Open PR from the session menu

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 19ab49eb-2fdb-4e2a-ba0e-3fcf8de38db9

* fix(ui): preserve shared session menu copy

---------

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

* fix(workboard): let users delete an empty default board (#207909)

* test(gateway): isolate publication recovery memory pressure (#207993)

* fix: remove dismissed chat suggestions without waiting (#207792)

* fix: remove dismissed chat suggestions without waiting

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

* fix: remove dismissed chat suggestions without waiting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a7065126-58f4-41f4-ab35-887c77e05eac

* refactor: keep suggestion dismissal focus with the pane keyboard helpers

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

* fix: remove dismissed chat suggestions without waiting

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 362ae3c3-16c8-4016-8f59-dc477414e07a

---------

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

* fix(ui): show a subtle placeholder while a new chat gets its title (#207809)

* fix(ui): show a subtle placeholder while a new chat gets its title

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

* fix(ui): show a subtle placeholder while a new chat gets its title

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 5a8d6d8e-7c91-4b07-9467-ff499cf2786a

---------

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

* fix: keep skill highlights in sent chat messages (#207828)

* fix: keep skill highlights in sent chat messages

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

* fix: keep skill highlights in sent chat messages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 303c108c-485c-4ee9-bcdc-b6845d507543

---------

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

* improve: keep Workboard editing and Save within reach on phones (#207839)

* improve: keep Workboard editing and Save within reach on phones

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

* improve: keep Workboard editing and Save within reach on phones

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 41fdebe7-35c4-435a-8128-eb9f12e2fabf

---------

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

* fix(ui): highlight skills and mentions in queued messages (#207829)

* fix(ui): highlight skills and mentions in queued messages

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

* fix(ui): highlight skills and mentions in queued messages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d26fee27-de6c-4b5f-8264-da07de4df6f9

---------

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

* fix: center a single tool row on the agent avatar in chat replies (#207748)

* fix(ui): even the gap below a lone tool row in chat

* fix(ui): center a lone tool row on the agent avatar

* improve(ui): show the project beside Cmd+K session settings (#203754)

Move project selection and its New worktree switch into the visible project field. Keep agent selection and Remember settings in their original menu.

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

* fix: stop warning about unsaved drafts when opening a chat (#203741)

* fix: stop warning about unsaved drafts when opening a chat

Keep failed background recovery reads distinct from failed edits in the composer and Side chat. Keep one access notice when browser storage is unavailable without consuming the warning for a later failed save.

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

* fix: stop warning about unsaved drafts when opening a chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 227e24ff-2a24-4a82-a325-e7787c443eed

---------

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

* fix(logbook): clear obsolete errors when retrying actions (#199461)

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

* fix(ui): keep the sidebar session list collapsed (#207832)

* fix(ui): keep the flat session list collapsed

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

* fix(ui): keep the sidebar session list collapsed

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d5d9e6c3-ba53-4dec-9efe-a5a9c5c29445

* fix(ui): page the sidebar only when it scrolls to the end

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

---------

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

* fix: stop treating limited access as an Inbox alert (#207737)

* fix: stop treating limited access as an inbox alert

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

* fix: stop treating limited access as an Inbox alert

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a014cab4-b01d-458b-aa67-ec83ad3a2a99

---------

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

* fix: child session activity ring freezes during startup (#188147)

* fix: child session activity ring freezes during startup

Project accepted preparation as running without starting the execution clock. Reserve queued presentation for actual mailbox/global-lane waits and preserve recorded capacity waits.

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

* fix: child session activity ring freezes during startup

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 2bf26c5b-2410-44b2-9915-d2289a90f388

* fix: align Gateway consumers with active session startup

Expect active accepted chat preparation, record a real lane wait in metrics, and distinguish preparation from actual queued input in describe/list coverage.

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

* Publish openclaw/plaid-crayfish

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 29690b6c-a214-45c1-9591-fd19b1d51336

* test(gateway): cover child startup in the current session checks

---------

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

* fix: remove hover tooltips from Workboard cards (#207928)

* improve: tighten Sessions board card typography (#207931)

* fix: keep Sessions board card hover neutral instead of column color (#207932)

* fix: keep wrapped Settings help links visibly focused on phones (#203819)

* fix(ui): keep wrapped device help links visibly focused

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

* fix: show the full focus outline on wrapped device help links

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 7b5d66ad-f165-8076-9dcf-5dd7cd64f0d9

* fix(ui): show wrapped settings help focus at the phone gutter

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

---------

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

* fix: keep the selected Review file compact when the tree is open (#203825)

* fix: show the full filename in Review diff headings

Allow the heading to wrap the whole filename instead of reserving the line for its extension. Keep the compact file tree presentation unchanged.

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

* fix: show the full filename in Review diff headings

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ba141dca-cfb0-85b2-a5bb-102d1536c092

* fix: identify the selected file in a narrow Review panel

Keep the destination filename visible above the diff and reserve room for its stem in the changed-files tree.

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

* fix: keep identifying filenames and diff actions on one row

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

* fix: keep short file extensions intact in Review headings

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

* test: verify renamed and short files in the compact Review tree

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

---------

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

* fix: hide desktop Details when there is nothing to show (#205093)

* fix: hide desktop Details when there is nothing to show

* fix(ui): discover session details before mounting the panel

* fix: keep tagged silent replies out of chat (#207738)

* fix(subagents): warn when cancel cannot confirm the worker stopped (#208041)

* fix: align Control UI tooling and docs with task card removal (#207747)

* improve: give assistant chat bubbles a calmer neutral background (#203729)

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

* fix: show empty chat search results while a collaborator types (#208010)

Use the filtered transcript to show when a chat search has no matches and to restore the reader’s place. Keep the collaborator’s typing preview visible.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fb4672e-d1b4-419c-8551-3ab267f39de3

* test(openai): expect progress instructions in the GPT-Live handshake (#208006)

Expect the direct GPT-Live session.update frame to include the operator's instructions followed by the progress-claims instruction. Keep the full-frame equality check.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 0e4639f8-64cf-4b54-8c52-6d1dd823278c

* fix: keep project picker errors readable (#203763)

* fix(ui): keep project picker errors and retry inside the menu

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

* fix: keep project picker errors readable

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e5cd3cf3-150f-4766-bab3-ca89f29252d1

* test: keep the project picker regression mergeable

---------

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

* fix: keep long answer summaries readable in chat (#203779)

* fix: keep long answer summaries readable in chat

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

* fix: keep long answer summaries readable in chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 40161eb2-ab93-4ac4-810c-656cc6a8d664

---------

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

* fix: check the refusal reason for revoked queued followups (#208025)

The Gateway intentionally reports a withheld failure for invalidated sign-in. Keep the model, executed-run, and queue assertions and distinguish this refusal from an unrelated error.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fd6e1bc9-ac1b-4a0b-86c8-4d15ea9d65ac

* fix(qa): replay Claude compaction completion in the Telegram live lane (#208001)

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: edeb5fcc-cfe8-4ad3-9b38-37bdb3073cd8

* refactor(ui): remove unused English catalog entries (#201419)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>

* refactor(ui): remove dead Settings text (Labs, Updates, forms, devices, memory) (#201421)

* refactor(ui): remove unused Labs parallel-task copy

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

* refactor(ui): remove Labs parallel-task text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3b47ea07-0bd0-8cab-9425-6c67975a8f24

* refactor(ui): remove unused Updates copy

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

* refactor(ui): remove unused settings form and appearance copy

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

* refactor(ui): remove unused device, desktop and systems copy

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

* refactor(ui): remove unused dream diary copy

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

* Publish openclaw/quick-lobster-5

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3512bcc3-a350-8bc4-8c43-92639564075b

---------

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

* refactor(ui): remove dead New session, Sessions, Agents, Templates and OpenClaw ID text (#201422)

* refactor(ui): remove unused New session copy

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

* refactor(ui): remove New session text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 609418e2-3a64-8b1d-a39e-9376e4b8949f

* refactor(ui): remove unused Sessions copy

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

* refactor(ui): remove unused Templates copy

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

* refactor(ui): remove unused agent identity and file copy

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

* refactor(ui): remove unused OpenClaw ID copy

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

* Publish openclaw/oceanic-claw-2

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: dcc9dcf1-1890-866a-b5d9-3dff693a5d98

---------

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

* refactor(ui): remove dead model setup, Models and model picker text (#201424)

* refactor(ui): remove unused model setup copy

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

* refactor(ui): remove model setup text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 18ddea1b-160c-8672-a918-2a952c072c15

* refactor(ui): remove unused model provider list copy

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

* refactor(ui): remove unused add-provider and default model copy

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

* refactor(ui): remove unused model picker labels

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

* refactor(ui): remove unused model picker loading copy

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

* refactor(ui): remove dead model setup, Models and model picker text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 6fac1775-a172-8071-8591-9561a51d33c3

---------

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

* refactor(ui): remove dead agent tools, Skills and Usage text (#201429)

* refactor(ui): remove unused agent tool access copy

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

* refactor(ui): remove agent tool access text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4211d89a-e4f4-80e4-9be2-de8848a06a63

* refactor(ui): remove unused Skills copy

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

* refactor(ui): remove unused Usage copy

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

* refactor(ui): remove dead agent tools, Skills and Usage text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 33be6fec-530e-814d-9867-ce808e91d99e

---------

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

* refactor(ui): remove unused English text from chat side panels (#201452)

* refactor(ui): remove unused side chat copy

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

* refactor(ui): remove unused subagent and process panel copy

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

* refactor(ui): remove unused session files and changes copy

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

* refactor(ui): remove unused English text from chat side panels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 32359a08-da6f-86b4-81de-e0c5dbb4226b

---------

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

* refactor(ui): remove unused English text from chat and pull request cards (#201454)

* refactor(ui): remove unused composer and message copy

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

* refactor(ui): remove unused chat status copy

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

* refactor(ui): remove unused pull request copy

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

* refactor(ui): remove unused English text from chat and pull request cards

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: cdb7136a-c0bc-888a-829e-af2403beb226

* test(ui): verify composer translations with a live menu label

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

---------

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

* refactor(ui): remove unused English text from plugin settings and catalog pages (#201455)

* refactor(ui): remove unused plugin settings and access copy

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

* refactor(ui): remove unused plugin lifecycle and catalog search copy

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

* refactor(ui): remove unused plugin catalog filter and paging copy

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

* refactor(ui): remove unused plugin detail fact copy

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

* refactor(ui): remove unused English text from plugin settings and catalog pages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f24e2625-05eb-8d99-8e8a-e31549355657

---------

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels (#201456)

* refactor(ui): remove unused plugin detail tab and install count copy

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

* refactor(ui): remove unused installed plugin list and category copy

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

* refactor(ui): remove unused plugin status and source copy

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 57d467b8-c62d-825a-a303-31d561f0d69c

---------

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

* test(live): reject failed Moonshot completions (#207728)

* test(live): reject failed Moonshot completions

* test(live): use the current Moonshot model and thinking policy

* test(live): exercise the Moonshot provider thinking policy

* test(live): run the registered Moonshot stream hook

* test(live): load the Moonshot catalog through its public facade

* test(live): type the Moonshot catalog builder as a function

* test(gateway): isolate publication notice memory pressure (#207995)

* fix: test provider review continuations after device removal (#208022)

Check that the removed device disconnects while the already-admitted continuation sends only its acknowledged steer and clears the accepted review. Keep the viewer rejection at admission.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7ff67804-adab-4c48-b5d8-f0b4334dff46

* improve: reduce memory used by concurrent agent runs (#208033)

* perf(agents): reduce heap held by concurrent runs

Reuse MCP input schema publications and Code Mode declarations through their bounded catalog owners. Resolve embedded runs with the selected-model registry view and hydrate sibling records on demand.

* fix(agents): preserve MCP refresh for deeply nested schemas

If the reuse comparison cannot serialize a changed wire schema, defer to the existing publisher and its depth handling.

* test(agents): update MCP recovery snapshot assertion

* fix: isolate the hook token reload check from plugin startup (#208040)

Keep the real Gateway, config reload, approval and child process. The token probe does not need plugins, whose startup can outlast its five-second child deadline.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b6aeceb4-1e62-4a21-af66-41b77081ed09

* chore: unblock core lint by fixing oxlint errors in Workboard e2e tests (#208075)

Origin: #207839

## What Problem This Solves

`main` fails `check-lint-core-5`, so every open PR shows that lint shard red. #207839 added three oxlint errors in two Control UI e2e tests:

- `ui/src/e2e/workboard-locale.e2e.test.ts:93`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:154`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:178`: `unicorn/prefer-dom-node-text-content`

## User Impact

No product change. This is test-only. Contributors get a green core lint shard again.

## Why This Change Was Made

- Two single-line `if` statements now have braces.
- The mobile editor test reads the column row with Playwright `textContent()` instead of `innerText()`. The assertion keeps its meaning: it checks that the renamed column label "Finished" shows in the row. The label is in the always-rendered `.settings-row__title` span. `textContent` also includes the row's description, and the test does not change it. The new label can only be found if the rename worked.
- Lint rules and other files are not changed.

## Evidence

- On `main` (0cf154ca1137), `node scripts/run-oxlint.mjs` on the 2 files: 3 errors (the ones shown above). With this change: `Found 0 warnings and 0 errors`. `oxfmt --check`: clean.
- `vitest --config test/vitest/vitest.ui-e2e.config.ts` on both files, run 2 times: `Test Files 2 passed (2)`, `Tests 4 passed (4)` each time.

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

* perf(gateway): skip display preparation during history sharing checks (#208062)

* chore: simplify Workboard session filter tests (#207853)

* chore: simplify Workboard session filter tests

* test: retain session visibility and reference reset checks

* test: check revoked board references on a cached read

* test: fix prompt-cache journey tool and scope expectations (#208055)

Check web_fetch membership in the latest deferred-tool list. Send chat with
writer scope in Tool Search opt-out journeys so direct and internal turns
can compare the full automations schema.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 62582bff-c96b-4a17-9051-3daa5fa19044

* fix: make the chat sidebar swipe reachable on Android (#208037)

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6251590e-fd83-4a72-bf88-6000e34d9e6d

* improve(ios): avoid repeated Keychain reads when opening chat (#207667)

* perf(ios): keep Keychain reads out of chat identity

* improve(ios): avoid repeated Keychain reads when opening chat

OpenClaw-Publication: 4ebe6ce8-9b61-8209-be76-df43a417621d

* improve(ios): skip Talk PCM player setup until audio plays (#207668)

* perf(ios): defer PCM player initialization until playback

* improve(ios): skip Talk PCM player setup until audio plays

OpenClaw-Publication: 0fd39061-45a1-8858-970d-0b837bb5dac5

* fix: keep session writes working after a gateway restart (#208031)

Give a newly admitted schema its own validity cell when its markers change. Retain the existing cell when the markers match so unchanged borrowers stay valid.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 3c81c608-4a5c-4c8c-85b1-c3e5b827cd03

* fix: stop the live Tool Search probe from reporting false connection failures (#208034)

Scope the live probe’s session catalog to its fixture tools and discovery controls. Return service availability from the status tool and preserve the wire assertion if the runner throws.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4b9ea82e-e287-494d-a59e-9523243f60ee

* improve: reduce sidebar work when other chats update (#207791)

* improve: reduce sidebar work when other chats update

Reuse the already reconciled primary result for an identical retained window with the same agent and archive filter. Keep independent windows on their existing reconciliation path.

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

* improve: reduce sidebar work when other chats update

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f22b2da2-4071-8303-9ece-93ab4f3aacdf

---------

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

* improve: avoid rebuilding provider choices while typing a model API key (#207786)

* improve: avoid rebuilding provider choices while typing a model API key

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

* improve: avoid rebuilding provider choices while typing a model API key

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f5e75abf-1583-83f1-a72a-a8023ceb4625

---------

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

* improve: avoid re-sorting displayed runs when paging automation history (#207795)

* improve: reduce repeated work when paging automation history

Consume ordered history pages without re-sorting retained runs at every loading and append render. Keep stable ordering for shifted offset boundaries and immediate offline sort changes. Add an opt-in native-page count workload.

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

* improve: avoid re-sorting displayed runs when paging automation history

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e82048d2-da2c-8e54-a164-02a1db9a5532

---------

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

* fix: verify retained child results in the Ultra live check (#208026)

Read the matched child’s retained result after delivery and verify its run ID before checking the handoff token.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: bbaa86d0-6a79-4155-b69e-2701a35c57bd

* fix(ui): open the selected agent’s chat while reconnecting (#202680)

* fix(ui): open the selected agent chat while reconnecting

* fix(ui): open the selected agent’s chat while reconnecting

OpenClaw-Publication: 722da459-2f0c-4a1a-ac47-0e1899d47f20

* fix: give the installed Codex progress-reply test a conversation to reply to (#208063)

Create the isolated session with internal delivery before starting the installed agent. The transient WebChat flags alone do not advertise a message tool.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fdae7386-bdc9-4280-9e3e-a18ba8cea046

* fix: run the live trajectory export check against the built gateway (#208038)

Start a built Gateway for the live trajectory export test so the Codex plugin reads the configuration prepared by the Gateway. The test still requires an exact model reply, one-time export approval, and a bundle containing runtime and transcript events.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 055248a1-a1f2-441c-8237-58ff6cee3893

* fix: stop repair notices when their automation is removed (#208036)

Check the automation's ID and creation time before its repair notice continues. Deleting the automation stops the notice from resending its run history to the model. Ordinary edits let the notice finish.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 5d0644b7-f674-4578-ae3f-16f44b3b0e6d

* fix: restart launcher-managed Gateways after exit 78 (#207972)

## What Problem This Solves

A launcher-managed Gateway that exits 78 outside an update trial leaves the serving release down permanently.

## User Impact

The resident launcher now restarts that child with its existing crash backoff (1, 2, 5, 10, then 30 seconds). Trial configuration refusals still roll back. Direct-Gateway systemd services retain `RestartPreventExitStatus=78`. Launcher format 4, trial v2 and IPC bytes are unchanged. The existing launcher writer refreshes an installed file when its bytes differ, while preserving newer launcher formats.

## Why This Change Was Made

Delete the terminal non-trial exit branch rather than add another restart mechanism. Simplification retained the two-line deletion, one byte comparison in the existing writer, migrated lifecycle/replacement regressions and launcher-managed documentation. Production: -2 lines net; tests: +18 net; docs: +2.

## Evidence

- vitest-source, 600-second bounds: the migrated launcher test failed on unchanged main production code because the launcher exited before the first 1-second restart timer; the other 15 launcher tests passed.
- Immediately after the deletion, launcher and frozen-contract tests passed: 19 tests, including unchanged trial-78 rollback assertions and format-4 ready/stop exchange.
- Fake clock checks no child starts before each 1/2/5-second deadline and another child starts at each deadline.
- Focused Oxlint passed; formatter output matched the test file.
- Installed format-4 stale-content regression failed before the byte comparison: the old content remained. The replacement test also verifies a second identical write does not replace the file and newer launcher formats remain untouched.
- Rendering is deterministic: only static constants, flag arrays and source constants are interpolated; no timestamp, PID or install path enters the rendered bytes.
- Header-reader audit on main and shipped `v2026.12.1-beta.1`: `writeLauncher` previously replaced only older formats; `writeGitReleaseLauncher` preserves all formats >=2. A downgrade to the beta-era writer therefore still preserves an installed format-4 launcher as before. The frozen format-4 peer test remains unchanged.
- Prior-head [CI](https://github.com/openclaw/openclaw/actions/runs/46228136551) and [update-restart-auth package acceptance](https://github.com/openclaw/openclaw/actions/runs/46228140802) passed on `c5ad15b432742fc4b8b5455f7f4a512f2a291953`; byte-refresh repair requires fresh hosted evidence. No full local build was run per task scope.

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

* fix: keep sandbox commands working when workspace scratch is not writable (#208005)

Use the container's private /tmp when the sandbox user cannot write the default workspace scratch directory. Keep explicit temp paths and workspace permissions intact.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 31357588-6850-4ea3-a68d-52e744874a24

* fix(gateway): invalidate session history when a transcript publication rejects (#208051)

## Problem

When a transcript publication rejects, Gateway clients that follow the session get no event. Examples: a synchronous projection read throws `SessionRowFactsPending` (the count-sequence fallback fixed by #208004), the history worker fails with a non-overload error (`readSessionMessageByIdAsync` rethrows it), or event-row preparation fails. The Gateway logs `Transcript update dispatch failed` (`src/gateway/server-runtime-subscriptions.ts`) and publishes nothing: no `session.message`, no `sessions.changed`. The open chat stays stale until something else refetches it.

Log signature, reproduced on main: `Transcript update dispatch failed` with `Session row facts require worker reconciliation` (seen in CI runs of `session-message-events.history-worker.test.ts`; root cause in #208004). Any other rejection in the handler loses events the same way.

## Fix

`createTranscriptUpdateBroadcastHandler` already runs every transcript publication in its per-session queue. When the publication rejects, the queue now emits the existing history invalidation: `sessions.changed` with `phase: "message"` and no `messageId`/`messageSeq`. It goes to the same audience as a normal publication (session-event and message subscribers, `canReceiveSessionEvent` authorization, private scope for retired unqualified owners). Then it rethrows, so the existing warning and the live-source fallback stay.

- No new protocol field, event or schema. The protocol docs (`docs/gateway/protocol/rpc-bootstrap-and-events.md`) already say "Refetch history on that invalidation". Clients refetch on it: Control UI `ui/src/pages/chat/chat-state-events.ts`, Apple `ChatViewModel+TransportEvents.swift`, Android `ChatController.kt`.
- If the invalidation itself throws, the rethrown `AggregateError` carries both errors, so the existing warning logs both.
- Accepted edges:
  - A pending assistant error keeps its existing deferral, so no early error row appears.
  - A legacy marker-only update has no session key and stays log-only.
  - A rejection after a `session.message` was sent causes one extra, harmless refetch.
- Out of scope: lifecycle and background-process row handlers. They publish row snapshots, and their resync would be a row invalidation, which is a different signal.

## Users

| PR | Users | Failure class | Evidence |
|---|---|---|---|
| this | Gateway clients following a session (Control UI, iOS/macOS, Android, SDK) | silent stale chat after a rejected transcript publication | `server-runtime-subscriptions.ts` catch logs only; new tests red on main |

One-shot CLI runs do not use this publisher, so they are not affected.

## Evidence

- `session-message-events.history-worker.test.ts` "invalidates selected-session history when a transcript publication rejects": the history worker read rejects with a generic error. The client receives `sessions.changed` (`phase: "message"`, no `messageSeq`), and `chat.history` returns the committed message. Red on main (120 s timeout, no event), green with the fix.
- `server-session-events.recovery.test.ts` "invalidates history and keeps the rejection when a transcript read fails": the handler still rejects with the original error (the caller's warning path) and broadcasts once. Red on main, green with the fix.
- Production +55/-9 (one shared audience helper replaces the inline loop); tests +64.

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

* fix(workboard): open the board in app from dashboard widgets (#199922)

* fix: keep confirmed sends in the receiving chat's model history (#208049)

Supersedes #207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `2774acd2d7db`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

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

* fix(qa): run the live log tail browser test again (#208020)

Point the live log tail scenario at the consolidated auto-follow browser test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 34b4a470-dfdd-48fb-aaba-59aec526e812

* fix: check managed child delivery in the Codex live suite (#208011)

Check that the parent receives the UUID chosen by its managed child. Let the Docker live suite use the Gateway's delegation defaults.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7f1bb837-8d14-46f3-82e5-8aa559e33b3e

* improve: speed up Doctor database repair tests (#208103)

Build the healthy migrated agent database once for the repair guard table. Give each case an independent file, registry, and maintenance lease so it still exercises the real defect, repair, and clean recheck.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: f5bae5e0-5d87-4d07-9178-2e4ab0ca2637

* fix(gateway): keep count-path session updates through store discovery (#208004)

## Problem

Scheduled CI kept failing `session-message-events.history-worker.test.ts` (count case, "after worker overload"): 5 of 15 scheduled runs, most recently run 46220607204. After #207862 the case waits the full 120 s test limit, so the event was missing, not late.

A traced CI sample (PR CI, Linux x64, Bun) showed the stop: after the transcript update, the count publication never reached `readSessionMessageCountAsync`, and a `chat.metadata.changed` from a session-store topology change arrived in the same window. A local repro then showed the cause:

```
Error: Session row facts require worker reconciliation
    at readSessionRowEntry (src/gateway/session-row-projection-materialize.ts:460)
    ...
    at selectSessionRowEntries (src/gateway/session-row-scope.ts:551)
```

`handleTranscriptUpdateBroadcast` (`src/gateway/server-session-events.ts`) assigns a cursor sequence to updates that arrive without `messageSeq`. To do that it prepared membership with its own loop and then called `projection.selectEntries()` synchronously. When store discovery runs inside that loop, the row's entry is still unread, so selection throws `SessionRowFactsPending`. That error means "re-enter through exact worker preparation". The handler did not handle it, so the publication failed and clients got neither `session.message` nor `sessions.changed`. The update was lost until the next refetch.

## Change

The count fallback reads its row through the session event publication rows (`sessionEventPublicationRows(projection).withReadyRows`, metadata only), the same owner `withPreparedEventRow` uses. It reaches `withPreparedExactRows`, which prepares membership and retries `SessionRowFactsPending`. The hand-written `prepareMembership` loop is removed.

Known edge, left as is: other throws before publication still reject the update. Only worker overload turns into a `sessions.changed` invalidation. That is a wider change and is not part of this fix.

## Who sees it

Gateway clients that follow a session (`sessions.messages.subscribe`, for example the Control UI) and receive transcript updates without `messageSeq` (`server-session-events.ts`, count fallback), while session-store topology changes (a store added, removed or rediscovered). One-shot CLI runs do not follow session events and do not see this.

## Evidence

- New test `delivers a count-path session update when the store topology changes`: emits a store topology change, then a transcript update without `messageSeq`. Red on base (120 s timeout, 3 of 3 runs), green with the fix (3 of 3, no memo).
- The CI shape (overload case plus store topology churn): 10 of 10 red on base, green with the fix.
- Existing history-worker overload cases and the session event consumer suites pass.
- What starts the store topology change during the CI run is inferred, not traced. The CI trace shows the publication stopping before the count read, with a `chat.metadata.changed` in the same window. The local repro with an explicit topology change gives the same signature and the stack above.

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

* fix: keep Telegram login tests independent of startup speed (#208106)

Wait for the Telegram progress note before checking lane ownership. Release both fixture gates on assertion failure so a slow login cannot spill into the next test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 177934d0-1fb5-4a06-beb2-10916a09ee47

* fix(release): identify jobs blocking child evidence sealing

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

* fix(release): clarify pinned FRV recovery eligibility

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

* fix(ci): add tagged reply control to the PR wrapper inventory (#208120)

* fix(android): keep the snooze deadline test independent of runner timing (#208097)

Advance the handset and Gateway clocks together during the post-save refresh. Check the exact deadline sent to the Gateway and the wake time returned to the handset.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6fb940cc-e4ef-4c8f-94a9-060a736f8c11

* test(process): keep cancel parity off execa's force-kill race (#208126)

## Problem

Scheduled CI run 46234040123 (checks-node-compact-large-42, shard core-runtime-infra-process-hosted-2) failed `src/process/spawn-broker/execa.test.ts > broker command transports > matches buffered cancel results and errors`:

```
-   "isForcefullyTerminated": true,      (direct execa, the reference side)
+   "isForcefullyTerminated": false,     (spawn broker)
    "isCanceled": true, "signal": "SIGTERM"   (both sides)
```

Both sides agree that the command was canceled and that the child exited on SIGTERM. Only the reference side, which calls `execa` directly in the test process, said "forcefully terminated".

Cause: execa starts a `forceKillAfterDelay` timer when it sends SIGTERM (`execa/lib/terminate/kill.js` `killOnTimeout`). If the parent event loop stalls longer than the delay before it reaps the exited child, the timer fires first. `kill('SIGKILL')` then succeeds on the unreaped child and sets `isForcefullyTerminated`, even though the child already exited on SIGTERM. The fixture used a 50 ms delay for every case, so a loaded runner can hit this race.

Reproduced with direct execa 10.2.1, outside the broker: cancel a SIGTERM-honoring child with `forceKillAfterDelay: 50`, then block the event loop for 200 ms in a `setImmediate`. Result 3/3: `signal: "SIGTERM"`, `isCanceled: true`, `isForcefullyTerminated: true`. With no stall, `isForcefullyTerminated` is `false`.

## Change

Test-only. Children that honor SIGTERM get a 5 s force-kill delay, so the timer cannot win the race. These children exit at once, so the tests take no longer. The `forced cancel` case ignores SIGTERM and keeps its 50 ms delay, so it still proves forced termination matches across the broker and direct execa.

## Impact

No product change. Process cancellation results stay correct: in the failing run the broker reported a cancel as a cancel (`isCanceled: true`, `failed: true`). The mismatch was the reference side's timer race.

## Evidence

- CI failure: https://github.com/openclaw/openclaw/actions/runs/46234040123/job/141256229744
- No `src/process` change in the window 11df80a4..3b24ff7c.
- Before the change: 5/5 green locally with load average ~39 (the race needs a stall over 50 ms).
- After the change: `execa.test.ts` full file 5/5 green, 27 passed, 3 skipped.

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

* test(state): keep schema modules out of read-only agent database access (#185841)

* fix(state): avoid eager writer imports in agent database reads

* test(state): keep schema modules out of read-only agent database access

* chore(release): close out 2026.11.11 on main (#208114)

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

* fix(outbound): record a plugin action's visible send once (#208130)

Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

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

* fix: let a fallback model finish after Code Mode reads

Allow the configured fallback model to finish after a completed Code Mode cell when every host call has a successful read receipt and qualifies for direct retry. Shell writes, unfinished cells and plugin lookups without an audited replay classification still block fallback.

Closes #207895

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: d49db423-f997-43b6-b23c-4d0be08459c0

* fix: let older automations read their conversation's memory (#208143)

## What Problem This Solves

Automations created before OpenClaw recorded the creating conversation (every job without `sourceConversation`, i.e. created before #179062) name that conversation only by session key. Their scheduled runs get no memory at all: every `knowledge_*` or memory tool call fails with "the host granted this session no memory audience", and the Gateway logs `memory audience unavailable: root session agent:<agent>:cron:<job>:run:<run> has no durable chat type`. The same runs still hold owner-only tools such as `exec`. A production automation that reads and writes the owner's knowledge vault every week hit this on every run.

## User Impact

- A key-only detached automation (`isolated` / `current`) now reads its conversation's current memory, the same way a bound automation does:
  - created in the owner's direct chat: the owner's private memory;
  - created in a group or channel: only that conversation's memory, never owner-private.
- When the job recorded a requester (profile or channel sender), that requester's owner status is checked at each occurrence first; without one, the run's existing owner bit decides, as it already does for the run's tools.
- If the conversation row is gone, archived or cannot be read, the run proceeds exactly as before (no memory, no pause, no failure).
- Board, workspace, sandbox, event target and the run's tools are unchanged. `main` and `session:<key>` targets are unchanged.
- `automations bind` stays available for the exact-incarnation link but is no longer needed for memory. Docs (`cli/cron` "Binding older jobs", `automation/cron-jobs/payloads`) and Doctor's unbound note say so.

Accepted edge case: a key-only run whose agent sandbox mode is `non-main` or `all` now gets owner-private memory it did not have, when the job was created in the owner's direct chat. The owner created these jobs in their own DM, and the run already holds owner authority.

## Why This Change Was Made

`resolveScheduledPrincipal` classifies these jobs as `unbound-parent` and gives them legacy owner authority, but `buildScheduledExecutionContext` pointed their memory at the cron run row, which never has a chat type, so the memory resolver always denied. The fix stays in the existing owner:

- `admitScheduledOccurrence` (`src/cron/execution-context-admission.ts`): for an `unbound-parent` principal on a detached run, read the key-linked conversation row once. A failed read becomes "no row". No generation lease, workspace binding, sandbox or pause change. A recorded requester is admitted per occurrence through the existing `admitScheduledRequesterGrant`.
- `buildScheduledExecutionContext` (`src/cron/execution-context.ts`): with a live row, memory becomes `{ source: "parent", parent: <current sessionKey/sessionId/lifecycleRevision>, owner }`. Everything else for `unbound-parent` is unchanged.
- The memory resolver (`src/plugins/memory-audience.ts`) does not change: it already maps a direct root + owner to owner-private and direct/group/channel to that conversation's partition, for both the embedded and the CLI runtime.
- `scheduledParentKeyOf` now derives the key from `resolveScheduledPrincipal` itself, so Doctor's access review and the development replay read the same row the runtime does; the replay vector (`execution-context-projection.ts`) already labels the memory gain as intended, so it needed no edit.

Not changed: Doctor auto-bind or any stored-row write, jobs with no parent key, bound jobs with no recorded requester. On current `main`, bound jobs keep following their conversation after a reset (#205887), so no reset-degraded path exists to special-case.

## Evidence

Real-admission tests (red on the merge base `65d94342e813`, green on this head; 6 tests failed on base, all pass on head):

- `execution-context-memory-audience.test.ts` (real admission → registry → embedded and CLI resolvers): key-only owner-DM job → owner-private; key-only group job → that group's conversation only; key-only job with a revoked recorded requester → conversation only; key-only job whose conversation is gone → no audience, run admitted.
- `execution-context.test.ts`: key-only detached job gets parent memory and nothing else (board/workspace/sandbox stay the run's); archived, removed and in-session (`session:<key>`) cases keep run-session memory.
- `execution-context-admission.test.ts`: key-only read takes no generation lease; a failed read still admits the run with its own memory.
- `isolated-agent/run.bind-parent.test.ts` (real cron service + timer): the unbound job now reaches its conversation's memory, without a run-row receipt.

Local runs: the 27 test files that import the changed sources passed (`ocx test`, 6 shards). `pnpm check:changed`: typecheck, lint, guards all ok; the dead-export scan fails only on files this PR does not touch (`src/agents/command/types.ts`, `src/plugins/native-module-require.ts`, `ui/src/...`, `src/gateway/server-methods/update.test-harness.ts`), same as `main`.

End to end, scratch Gateway from source, `plugins.slots.memory: "knowledge"`, real model (`openai/gpt-5.5`). An owner Control UI direct chat was created by one real `chat.send` (row `chatType: "direct"`). A key-only isolated `agentTurn` job (owner key = that chat, no `sourceConversation`, no recorded requester, no tool policy, `toolsAllow` incl. `knowledge_remember`, `knowledge_grep`, `exec`) fired from its own `at` schedule about two minutes ahead (no forced run).

Base (`65d94342e813`):

```
[agent/embedded] memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```
```
knowledge_remember: "Knowledge access unavailable: the host granted this session no memory audience. The Gateway log entry "memory_audience_denied" for this session names the reas…
github-actions Bot added a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
…openclaw#207982)

* improve(ui): show the project beside Cmd+K session settings (#203754)

Move project selection and its New worktree switch into the visible project field. Keep agent selection and Remember settings in their original menu.

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

* fix: stop warning about unsaved drafts when opening a chat (#203741)

* fix: stop warning about unsaved drafts when opening a chat

Keep failed background recovery reads distinct from failed edits in the composer and Side chat. Keep one access notice when browser storage is unavailable without consuming the warning for a later failed save.

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

* fix: stop warning about unsaved drafts when opening a chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 227e24ff-2a24-4a82-a325-e7787c443eed

---------

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

* fix(logbook): clear obsolete errors when retrying actions (#199461)

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

* fix(ui): keep the sidebar session list collapsed (#207832)

* fix(ui): keep the flat session list collapsed

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

* fix(ui): keep the sidebar session list collapsed

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d5d9e6c3-ba53-4dec-9efe-a5a9c5c29445

* fix(ui): page the sidebar only when it scrolls to the end

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

---------

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

* fix: stop treating limited access as an Inbox alert (#207737)

* fix: stop treating limited access as an inbox alert

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

* fix: stop treating limited access as an Inbox alert

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a014cab4-b01d-458b-aa67-ec83ad3a2a99

---------

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

* fix: child session activity ring freezes during startup (#188147)

* fix: child session activity ring freezes during startup

Project accepted preparation as running without starting the execution clock. Reserve queued presentation for actual mailbox/global-lane waits and preserve recorded capacity waits.

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

* fix: child session activity ring freezes during startup

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 2bf26c5b-2410-44b2-9915-d2289a90f388

* fix: align Gateway consumers with active session startup

Expect active accepted chat preparation, record a real lane wait in metrics, and distinguish preparation from actual queued input in describe/list coverage.

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

* Publish openclaw/plaid-crayfish

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 29690b6c-a214-45c1-9591-fd19b1d51336

* test(gateway): cover child startup in the current session checks

---------

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

* fix: remove hover tooltips from Workboard cards (#207928)

* improve: tighten Sessions board card typography (#207931)

* fix: keep Sessions board card hover neutral instead of column color (#207932)

* fix: keep wrapped Settings help links visibly focused on phones (#203819)

* fix(ui): keep wrapped device help links visibly focused

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

* fix: show the full focus outline on wrapped device help links

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 7b5d66ad-f165-8076-9dcf-5dd7cd64f0d9

* fix(ui): show wrapped settings help focus at the phone gutter

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

---------

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

* fix: keep the selected Review file compact when the tree is open (#203825)

* fix: show the full filename in Review diff headings

Allow the heading to wrap the whole filename instead of reserving the line for its extension. Keep the compact file tree presentation unchanged.

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

* fix: show the full filename in Review diff headings

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ba141dca-cfb0-85b2-a5bb-102d1536c092

* fix: identify the selected file in a narrow Review panel

Keep the destination filename visible above the diff and reserve room for its stem in the changed-files tree.

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

* fix: keep identifying filenames and diff actions on one row

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

* fix: keep short file extensions intact in Review headings

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

* test: verify renamed and short files in the compact Review tree

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

---------

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

* fix: hide desktop Details when there is nothing to show (#205093)

* fix: hide desktop Details when there is nothing to show

* fix(ui): discover session details before mounting the panel

* fix: keep tagged silent replies out of chat (#207738)

* fix(subagents): warn when cancel cannot confirm the worker stopped (#208041)

* fix: align Control UI tooling and docs with task card removal (#207747)

* improve: give assistant chat bubbles a calmer neutral background (#203729)

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

* fix: show empty chat search results while a collaborator types (#208010)

Use the filtered transcript to show when a chat search has no matches and to restore the reader’s place. Keep the collaborator’s typing preview visible.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fb4672e-d1b4-419c-8551-3ab267f39de3

* test(openai): expect progress instructions in the GPT-Live handshake (#208006)

Expect the direct GPT-Live session.update frame to include the operator's instructions followed by the progress-claims instruction. Keep the full-frame equality check.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 0e4639f8-64cf-4b54-8c52-6d1dd823278c

* fix: keep project picker errors readable (#203763)

* fix(ui): keep project picker errors and retry inside the menu

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

* fix: keep project picker errors readable

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e5cd3cf3-150f-4766-bab3-ca89f29252d1

* test: keep the project picker regression mergeable

---------

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

* fix: keep long answer summaries readable in chat (#203779)

* fix: keep long answer summaries readable in chat

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

* fix: keep long answer summaries readable in chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 40161eb2-ab93-4ac4-810c-656cc6a8d664

---------

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

* fix: check the refusal reason for revoked queued followups (#208025)

The Gateway intentionally reports a withheld failure for invalidated sign-in. Keep the model, executed-run, and queue assertions and distinguish this refusal from an unrelated error.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fd6e1bc9-ac1b-4a0b-86c8-4d15ea9d65ac

* fix(qa): replay Claude compaction completion in the Telegram live lane (#208001)

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: edeb5fcc-cfe8-4ad3-9b38-37bdb3073cd8

* refactor(ui): remove unused English catalog entries (#201419)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>

* refactor(ui): remove dead Settings text (Labs, Updates, forms, devices, memory) (#201421)

* refactor(ui): remove unused Labs parallel-task copy

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

* refactor(ui): remove Labs parallel-task text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3b47ea07-0bd0-8cab-9425-6c67975a8f24

* refactor(ui): remove unused Updates copy

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

* refactor(ui): remove unused settings form and appearance copy

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

* refactor(ui): remove unused device, desktop and systems copy

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

* refactor(ui): remove unused dream diary copy

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

* Publish openclaw/quick-lobster-5

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3512bcc3-a350-8bc4-8c43-92639564075b

---------

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

* refactor(ui): remove dead New session, Sessions, Agents, Templates and OpenClaw ID text (#201422)

* refactor(ui): remove unused New session copy

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

* refactor(ui): remove New session text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 609418e2-3a64-8b1d-a39e-9376e4b8949f

* refactor(ui): remove unused Sessions copy

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

* refactor(ui): remove unused Templates copy

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

* refactor(ui): remove unused agent identity and file copy

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

* refactor(ui): remove unused OpenClaw ID copy

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

* Publish openclaw/oceanic-claw-2

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: dcc9dcf1-1890-866a-b5d9-3dff693a5d98

---------

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

* refactor(ui): remove dead model setup, Models and model picker text (#201424)

* refactor(ui): remove unused model setup copy

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

* refactor(ui): remove model setup text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 18ddea1b-160c-8672-a918-2a952c072c15

* refactor(ui): remove unused model provider list copy

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

* refactor(ui): remove unused add-provider and default model copy

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

* refactor(ui): remove unused model picker labels

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

* refactor(ui): remove unused model picker loading copy

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

* refactor(ui): remove dead model setup, Models and model picker text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 6fac1775-a172-8071-8591-9561a51d33c3

---------

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

* refactor(ui): remove dead agent tools, Skills and Usage text (#201429)

* refactor(ui): remove unused agent tool access copy

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

* refactor(ui): remove agent tool access text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4211d89a-e4f4-80e4-9be2-de8848a06a63

* refactor(ui): remove unused Skills copy

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

* refactor(ui): remove unused Usage copy

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

* refactor(ui): remove dead agent tools, Skills and Usage text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 33be6fec-530e-814d-9867-ce808e91d99e

---------

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

* refactor(ui): remove unused English text from chat side panels (#201452)

* refactor(ui): remove unused side chat copy

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

* refactor(ui): remove unused subagent and process panel copy

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

* refactor(ui): remove unused session files and changes copy

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

* refactor(ui): remove unused English text from chat side panels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 32359a08-da6f-86b4-81de-e0c5dbb4226b

---------

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

* refactor(ui): remove unused English text from chat and pull request cards (#201454)

* refactor(ui): remove unused composer and message copy

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

* refactor(ui): remove unused chat status copy

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

* refactor(ui): remove unused pull request copy

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

* refactor(ui): remove unused English text from chat and pull request cards

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: cdb7136a-c0bc-888a-829e-af2403beb226

* test(ui): verify composer translations with a live menu label

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

---------

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

* refactor(ui): remove unused English text from plugin settings and catalog pages (#201455)

* refactor(ui): remove unused plugin settings and access copy

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

* refactor(ui): remove unused plugin lifecycle and catalog search copy

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

* refactor(ui): remove unused plugin catalog filter and paging copy

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

* refactor(ui): remove unused plugin detail fact copy

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

* refactor(ui): remove unused English text from plugin settings and catalog pages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f24e2625-05eb-8d99-8e8a-e31549355657

---------

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels (#201456)

* refactor(ui): remove unused plugin detail tab and install count copy

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

* refactor(ui): remove unused installed plugin list and category copy

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

* refactor(ui): remove unused plugin status and source copy

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 57d467b8-c62d-825a-a303-31d561f0d69c

---------

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

* test(live): reject failed Moonshot completions (#207728)

* test(live): reject failed Moonshot completions

* test(live): use the current Moonshot model and thinking policy

* test(live): exercise the Moonshot provider thinking policy

* test(live): run the registered Moonshot stream hook

* test(live): load the Moonshot catalog through its public facade

* test(live): type the Moonshot catalog builder as a function

* test(gateway): isolate publication notice memory pressure (#207995)

* fix: test provider review continuations after device removal (#208022)

Check that the removed device disconnects while the already-admitted continuation sends only its acknowledged steer and clears the accepted review. Keep the viewer rejection at admission.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7ff67804-adab-4c48-b5d8-f0b4334dff46

* improve: reduce memory used by concurrent agent runs (#208033)

* perf(agents): reduce heap held by concurrent runs

Reuse MCP input schema publications and Code Mode declarations through their bounded catalog owners. Resolve embedded runs with the selected-model registry view and hydrate sibling records on demand.

* fix(agents): preserve MCP refresh for deeply nested schemas

If the reuse comparison cannot serialize a changed wire schema, defer to the existing publisher and its depth handling.

* test(agents): update MCP recovery snapshot assertion

* fix: isolate the hook token reload check from plugin startup (#208040)

Keep the real Gateway, config reload, approval and child process. The token probe does not need plugins, whose startup can outlast its five-second child deadline.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b6aeceb4-1e62-4a21-af66-41b77081ed09

* chore: unblock core lint by fixing oxlint errors in Workboard e2e tests (#208075)

Origin: #207839

## What Problem This Solves

`main` fails `check-lint-core-5`, so every open PR shows that lint shard red. #207839 added three oxlint errors in two Control UI e2e tests:

- `ui/src/e2e/workboard-locale.e2e.test.ts:93`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:154`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:178`: `unicorn/prefer-dom-node-text-content`

## User Impact

No product change. This is test-only. Contributors get a green core lint shard again.

## Why This Change Was Made

- Two single-line `if` statements now have braces.
- The mobile editor test reads the column row with Playwright `textContent()` instead of `innerText()`. The assertion keeps its meaning: it checks that the renamed column label "Finished" shows in the row. The label is in the always-rendered `.settings-row__title` span. `textContent` also includes the row's description, and the test does not change it. The new label can only be found if the rename worked.
- Lint rules and other files are not changed.

## Evidence

- On `main` (0cf154ca1137), `node scripts/run-oxlint.mjs` on the 2 files: 3 errors (the ones shown above). With this change: `Found 0 warnings and 0 errors`. `oxfmt --check`: clean.
- `vitest --config test/vitest/vitest.ui-e2e.config.ts` on both files, run 2 times: `Test Files 2 passed (2)`, `Tests 4 passed (4)` each time.

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

* perf(gateway): skip display preparation during history sharing checks (#208062)

* chore: simplify Workboard session filter tests (#207853)

* chore: simplify Workboard session filter tests

* test: retain session visibility and reference reset checks

* test: check revoked board references on a cached read

* test: fix prompt-cache journey tool and scope expectations (#208055)

Check web_fetch membership in the latest deferred-tool list. Send chat with
writer scope in Tool Search opt-out journeys so direct and internal turns
can compare the full automations schema.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 62582bff-c96b-4a17-9051-3daa5fa19044

* fix: make the chat sidebar swipe reachable on Android (#208037)

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6251590e-fd83-4a72-bf88-6000e34d9e6d

* improve(ios): avoid repeated Keychain reads when opening chat (#207667)

* perf(ios): keep Keychain reads out of chat identity

* improve(ios): avoid repeated Keychain reads when opening chat

OpenClaw-Publication: 4ebe6ce8-9b61-8209-be76-df43a417621d

* improve(ios): skip Talk PCM player setup until audio plays (#207668)

* perf(ios): defer PCM player initialization until playback

* improve(ios): skip Talk PCM player setup until audio plays

OpenClaw-Publication: 0fd39061-45a1-8858-970d-0b837bb5dac5

* fix: keep session writes working after a gateway restart (#208031)

Give a newly admitted schema its own validity cell when its markers change. Retain the existing cell when the markers match so unchanged borrowers stay valid.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 3c81c608-4a5c-4c8c-85b1-c3e5b827cd03

* fix: stop the live Tool Search probe from reporting false connection failures (#208034)

Scope the live probe’s session catalog to its fixture tools and discovery controls. Return service availability from the status tool and preserve the wire assertion if the runner throws.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4b9ea82e-e287-494d-a59e-9523243f60ee

* improve: reduce sidebar work when other chats update (#207791)

* improve: reduce sidebar work when other chats update

Reuse the already reconciled primary result for an identical retained window with the same agent and archive filter. Keep independent windows on their existing reconciliation path.

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

* improve: reduce sidebar work when other chats update

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f22b2da2-4071-8303-9ece-93ab4f3aacdf

---------

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

* improve: avoid rebuilding provider choices while typing a model API key (#207786)

* improve: avoid rebuilding provider choices while typing a model API key

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

* improve: avoid rebuilding provider choices while typing a model API key

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f5e75abf-1583-83f1-a72a-a8023ceb4625

---------

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

* improve: avoid re-sorting displayed runs when paging automation history (#207795)

* improve: reduce repeated work when paging automation history

Consume ordered history pages without re-sorting retained runs at every loading and append render. Keep stable ordering for shifted offset boundaries and immediate offline sort changes. Add an opt-in native-page count workload.

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

* improve: avoid re-sorting displayed runs when paging automation history

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e82048d2-da2c-8e54-a164-02a1db9a5532

---------

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

* fix: verify retained child results in the Ultra live check (#208026)

Read the matched child’s retained result after delivery and verify its run ID before checking the handoff token.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: bbaa86d0-6a79-4155-b69e-2701a35c57bd

* fix(ui): open the selected agent’s chat while reconnecting (#202680)

* fix(ui): open the selected agent chat while reconnecting

* fix(ui): open the selected agent’s chat while reconnecting

OpenClaw-Publication: 722da459-2f0c-4a1a-ac47-0e1899d47f20

* fix: give the installed Codex progress-reply test a conversation to reply to (#208063)

Create the isolated session with internal delivery before starting the installed agent. The transient WebChat flags alone do not advertise a message tool.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fdae7386-bdc9-4280-9e3e-a18ba8cea046

* fix: run the live trajectory export check against the built gateway (#208038)

Start a built Gateway for the live trajectory export test so the Codex plugin reads the configuration prepared by the Gateway. The test still requires an exact model reply, one-time export approval, and a bundle containing runtime and transcript events.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 055248a1-a1f2-441c-8237-58ff6cee3893

* fix: stop repair notices when their automation is removed (#208036)

Check the automation's ID and creation time before its repair notice continues. Deleting the automation stops the notice from resending its run history to the model. Ordinary edits let the notice finish.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 5d0644b7-f674-4578-ae3f-16f44b3b0e6d

* fix: restart launcher-managed Gateways after exit 78 (#207972)

## What Problem This Solves

A launcher-managed Gateway that exits 78 outside an update trial leaves the serving release down permanently.

## User Impact

The resident launcher now restarts that child with its existing crash backoff (1, 2, 5, 10, then 30 seconds). Trial configuration refusals still roll back. Direct-Gateway systemd services retain `RestartPreventExitStatus=78`. Launcher format 4, trial v2 and IPC bytes are unchanged. The existing launcher writer refreshes an installed file when its bytes differ, while preserving newer launcher formats.

## Why This Change Was Made

Delete the terminal non-trial exit branch rather than add another restart mechanism. Simplification retained the two-line deletion, one byte comparison in the existing writer, migrated lifecycle/replacement regressions and launcher-managed documentation. Production: -2 lines net; tests: +18 net; docs: +2.

## Evidence

- vitest-source, 600-second bounds: the migrated launcher test failed on unchanged main production code because the launcher exited before the first 1-second restart timer; the other 15 launcher tests passed.
- Immediately after the deletion, launcher and frozen-contract tests passed: 19 tests, including unchanged trial-78 rollback assertions and format-4 ready/stop exchange.
- Fake clock checks no child starts before each 1/2/5-second deadline and another child starts at each deadline.
- Focused Oxlint passed; formatter output matched the test file.
- Installed format-4 stale-content regression failed before the byte comparison: the old content remained. The replacement test also verifies a second identical write does not replace the file and newer launcher formats remain untouched.
- Rendering is deterministic: only static constants, flag arrays and source constants are interpolated; no timestamp, PID or install path enters the rendered bytes.
- Header-reader audit on main and shipped `v2026.12.1-beta.1`: `writeLauncher` previously replaced only older formats; `writeGitReleaseLauncher` preserves all formats >=2. A downgrade to the beta-era writer therefore still preserves an installed format-4 launcher as before. The frozen format-4 peer test remains unchanged.
- Prior-head [CI](https://github.com/openclaw/openclaw/actions/runs/46228136551) and [update-restart-auth package acceptance](https://github.com/openclaw/openclaw/actions/runs/46228140802) passed on `c5ad15b432742fc4b8b5455f7f4a512f2a291953`; byte-refresh repair requires fresh hosted evidence. No full local build was run per task scope.

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

* fix: keep sandbox commands working when workspace scratch is not writable (#208005)

Use the container's private /tmp when the sandbox user cannot write the default workspace scratch directory. Keep explicit temp paths and workspace permissions intact.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 31357588-6850-4ea3-a68d-52e744874a24

* fix(gateway): invalidate session history when a transcript publication rejects (#208051)

## Problem

When a transcript publication rejects, Gateway clients that follow the session get no event. Examples: a synchronous projection read throws `SessionRowFactsPending` (the count-sequence fallback fixed by #208004), the history worker fails with a non-overload error (`readSessionMessageByIdAsync` rethrows it), or event-row preparation fails. The Gateway logs `Transcript update dispatch failed` (`src/gateway/server-runtime-subscriptions.ts`) and publishes nothing: no `session.message`, no `sessions.changed`. The open chat stays stale until something else refetches it.

Log signature, reproduced on main: `Transcript update dispatch failed` with `Session row facts require worker reconciliation` (seen in CI runs of `session-message-events.history-worker.test.ts`; root cause in #208004). Any other rejection in the handler loses events the same way.

## Fix

`createTranscriptUpdateBroadcastHandler` already runs every transcript publication in its per-session queue. When the publication rejects, the queue now emits the existing history invalidation: `sessions.changed` with `phase: "message"` and no `messageId`/`messageSeq`. It goes to the same audience as a normal publication (session-event and message subscribers, `canReceiveSessionEvent` authorization, private scope for retired unqualified owners). Then it rethrows, so the existing warning and the live-source fallback stay.

- No new protocol field, event or schema. The protocol docs (`docs/gateway/protocol/rpc-bootstrap-and-events.md`) already say "Refetch history on that invalidation". Clients refetch on it: Control UI `ui/src/pages/chat/chat-state-events.ts`, Apple `ChatViewModel+TransportEvents.swift`, Android `ChatController.kt`.
- If the invalidation itself throws, the rethrown `AggregateError` carries both errors, so the existing warning logs both.
- Accepted edges:
  - A pending assistant error keeps its existing deferral, so no early error row appears.
  - A legacy marker-only update has no session key and stays log-only.
  - A rejection after a `session.message` was sent causes one extra, harmless refetch.
- Out of scope: lifecycle and background-process row handlers. They publish row snapshots, and their resync would be a row invalidation, which is a different signal.

## Users

| PR | Users | Failure class | Evidence |
|---|---|---|---|
| this | Gateway clients following a session (Control UI, iOS/macOS, Android, SDK) | silent stale chat after a rejected transcript publication | `server-runtime-subscriptions.ts` catch logs only; new tests red on main |

One-shot CLI runs do not use this publisher, so they are not affected.

## Evidence

- `session-message-events.history-worker.test.ts` "invalidates selected-session history when a transcript publication rejects": the history worker read rejects with a generic error. The client receives `sessions.changed` (`phase: "message"`, no `messageSeq`), and `chat.history` returns the committed message. Red on main (120 s timeout, no event), green with the fix.
- `server-session-events.recovery.test.ts` "invalidates history and keeps the rejection when a transcript read fails": the handler still rejects with the original error (the caller's warning path) and broadcasts once. Red on main, green with the fix.
- Production +55/-9 (one shared audience helper replaces the inline loop); tests +64.

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

* fix(workboard): open the board in app from dashboard widgets (#199922)

* fix: keep confirmed sends in the receiving chat's model history (#208049)

Supersedes #207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `2774acd2d7db`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

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

* fix(qa): run the live log tail browser test again (#208020)

Point the live log tail scenario at the consolidated auto-follow browser test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 34b4a470-dfdd-48fb-aaba-59aec526e812

* fix: check managed child delivery in the Codex live suite (#208011)

Check that the parent receives the UUID chosen by its managed child. Let the Docker live suite use the Gateway's delegation defaults.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7f1bb837-8d14-46f3-82e5-8aa559e33b3e

* improve: speed up Doctor database repair tests (#208103)

Build the healthy migrated agent database once for the repair guard table. Give each case an independent file, registry, and maintenance lease so it still exercises the real defect, repair, and clean recheck.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: f5bae5e0-5d87-4d07-9178-2e4ab0ca2637

* fix(gateway): keep count-path session updates through store discovery (#208004)

## Problem

Scheduled CI kept failing `session-message-events.history-worker.test.ts` (count case, "after worker overload"): 5 of 15 scheduled runs, most recently run 46220607204. After #207862 the case waits the full 120 s test limit, so the event was missing, not late.

A traced CI sample (PR CI, Linux x64, Bun) showed the stop: after the transcript update, the count publication never reached `readSessionMessageCountAsync`, and a `chat.metadata.changed` from a session-store topology change arrived in the same window. A local repro then showed the cause:

```
Error: Session row facts require worker reconciliation
    at readSessionRowEntry (src/gateway/session-row-projection-materialize.ts:460)
    ...
    at selectSessionRowEntries (src/gateway/session-row-scope.ts:551)
```

`handleTranscriptUpdateBroadcast` (`src/gateway/server-session-events.ts`) assigns a cursor sequence to updates that arrive without `messageSeq`. To do that it prepared membership with its own loop and then called `projection.selectEntries()` synchronously. When store discovery runs inside that loop, the row's entry is still unread, so selection throws `SessionRowFactsPending`. That error means "re-enter through exact worker preparation". The handler did not handle it, so the publication failed and clients got neither `session.message` nor `sessions.changed`. The update was lost until the next refetch.

## Change

The count fallback reads its row through the session event publication rows (`sessionEventPublicationRows(projection).withReadyRows`, metadata only), the same owner `withPreparedEventRow` uses. It reaches `withPreparedExactRows`, which prepares membership and retries `SessionRowFactsPending`. The hand-written `prepareMembership` loop is removed.

Known edge, left as is: other throws before publication still reject the update. Only worker overload turns into a `sessions.changed` invalidation. That is a wider change and is not part of this fix.

## Who sees it

Gateway clients that follow a session (`sessions.messages.subscribe`, for example the Control UI) and receive transcript updates without `messageSeq` (`server-session-events.ts`, count fallback), while session-store topology changes (a store added, removed or rediscovered). One-shot CLI runs do not follow session events and do not see this.

## Evidence

- New test `delivers a count-path session update when the store topology changes`: emits a store topology change, then a transcript update without `messageSeq`. Red on base (120 s timeout, 3 of 3 runs), green with the fix (3 of 3, no memo).
- The CI shape (overload case plus store topology churn): 10 of 10 red on base, green with the fix.
- Existing history-worker overload cases and the session event consumer suites pass.
- What starts the store topology change during the CI run is inferred, not traced. The CI trace shows the publication stopping before the count read, with a `chat.metadata.changed` in the same window. The local repro with an explicit topology change gives the same signature and the stack above.

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

* fix: keep Telegram login tests independent of startup speed (#208106)

Wait for the Telegram progress note before checking lane ownership. Release both fixture gates on assertion failure so a slow login cannot spill into the next test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 177934d0-1fb5-4a06-beb2-10916a09ee47

* fix(release): identify jobs blocking child evidence sealing

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

* fix(release): clarify pinned FRV recovery eligibility

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

* fix(ci): add tagged reply control to the PR wrapper inventory (#208120)

* fix(android): keep the snooze deadline test independent of runner timing (#208097)

Advance the handset and Gateway clocks together during the post-save refresh. Check the exact deadline sent to the Gateway and the wake time returned to the handset.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6fb940cc-e4ef-4c8f-94a9-060a736f8c11

* test(process): keep cancel parity off execa's force-kill race (#208126)

## Problem

Scheduled CI run 46234040123 (checks-node-compact-large-42, shard core-runtime-infra-process-hosted-2) failed `src/process/spawn-broker/execa.test.ts > broker command transports > matches buffered cancel results and errors`:

```
-   "isForcefullyTerminated": true,      (direct execa, the reference side)
+   "isForcefullyTerminated": false,     (spawn broker)
    "isCanceled": true, "signal": "SIGTERM"   (both sides)
```

Both sides agree that the command was canceled and that the child exited on SIGTERM. Only the reference side, which calls `execa` directly in the test process, said "forcefully terminated".

Cause: execa starts a `forceKillAfterDelay` timer when it sends SIGTERM (`execa/lib/terminate/kill.js` `killOnTimeout`). If the parent event loop stalls longer than the delay before it reaps the exited child, the timer fires first. `kill('SIGKILL')` then succeeds on the unreaped child and sets `isForcefullyTerminated`, even though the child already exited on SIGTERM. The fixture used a 50 ms delay for every case, so a loaded runner can hit this race.

Reproduced with direct execa 10.2.1, outside the broker: cancel a SIGTERM-honoring child with `forceKillAfterDelay: 50`, then block the event loop for 200 ms in a `setImmediate`. Result 3/3: `signal: "SIGTERM"`, `isCanceled: true`, `isForcefullyTerminated: true`. With no stall, `isForcefullyTerminated` is `false`.

## Change

Test-only. Children that honor SIGTERM get a 5 s force-kill delay, so the timer cannot win the race. These children exit at once, so the tests take no longer. The `forced cancel` case ignores SIGTERM and keeps its 50 ms delay, so it still proves forced termination matches across the broker and direct execa.

## Impact

No product change. Process cancellation results stay correct: in the failing run the broker reported a cancel as a cancel (`isCanceled: true`, `failed: true`). The mismatch was the reference side's timer race.

## Evidence

- CI failure: https://github.com/openclaw/openclaw/actions/runs/46234040123/job/141256229744
- No `src/process` change in the window 11df80a4..3b24ff7c.
- Before the change: 5/5 green locally with load average ~39 (the race needs a stall over 50 ms).
- After the change: `execa.test.ts` full file 5/5 green, 27 passed, 3 skipped.

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

* test(state): keep schema modules out of read-only agent database access (#185841)

* fix(state): avoid eager writer imports in agent database reads

* test(state): keep schema modules out of read-only agent database access

* chore(release): close out 2026.11.11 on main (#208114)

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

* fix(outbound): record a plugin action's visible send once (#208130)

Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

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

* fix: let a fallback model finish after Code Mode reads

Allow the configured fallback model to finish after a completed Code Mode cell when every host call has a successful read receipt and qualifies for direct retry. Shell writes, unfinished cells and plugin lookups without an audited replay classification still block fallback.

Closes #207895

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: d49db423-f997-43b6-b23c-4d0be08459c0

* fix: let older automations read their conversation's memory (#208143)

## What Problem This Solves

Automations created before OpenClaw recorded the creating conversation (every job without `sourceConversation`, i.e. created before #179062) name that conversation only by session key. Their scheduled runs get no memory at all: every `knowledge_*` or memory tool call fails with "the host granted this session no memory audience", and the Gateway logs `memory audience unavailable: root session agent:<agent>:cron:<job>:run:<run> has no durable chat type`. The same runs still hold owner-only tools such as `exec`. A production automation that reads and writes the owner's knowledge vault every week hit this on every run.

## User Impact

- A key-only detached automation (`isolated` / `current`) now reads its conversation's current memory, the same way a bound automation does:
  - created in the owner's direct chat: the owner's private memory;
  - created in a group or channel: only that conversation's memory, never owner-private.
- When the job recorded a requester (profile or channel sender), that requester's owner status is checked at each occurrence first; without one, the run's existing owner bit decides, as it already does for the run's tools.
- If the conversation row is gone, archived or cannot be read, the run proceeds exactly as before (no memory, no pause, no failure).
- Board, workspace, sandbox, event target and the run's tools are unchanged. `main` and `session:<key>` targets are unchanged.
- `automations bind` stays available for the exact-incarnation link but is no longer needed for memory. Docs (`cli/cron` "Binding older jobs", `automation/cron-jobs/payloads`) and Doctor's unbound note say so.

Accepted edge case: a key-only run whose agent sandbox mode is `non-main` or `all` now gets owner-private memory it did not have, when the job was created in the owner's direct chat. The owner created these jobs in their own DM, and the run already holds owner authority.

## Why This Change Was Made

`resolveScheduledPrincipal` classifies these jobs as `unbound-parent` and gives them legacy owner authority, but `buildScheduledExecutionContext` pointed their memory at the cron run row, which never has a chat type, so the memory resolver always denied. The fix stays in the existing owner:

- `admitScheduledOccurrence` (`src/cron/execution-context-admission.ts`): for an `unbound-parent` principal on a detached run, read the key-linked conversation row once. A failed read becomes "no row". No generation lease, workspace binding, sandbox or pause change. A recorded requester is admitted per occurrence through the existing `admitScheduledRequesterGrant`.
- `buildScheduledExecutionContext` (`src/cron/execution-context.ts`): with a live row, memory becomes `{ source: "parent", parent: <current sessionKey/sessionId/lifecycleRevision>, owner }`. Everything else for `unbound-parent` is unchanged.
- The memory resolver (`src/plugins/memory-audience.ts`) does not change: it already maps a direct root + owner to owner-private and direct/group/channel to that conversation's partition, for both the embedded and the CLI runtime.
- `scheduledParentKeyOf` now derives the key from `resolveScheduledPrincipal` itself, so Doctor's access review and the development replay read the same row the runtime does; the replay vector (`execution-context-projection.ts`) already labels the memory gain as intended, so it needed no edit.

Not changed: Doctor auto-bind or any stored-row write, jobs with no parent key, bound jobs with no recorded requester. On current `main`, bound jobs keep following their conversation after a reset (#205887), so no reset-degraded path exists to special-case.

## Evidence

Real-admission tests (red on the merge base `65d94342e813`, green on this head; 6 tests failed on base, all pass on head):

- `execution-context-memory-audience.test.ts` (real admission → registry → embedded and CLI resolvers): key-only owner-DM job → owner-private; key-only group job → that group's conversation only; key-only job with a revoked recorded requester → conversation only; key-only job whose conversation is gone → no audience, run admitted.
- `execution-context.test.ts`: key-only detached job gets parent memory and nothing else (board/workspace/sandbox stay the run's); archived, removed and in-session (`session:<key>`) cases keep run-session memory.
- `execution-context-admission.test.ts`: key-only read takes no generation lease; a failed read still admits the run with its own memory.
- `isolated-agent/run.bind-parent.test.ts` (real cron service + timer): the unbound job now reaches its conversation's memory, without a run-row receipt.

Local runs: the 27 test files that import the changed sources passed (`ocx test`, 6 shards). `pnpm check:changed`: typecheck, lint, guards all ok; the dead-export scan fails only on files this PR does not touch (`src/agents/command/types.ts`, `src/plugins/native-module-require.ts`, `ui/src/...`, `src/gateway/server-methods/update.test-harness.ts`), same as `main`.

End to end, scratch Gateway from source, `plugins.slots.memory: "knowledge"`, real model (`openai/gpt-5.5`). An owner Control UI direct chat was created by one real `chat.send` (row `chatType: "direct"`). A key-only isolated `agentTurn` job (owner key = that chat, no `sourceConversation`, no recorded requester, no tool policy, `toolsAllow` incl. `knowledge_remember`, `knowledge_grep`, `exec`) fired from its own `at` schedule about two minutes ahead (no forced run).

Base (`65d94342e813`):

```
[agent/embedded] memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```
```
knowledge_remember: "Knowledge access unavailable: the host granted this session no memory audience. The Gateway log entry "memory_audience_denied" for this session names the reason and its repair."
knowledge_grep: "Knowledge access unavailable: the host granted this session no memory audience. ..."
```

Head: no `memory audience unavailable` line in the Gateway log; the run's result:

```
knowledge_remember: inserted claim <claim-id>.
knowledge_grep: 1 hit — <claim-id>: "The owner's favorite tea is masala chai."
```

The claim was written under the store's `vault/private/` (owner-private).

Observed, not changed here: a session created only through `openclaw agent --session-key agent:main:main` from the CLI has no `chatType`, so a key-only job linked to such a row still gets no memory (Doctor already lists these under "no stored chat type"). Channel DMs and Control UI chats record `chatType: "direct"`.

Merge danger: two-way door. No schema, stored-row, config or protocol change; a revert restores the previous memory decision. Blast radius: memory audience of detached scheduled runs whose jobs have no `sourceConversation` but an owner/policy session key.

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

* fix(qa): let Matrix message-action checks run in creator-owned v12 rooms (#208029)

Verify the room creation event before exercising all five Matrix message actions. The homeserver authorizes the pin, and the observer verifies the event and final pinned state.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fd4ac3e-941b-4a56-8f9a-a0a6df7a5cae

* fix(workboard): clear lint errors in the board settings modal (#208113)

## Problem
`main` has two lint errors in `extensions/workboard/browser/pages/workboard/view-board-modal.tsx`, from #207839:
- `:218` `eslint(no-shadow)`: the save-time `columns` shadows the `columns()` accessor.
- `:497` `eslint(curly)`: the fallback-column `for-of` has no braces.

`main` CI skips `check-lint-*` for that push, so it stayed green. PRs that change `.github/workflows/ci.yml` run the full lint on the merge ref and go red (for example #207954, job `check-lint-core-5`).

## Change
- Rename the save-time variable to `changedColumns`. The request payload is unchanged: `{ columns: changedColumns }`.
- Brace the loop.

No behavior change.

## Evidence
- `pnpm exec oxlint <file>` on `main`: 2 errors (`no-shadow`, `curly`). With this change: 0 errors.
- `oxfmt --check`: clean.

## Also fixed (same class: `main` defects that `main` CI skips)
- `scripts/pr-lib/wrapper-components.txt` was missing `src/auto-reply/reply/tagged-reply-control.ts` (runtime import added by #207738), so `eager-import-closure.test.ts > keeps the PR wrapper inventory closed over runtime imports` fails on PR merge refs. Added the one line in sorted position. Test: 1 passed.
- Merged the latest `main` so the Control UI controller guard no longer compares against an old base that includes #207792's `chat-pane-shared.ts`.

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

* fix(telegram): stop false "delivery failed" alerts when a topic automation posts its report with the message tool (#208102)

Root cause: src/channels/conversation-resolution.ts:405 `deliveryRoutesShareConversation` returned "unknown" when a sent route's `to` already names a topic and an explicit threadId names the same topic, so `sourceDeliveryTargetsMatch` fell back to a raw compare that never matches the canonical automation target `<chat>:topic:N` + threadId N.

Fixes #208082


## What Problem This Solves

An automation that runs in a Telegram topic's session and is delivered to that topic posts its report with the `message` tool, but the send is not credited: the run is recorded `not-delivered`, and when the turn ends without reply text it is marked `failed` and the user gets a "delivery failed" alert for a message that arrived.

## User Impact

A send that reaches the planned topic counts as the delivery, so these runs are `delivered` and `succeeded` and the false alerts stop. A send to a different topic still doesn't count. The same matcher credits subagent completions and dedupes replies, so those paths stop missing topic sends too. No config or migration.

## Why This Change Was Made

The automation's planned target names its topic twice (`<chat>:topic:<N>` plus `threadId: N`): that is the canonical form the cron delivery resolver and Telegram's own `resolveDeliveryTarget` produce. `deliveryRoutesShareConversation` treats a route sent as given whose `to` encodes a thread and which also carries an explicit thread as ambiguous (#198934: core can't tell which one the send path uses) and returns "unknown", so `sourceDeliveryTargetsMatch` falls back to a raw string compare that fails. When the explicit thread is the thread `to` already encodes, t…
github-actions Bot added a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
…penclaw#201292)

* improve(ui): show the project beside Cmd+K session settings (#203754)

Move project selection and its New worktree switch into the visible project field. Keep agent selection and Remember settings in their original menu.

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

* fix: stop warning about unsaved drafts when opening a chat (#203741)

* fix: stop warning about unsaved drafts when opening a chat

Keep failed background recovery reads distinct from failed edits in the composer and Side chat. Keep one access notice when browser storage is unavailable without consuming the warning for a later failed save.

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

* fix: stop warning about unsaved drafts when opening a chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 227e24ff-2a24-4a82-a325-e7787c443eed

---------

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

* fix(logbook): clear obsolete errors when retrying actions (#199461)

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

* fix(ui): keep the sidebar session list collapsed (#207832)

* fix(ui): keep the flat session list collapsed

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

* fix(ui): keep the sidebar session list collapsed

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: d5d9e6c3-ba53-4dec-9efe-a5a9c5c29445

* fix(ui): page the sidebar only when it scrolls to the end

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

---------

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

* fix: stop treating limited access as an Inbox alert (#207737)

* fix: stop treating limited access as an inbox alert

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

* fix: stop treating limited access as an Inbox alert

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: a014cab4-b01d-458b-aa67-ec83ad3a2a99

---------

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

* fix: child session activity ring freezes during startup (#188147)

* fix: child session activity ring freezes during startup

Project accepted preparation as running without starting the execution clock. Reserve queued presentation for actual mailbox/global-lane waits and preserve recorded capacity waits.

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

* fix: child session activity ring freezes during startup

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 2bf26c5b-2410-44b2-9915-d2289a90f388

* fix: align Gateway consumers with active session startup

Expect active accepted chat preparation, record a real lane wait in metrics, and distinguish preparation from actual queued input in describe/list coverage.

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

* Publish openclaw/plaid-crayfish

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 29690b6c-a214-45c1-9591-fd19b1d51336

* test(gateway): cover child startup in the current session checks

---------

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

* fix: remove hover tooltips from Workboard cards (#207928)

* improve: tighten Sessions board card typography (#207931)

* fix: keep Sessions board card hover neutral instead of column color (#207932)

* fix: keep wrapped Settings help links visibly focused on phones (#203819)

* fix(ui): keep wrapped device help links visibly focused

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

* fix: show the full focus outline on wrapped device help links

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 7b5d66ad-f165-8076-9dcf-5dd7cd64f0d9

* fix(ui): show wrapped settings help focus at the phone gutter

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

---------

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

* fix: keep the selected Review file compact when the tree is open (#203825)

* fix: show the full filename in Review diff headings

Allow the heading to wrap the whole filename instead of reserving the line for its extension. Keep the compact file tree presentation unchanged.

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

* fix: show the full filename in Review diff headings

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: ba141dca-cfb0-85b2-a5bb-102d1536c092

* fix: identify the selected file in a narrow Review panel

Keep the destination filename visible above the diff and reserve room for its stem in the changed-files tree.

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

* fix: keep identifying filenames and diff actions on one row

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

* fix: keep short file extensions intact in Review headings

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

* test: verify renamed and short files in the compact Review tree

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

---------

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

* fix: hide desktop Details when there is nothing to show (#205093)

* fix: hide desktop Details when there is nothing to show

* fix(ui): discover session details before mounting the panel

* fix: keep tagged silent replies out of chat (#207738)

* fix(subagents): warn when cancel cannot confirm the worker stopped (#208041)

* fix: align Control UI tooling and docs with task card removal (#207747)

* improve: give assistant chat bubbles a calmer neutral background (#203729)

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

* fix: show empty chat search results while a collaborator types (#208010)

Use the filtered transcript to show when a chat search has no matches and to restore the reader’s place. Keep the collaborator’s typing preview visible.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fb4672e-d1b4-419c-8551-3ab267f39de3

* test(openai): expect progress instructions in the GPT-Live handshake (#208006)

Expect the direct GPT-Live session.update frame to include the operator's instructions followed by the progress-claims instruction. Keep the full-frame equality check.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 0e4639f8-64cf-4b54-8c52-6d1dd823278c

* fix: keep project picker errors readable (#203763)

* fix(ui): keep project picker errors and retry inside the menu

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

* fix: keep project picker errors readable

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e5cd3cf3-150f-4766-bab3-ca89f29252d1

* test: keep the project picker regression mergeable

---------

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

* fix: keep long answer summaries readable in chat (#203779)

* fix: keep long answer summaries readable in chat

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

* fix: keep long answer summaries readable in chat

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 40161eb2-ab93-4ac4-810c-656cc6a8d664

---------

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

* fix: check the refusal reason for revoked queued followups (#208025)

The Gateway intentionally reports a withheld failure for invalidated sign-in. Keep the model, executed-run, and queue assertions and distinguish this refusal from an unrelated error.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fd6e1bc9-ac1b-4a0b-86c8-4d15ea9d65ac

* fix(qa): replay Claude compaction completion in the Telegram live lane (#208001)

Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: edeb5fcc-cfe8-4ad3-9b38-37bdb3073cd8

* refactor(ui): remove unused English catalog entries (#201419)

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: Vyctor H. Brzezowski <[email protected]>

* refactor(ui): remove dead Settings text (Labs, Updates, forms, devices, memory) (#201421)

* refactor(ui): remove unused Labs parallel-task copy

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

* refactor(ui): remove Labs parallel-task text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3b47ea07-0bd0-8cab-9425-6c67975a8f24

* refactor(ui): remove unused Updates copy

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

* refactor(ui): remove unused settings form and appearance copy

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

* refactor(ui): remove unused device, desktop and systems copy

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

* refactor(ui): remove unused dream diary copy

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

* Publish openclaw/quick-lobster-5

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 3512bcc3-a350-8bc4-8c43-92639564075b

---------

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

* refactor(ui): remove dead New session, Sessions, Agents, Templates and OpenClaw ID text (#201422)

* refactor(ui): remove unused New session copy

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

* refactor(ui): remove New session text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 609418e2-3a64-8b1d-a39e-9376e4b8949f

* refactor(ui): remove unused Sessions copy

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

* refactor(ui): remove unused Templates copy

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

* refactor(ui): remove unused agent identity and file copy

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

* refactor(ui): remove unused OpenClaw ID copy

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

* Publish openclaw/oceanic-claw-2

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: dcc9dcf1-1890-866a-b5d9-3dff693a5d98

---------

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

* refactor(ui): remove dead model setup, Models and model picker text (#201424)

* refactor(ui): remove unused model setup copy

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

* refactor(ui): remove model setup text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 18ddea1b-160c-8672-a918-2a952c072c15

* refactor(ui): remove unused model provider list copy

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

* refactor(ui): remove unused add-provider and default model copy

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

* refactor(ui): remove unused model picker labels

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

* refactor(ui): remove unused model picker loading copy

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

* refactor(ui): remove dead model setup, Models and model picker text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 6fac1775-a172-8071-8591-9561a51d33c3

---------

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

* refactor(ui): remove dead agent tools, Skills and Usage text (#201429)

* refactor(ui): remove unused agent tool access copy

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

* refactor(ui): remove agent tool access text no screen shows

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 4211d89a-e4f4-80e4-9be2-de8848a06a63

* refactor(ui): remove unused Skills copy

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

* refactor(ui): remove unused Usage copy

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

* refactor(ui): remove dead agent tools, Skills and Usage text

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 33be6fec-530e-814d-9867-ce808e91d99e

---------

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

* refactor(ui): remove unused English text from chat side panels (#201452)

* refactor(ui): remove unused side chat copy

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

* refactor(ui): remove unused subagent and process panel copy

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

* refactor(ui): remove unused session files and changes copy

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

* refactor(ui): remove unused English text from chat side panels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 32359a08-da6f-86b4-81de-e0c5dbb4226b

---------

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

* refactor(ui): remove unused English text from chat and pull request cards (#201454)

* refactor(ui): remove unused composer and message copy

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

* refactor(ui): remove unused chat status copy

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

* refactor(ui): remove unused pull request copy

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

* refactor(ui): remove unused English text from chat and pull request cards

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: cdb7136a-c0bc-888a-829e-af2403beb226

* test(ui): verify composer translations with a live menu label

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

---------

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

* refactor(ui): remove unused English text from plugin settings and catalog pages (#201455)

* refactor(ui): remove unused plugin settings and access copy

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

* refactor(ui): remove unused plugin lifecycle and catalog search copy

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

* refactor(ui): remove unused plugin catalog filter and paging copy

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

* refactor(ui): remove unused plugin detail fact copy

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

* refactor(ui): remove unused English text from plugin settings and catalog pages

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f24e2625-05eb-8d99-8e8a-e31549355657

---------

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels (#201456)

* refactor(ui): remove unused plugin detail tab and install count copy

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

* refactor(ui): remove unused installed plugin list and category copy

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

* refactor(ui): remove unused plugin status and source copy

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

* refactor(ui): remove unused English text from plugin tabs, lists and status labels

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: 57d467b8-c62d-825a-a303-31d561f0d69c

---------

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

* test(live): reject failed Moonshot completions (#207728)

* test(live): reject failed Moonshot completions

* test(live): use the current Moonshot model and thinking policy

* test(live): exercise the Moonshot provider thinking policy

* test(live): run the registered Moonshot stream hook

* test(live): load the Moonshot catalog through its public facade

* test(live): type the Moonshot catalog builder as a function

* test(gateway): isolate publication notice memory pressure (#207995)

* fix: test provider review continuations after device removal (#208022)

Check that the removed device disconnects while the already-admitted continuation sends only its acknowledged steer and clears the accepted review. Keep the viewer rejection at admission.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7ff67804-adab-4c48-b5d8-f0b4334dff46

* improve: reduce memory used by concurrent agent runs (#208033)

* perf(agents): reduce heap held by concurrent runs

Reuse MCP input schema publications and Code Mode declarations through their bounded catalog owners. Resolve embedded runs with the selected-model registry view and hydrate sibling records on demand.

* fix(agents): preserve MCP refresh for deeply nested schemas

If the reuse comparison cannot serialize a changed wire schema, defer to the existing publisher and its depth handling.

* test(agents): update MCP recovery snapshot assertion

* fix: isolate the hook token reload check from plugin startup (#208040)

Keep the real Gateway, config reload, approval and child process. The token probe does not need plugins, whose startup can outlast its five-second child deadline.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: b6aeceb4-1e62-4a21-af66-41b77081ed09

* chore: unblock core lint by fixing oxlint errors in Workboard e2e tests (#208075)

Origin: #207839

## What Problem This Solves

`main` fails `check-lint-core-5`, so every open PR shows that lint shard red. #207839 added three oxlint errors in two Control UI e2e tests:

- `ui/src/e2e/workboard-locale.e2e.test.ts:93`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:154`: `curly`
- `ui/src/e2e/workboard-board-editor-mobile.e2e.test.ts:178`: `unicorn/prefer-dom-node-text-content`

## User Impact

No product change. This is test-only. Contributors get a green core lint shard again.

## Why This Change Was Made

- Two single-line `if` statements now have braces.
- The mobile editor test reads the column row with Playwright `textContent()` instead of `innerText()`. The assertion keeps its meaning: it checks that the renamed column label "Finished" shows in the row. The label is in the always-rendered `.settings-row__title` span. `textContent` also includes the row's description, and the test does not change it. The new label can only be found if the rename worked.
- Lint rules and other files are not changed.

## Evidence

- On `main` (0cf154ca1137), `node scripts/run-oxlint.mjs` on the 2 files: 3 errors (the ones shown above). With this change: `Found 0 warnings and 0 errors`. `oxfmt --check`: clean.
- `vitest --config test/vitest/vitest.ui-e2e.config.ts` on both files, run 2 times: `Test Files 2 passed (2)`, `Tests 4 passed (4)` each time.

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

* perf(gateway): skip display preparation during history sharing checks (#208062)

* chore: simplify Workboard session filter tests (#207853)

* chore: simplify Workboard session filter tests

* test: retain session visibility and reference reset checks

* test: check revoked board references on a cached read

* test: fix prompt-cache journey tool and scope expectations (#208055)

Check web_fetch membership in the latest deferred-tool list. Send chat with
writer scope in Tool Search opt-out journeys so direct and internal turns
can compare the full automations schema.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 62582bff-c96b-4a17-9051-3daa5fa19044

* fix: make the chat sidebar swipe reachable on Android (#208037)

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6251590e-fd83-4a72-bf88-6000e34d9e6d

* improve(ios): avoid repeated Keychain reads when opening chat (#207667)

* perf(ios): keep Keychain reads out of chat identity

* improve(ios): avoid repeated Keychain reads when opening chat

OpenClaw-Publication: 4ebe6ce8-9b61-8209-be76-df43a417621d

* improve(ios): skip Talk PCM player setup until audio plays (#207668)

* perf(ios): defer PCM player initialization until playback

* improve(ios): skip Talk PCM player setup until audio plays

OpenClaw-Publication: 0fd39061-45a1-8858-970d-0b837bb5dac5

* fix: keep session writes working after a gateway restart (#208031)

Give a newly admitted schema its own validity cell when its markers change. Retain the existing cell when the markers match so unchanged borrowers stay valid.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 3c81c608-4a5c-4c8c-85b1-c3e5b827cd03

* fix: stop the live Tool Search probe from reporting false connection failures (#208034)

Scope the live probe’s session catalog to its fixture tools and discovery controls. Return service availability from the status tool and preserve the wire assertion if the runner throws.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4b9ea82e-e287-494d-a59e-9523243f60ee

* improve: reduce sidebar work when other chats update (#207791)

* improve: reduce sidebar work when other chats update

Reuse the already reconciled primary result for an identical retained window with the same agent and archive filter. Keep independent windows on their existing reconciliation path.

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

* improve: reduce sidebar work when other chats update

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f22b2da2-4071-8303-9ece-93ab4f3aacdf

---------

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

* improve: avoid rebuilding provider choices while typing a model API key (#207786)

* improve: avoid rebuilding provider choices while typing a model API key

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

* improve: avoid rebuilding provider choices while typing a model API key

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: f5e75abf-1583-83f1-a72a-a8023ceb4625

---------

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

* improve: avoid re-sorting displayed runs when paging automation history (#207795)

* improve: reduce repeated work when paging automation history

Consume ordered history pages without re-sorting retained runs at every loading and append render. Keep stable ordering for shifted offset boundaries and immediate offline sort changes. Add an opt-in native-page count workload.

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

* improve: avoid re-sorting displayed runs when paging automation history

Worked on by:
- @vyctorbrzezowski

Co-authored-by: vyctorbrzezowski <[email protected]>
OpenClaw-Publication: e82048d2-da2c-8e54-a164-02a1db9a5532

---------

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

* fix: verify retained child results in the Ultra live check (#208026)

Read the matched child’s retained result after delivery and verify its run ID before checking the handoff token.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: bbaa86d0-6a79-4155-b69e-2701a35c57bd

* fix(ui): open the selected agent’s chat while reconnecting (#202680)

* fix(ui): open the selected agent chat while reconnecting

* fix(ui): open the selected agent’s chat while reconnecting

OpenClaw-Publication: 722da459-2f0c-4a1a-ac47-0e1899d47f20

* fix: give the installed Codex progress-reply test a conversation to reply to (#208063)

Create the isolated session with internal delivery before starting the installed agent. The transient WebChat flags alone do not advertise a message tool.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: fdae7386-bdc9-4280-9e3e-a18ba8cea046

* fix: run the live trajectory export check against the built gateway (#208038)

Start a built Gateway for the live trajectory export test so the Codex plugin reads the configuration prepared by the Gateway. The test still requires an exact model reply, one-time export approval, and a bundle containing runtime and transcript events.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 055248a1-a1f2-441c-8237-58ff6cee3893

* fix: stop repair notices when their automation is removed (#208036)

Check the automation's ID and creation time before its repair notice continues. Deleting the automation stops the notice from resending its run history to the model. Ordinary edits let the notice finish.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 5d0644b7-f674-4578-ae3f-16f44b3b0e6d

* fix: restart launcher-managed Gateways after exit 78 (#207972)

## What Problem This Solves

A launcher-managed Gateway that exits 78 outside an update trial leaves the serving release down permanently.

## User Impact

The resident launcher now restarts that child with its existing crash backoff (1, 2, 5, 10, then 30 seconds). Trial configuration refusals still roll back. Direct-Gateway systemd services retain `RestartPreventExitStatus=78`. Launcher format 4, trial v2 and IPC bytes are unchanged. The existing launcher writer refreshes an installed file when its bytes differ, while preserving newer launcher formats.

## Why This Change Was Made

Delete the terminal non-trial exit branch rather than add another restart mechanism. Simplification retained the two-line deletion, one byte comparison in the existing writer, migrated lifecycle/replacement regressions and launcher-managed documentation. Production: -2 lines net; tests: +18 net; docs: +2.

## Evidence

- vitest-source, 600-second bounds: the migrated launcher test failed on unchanged main production code because the launcher exited before the first 1-second restart timer; the other 15 launcher tests passed.
- Immediately after the deletion, launcher and frozen-contract tests passed: 19 tests, including unchanged trial-78 rollback assertions and format-4 ready/stop exchange.
- Fake clock checks no child starts before each 1/2/5-second deadline and another child starts at each deadline.
- Focused Oxlint passed; formatter output matched the test file.
- Installed format-4 stale-content regression failed before the byte comparison: the old content remained. The replacement test also verifies a second identical write does not replace the file and newer launcher formats remain untouched.
- Rendering is deterministic: only static constants, flag arrays and source constants are interpolated; no timestamp, PID or install path enters the rendered bytes.
- Header-reader audit on main and shipped `v2026.12.1-beta.1`: `writeLauncher` previously replaced only older formats; `writeGitReleaseLauncher` preserves all formats >=2. A downgrade to the beta-era writer therefore still preserves an installed format-4 launcher as before. The frozen format-4 peer test remains unchanged.
- Prior-head [CI](https://github.com/openclaw/openclaw/actions/runs/46228136551) and [update-restart-auth package acceptance](https://github.com/openclaw/openclaw/actions/runs/46228140802) passed on `c5ad15b432742fc4b8b5455f7f4a512f2a291953`; byte-refresh repair requires fresh hosted evidence. No full local build was run per task scope.

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

* fix: keep sandbox commands working when workspace scratch is not writable (#208005)

Use the container's private /tmp when the sandbox user cannot write the default workspace scratch directory. Keep explicit temp paths and workspace permissions intact.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 31357588-6850-4ea3-a68d-52e744874a24

* fix(gateway): invalidate session history when a transcript publication rejects (#208051)

## Problem

When a transcript publication rejects, Gateway clients that follow the session get no event. Examples: a synchronous projection read throws `SessionRowFactsPending` (the count-sequence fallback fixed by #208004), the history worker fails with a non-overload error (`readSessionMessageByIdAsync` rethrows it), or event-row preparation fails. The Gateway logs `Transcript update dispatch failed` (`src/gateway/server-runtime-subscriptions.ts`) and publishes nothing: no `session.message`, no `sessions.changed`. The open chat stays stale until something else refetches it.

Log signature, reproduced on main: `Transcript update dispatch failed` with `Session row facts require worker reconciliation` (seen in CI runs of `session-message-events.history-worker.test.ts`; root cause in #208004). Any other rejection in the handler loses events the same way.

## Fix

`createTranscriptUpdateBroadcastHandler` already runs every transcript publication in its per-session queue. When the publication rejects, the queue now emits the existing history invalidation: `sessions.changed` with `phase: "message"` and no `messageId`/`messageSeq`. It goes to the same audience as a normal publication (session-event and message subscribers, `canReceiveSessionEvent` authorization, private scope for retired unqualified owners). Then it rethrows, so the existing warning and the live-source fallback stay.

- No new protocol field, event or schema. The protocol docs (`docs/gateway/protocol/rpc-bootstrap-and-events.md`) already say "Refetch history on that invalidation". Clients refetch on it: Control UI `ui/src/pages/chat/chat-state-events.ts`, Apple `ChatViewModel+TransportEvents.swift`, Android `ChatController.kt`.
- If the invalidation itself throws, the rethrown `AggregateError` carries both errors, so the existing warning logs both.
- Accepted edges:
  - A pending assistant error keeps its existing deferral, so no early error row appears.
  - A legacy marker-only update has no session key and stays log-only.
  - A rejection after a `session.message` was sent causes one extra, harmless refetch.
- Out of scope: lifecycle and background-process row handlers. They publish row snapshots, and their resync would be a row invalidation, which is a different signal.

## Users

| PR | Users | Failure class | Evidence |
|---|---|---|---|
| this | Gateway clients following a session (Control UI, iOS/macOS, Android, SDK) | silent stale chat after a rejected transcript publication | `server-runtime-subscriptions.ts` catch logs only; new tests red on main |

One-shot CLI runs do not use this publisher, so they are not affected.

## Evidence

- `session-message-events.history-worker.test.ts` "invalidates selected-session history when a transcript publication rejects": the history worker read rejects with a generic error. The client receives `sessions.changed` (`phase: "message"`, no `messageSeq`), and `chat.history` returns the committed message. Red on main (120 s timeout, no event), green with the fix.
- `server-session-events.recovery.test.ts` "invalidates history and keeps the rejection when a transcript read fails": the handler still rejects with the original error (the caller's warning path) and broadcasts once. Red on main, green with the fix.
- Production +55/-9 (one shared audience helper replaces the inline loop); tests +64.

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

* fix(workboard): open the board in app from dashboard widgets (#199922)

* fix: keep confirmed sends in the receiving chat's model history (#208049)

Supersedes #207992.

## Problem

An isolated automation turn (`gateway call agent` with its own session key, `channel: telegram`, `to: <dm>`, `deliver: false`) sends a Telegram DM with the `message` tool. The user sees the message, replies, and the DM's assistant has no record of it.

Cause: `commitConfirmedVisibleMessage` decided "the producer's own turn already wrote this" by comparing the producer session's stored `delivery.context` with the send address (`createProducerMatcher`), and returned a silent skip. The gateway `agent` request stores its `channel`/`to` routing hint on the isolated session even with `deliver: false`, so the hint matched the DM address and the DM history write was dropped.

## Fix

- Own-turn is decided only by conversation identity: canonical store key of the producer === canonical store key of the resolved destination. The address matcher and both call sites are removed.
- Every remaining not-recorded outcome carries a diagnostic (`skipped()` now requires one).
- The unused `skipDestinationHistory` opt-out is removed (`deliver-contracts.ts`, `message.ts`, `deliver-core.ts`, its test).
- `docs/refactor/conversation-transcript-ownership.md` describes own-turn by key only.

Production diff: 5 files, net negative.

## User impact

A message the user saw from an automation or another session now lands in the destination chat's model history. A same-chat turn's own final reply still gets no second row. No config, schema, protocol or migration change.

## Evidence

- Red on base, green here: `src/sessions/confirmed-visible-message.integration.test.ts` "records an isolated producer's send despite matching DM routing hints=true". The test that asserted the old "context" skip is deleted.
- No duplicate on the real dispatch path (`src/auto-reply/reply/dispatch-visible-history.integration.test.ts`): Telegram DM with `dmScope` `main` and `per-channel-peer`, Telegram forum topic, Discord channel, Control UI/webchat. Each resolves the same outbound route key as the inbound session, so no key-parity fix was needed.
- Affected consumer tests (30 files) passed locally.
- Real Telegram (Test Server, real model), base `2774acd2d7db`: the isolated producer's DM arrived once; the DM transcript and the DM agent's next model request did not contain it, and the agent answered with an older reply.
- Real Telegram, head `ee6eed48a208` (same entry point): `gateway call agent` with `sessionKey: agent:main:bedtime-e2e`, `channel: telegram`, `deliver: false`; the agent sent "It's 10:15 pm, time for bed. The amber bookmark can wait until morning." once with the `message` tool. The DM session (`agent:main:main`) then had that text as one assistant row (no duplicate). The user asked "what did you just send me?" and the DM agent answered: "I just sent: “It's 10:15 pm, time for bed. The amber bookmark can wait until morning.”"
- Local ClawSweeper review on `ee6eed48a208`: patch correct, zero findings.
- CI: every check passed except `check-lint-core-5`, which fails on three lint errors in Workboard e2e files from #207839 that are on `main` and not in this diff (#208070; override comment on this PR).

## Not changed here (decision recorded)

Plugin-action settlement (`outbound-send-service.ts` `onHandled`): a base test showed a plugin action that sends through durable delivery and also returns a native receipt can write two destination rows (different `deliveryId`s). Deleting the `onHandled` writer would drop history for third-party handlers that send natively and return only a receipt. Routing those through delivery settlement is a new design, so it is a follow-up, not part of this cut.

## Follow-ups

- Exactly-once native receipt settlement that keeps receipt-only plugin handlers.
- Registry-first destination resolver; sessions not created by inbound must not claim chat addresses (removes the "ambiguous" skip).
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the owner: Telegram `bot-message.ts`, `dm-access.ts`, native command replies; Discord `native-command-reply.ts`; Signal/Matrix approval handlers.
- Inbound "accepted ⇒ in transcript" for queue drop/summarize paths; failed-delivery and overlap-dedupe history on the agent side.

## Merge risk

Revert restores the old skip. Rows already appended stay.

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

* fix(qa): run the live log tail browser test again (#208020)

Point the live log tail scenario at the consolidated auto-follow browser test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 34b4a470-dfdd-48fb-aaba-59aec526e812

* fix: check managed child delivery in the Codex live suite (#208011)

Check that the parent receives the UUID chosen by its managed child. Let the Docker live suite use the Gateway's delegation defaults.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 7f1bb837-8d14-46f3-82e5-8aa559e33b3e

* improve: speed up Doctor database repair tests (#208103)

Build the healthy migrated agent database once for the repair guard table. Give each case an independent file, registry, and maintenance lease so it still exercises the real defect, repair, and clean recheck.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: f5bae5e0-5d87-4d07-9178-2e4ab0ca2637

* fix(gateway): keep count-path session updates through store discovery (#208004)

## Problem

Scheduled CI kept failing `session-message-events.history-worker.test.ts` (count case, "after worker overload"): 5 of 15 scheduled runs, most recently run 46220607204. After #207862 the case waits the full 120 s test limit, so the event was missing, not late.

A traced CI sample (PR CI, Linux x64, Bun) showed the stop: after the transcript update, the count publication never reached `readSessionMessageCountAsync`, and a `chat.metadata.changed` from a session-store topology change arrived in the same window. A local repro then showed the cause:

```
Error: Session row facts require worker reconciliation
    at readSessionRowEntry (src/gateway/session-row-projection-materialize.ts:460)
    ...
    at selectSessionRowEntries (src/gateway/session-row-scope.ts:551)
```

`handleTranscriptUpdateBroadcast` (`src/gateway/server-session-events.ts`) assigns a cursor sequence to updates that arrive without `messageSeq`. To do that it prepared membership with its own loop and then called `projection.selectEntries()` synchronously. When store discovery runs inside that loop, the row's entry is still unread, so selection throws `SessionRowFactsPending`. That error means "re-enter through exact worker preparation". The handler did not handle it, so the publication failed and clients got neither `session.message` nor `sessions.changed`. The update was lost until the next refetch.

## Change

The count fallback reads its row through the session event publication rows (`sessionEventPublicationRows(projection).withReadyRows`, metadata only), the same owner `withPreparedEventRow` uses. It reaches `withPreparedExactRows`, which prepares membership and retries `SessionRowFactsPending`. The hand-written `prepareMembership` loop is removed.

Known edge, left as is: other throws before publication still reject the update. Only worker overload turns into a `sessions.changed` invalidation. That is a wider change and is not part of this fix.

## Who sees it

Gateway clients that follow a session (`sessions.messages.subscribe`, for example the Control UI) and receive transcript updates without `messageSeq` (`server-session-events.ts`, count fallback), while session-store topology changes (a store added, removed or rediscovered). One-shot CLI runs do not follow session events and do not see this.

## Evidence

- New test `delivers a count-path session update when the store topology changes`: emits a store topology change, then a transcript update without `messageSeq`. Red on base (120 s timeout, 3 of 3 runs), green with the fix (3 of 3, no memo).
- The CI shape (overload case plus store topology churn): 10 of 10 red on base, green with the fix.
- Existing history-worker overload cases and the session event consumer suites pass.
- What starts the store topology change during the CI run is inferred, not traced. The CI trace shows the publication stopping before the count read, with a `chat.metadata.changed` in the same window. The local repro with an explicit topology change gives the same signature and the stack above.

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

* fix: keep Telegram login tests independent of startup speed (#208106)

Wait for the Telegram progress note before checking lane ownership. Release both fixture gates on assertion failure so a slow login cannot spill into the next test.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 177934d0-1fb5-4a06-beb2-10916a09ee47

* fix(release): identify jobs blocking child evidence sealing

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

* fix(release): clarify pinned FRV recovery eligibility

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

* fix(ci): add tagged reply control to the PR wrapper inventory (#208120)

* fix(android): keep the snooze deadline test independent of runner timing (#208097)

Advance the handset and Gateway clocks together during the post-save refresh. Check the exact deadline sent to the Gateway and the wake time returned to the handset.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 6fb940cc-e4ef-4c8f-94a9-060a736f8c11

* test(process): keep cancel parity off execa's force-kill race (#208126)

## Problem

Scheduled CI run 46234040123 (checks-node-compact-large-42, shard core-runtime-infra-process-hosted-2) failed `src/process/spawn-broker/execa.test.ts > broker command transports > matches buffered cancel results and errors`:

```
-   "isForcefullyTerminated": true,      (direct execa, the reference side)
+   "isForcefullyTerminated": false,     (spawn broker)
    "isCanceled": true, "signal": "SIGTERM"   (both sides)
```

Both sides agree that the command was canceled and that the child exited on SIGTERM. Only the reference side, which calls `execa` directly in the test process, said "forcefully terminated".

Cause: execa starts a `forceKillAfterDelay` timer when it sends SIGTERM (`execa/lib/terminate/kill.js` `killOnTimeout`). If the parent event loop stalls longer than the delay before it reaps the exited child, the timer fires first. `kill('SIGKILL')` then succeeds on the unreaped child and sets `isForcefullyTerminated`, even though the child already exited on SIGTERM. The fixture used a 50 ms delay for every case, so a loaded runner can hit this race.

Reproduced with direct execa 10.2.1, outside the broker: cancel a SIGTERM-honoring child with `forceKillAfterDelay: 50`, then block the event loop for 200 ms in a `setImmediate`. Result 3/3: `signal: "SIGTERM"`, `isCanceled: true`, `isForcefullyTerminated: true`. With no stall, `isForcefullyTerminated` is `false`.

## Change

Test-only. Children that honor SIGTERM get a 5 s force-kill delay, so the timer cannot win the race. These children exit at once, so the tests take no longer. The `forced cancel` case ignores SIGTERM and keeps its 50 ms delay, so it still proves forced termination matches across the broker and direct execa.

## Impact

No product change. Process cancellation results stay correct: in the failing run the broker reported a cancel as a cancel (`isCanceled: true`, `failed: true`). The mismatch was the reference side's timer race.

## Evidence

- CI failure: https://github.com/openclaw/openclaw/actions/runs/46234040123/job/141256229744
- No `src/process` change in the window 11df80a4..3b24ff7c.
- Before the change: 5/5 green locally with load average ~39 (the race needs a stall over 50 ms).
- After the change: `execa.test.ts` full file 5/5 green, 27 passed, 3 skipped.

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

* test(state): keep schema modules out of read-only agent database access (#185841)

* fix(state): avoid eager writer imports in agent database reads

* test(state): keep schema modules out of read-only agent database access

* chore(release): close out 2026.11.11 on main (#208114)

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

* fix(outbound): record a plugin action's visible send once (#208130)

Follows #208049.

## Problem

A plugin `send` action can write the same visible message into the destination chat's model history twice.

Telegram's action handler sends through `sendDurableMessageBatch`. Durable delivery records the confirmed send (`deliver-core.ts` `recordConfirmedTranscript`, key `outbound-delivery:<queue id>:0`). The handler then returns a native receipt, and `outbound-send-service.ts` `onHandled` records it again (key `outbound-delivery:<deliveryIntentId ?? idempotencyKey ?? uuid>:0`). The two keys differ, so the destination gets two identical assistant rows. The model then sees one message the user saw once as two messages.

On real Telegram the second row appears when the destination resolves without ambiguity, for example when the producer session does not carry a `channel/to` hint for the DM. (In #208049's E2E the producer carried that hint, so the durable write was skipped as "multiple current destinations match" and only one row landed.)

## Fix

One plugin action is one send, recorded once.

- `executeSendAction` runs the plugin action inside `runPluginActionHistoryScope(…)`.
- `commitConfirmedVisibleMessage` (the history owner) marks the scope when it actually adds a row.
- The action's receipt commit (`onHandled`) skips when the scope is marked: the handler's core-delivery send already recorded the message.
- Core delivery keeps its own queue identity for the row, so restart recovery (which re-commits with the queue entry id) still finds the existing row.
- Receipt-only handlers (send natively, no core delivery) are unchanged: nothing marks the scope, and `onHandled` writes their one row.
- If the core-delivery commit is skipped (for example an ambiguous destination), the scope stays unmarked and `onHandled` still writes with the caller's route, as before.

Why a scope and not a new field: `ChannelMessageActionContext` has no delivery identity field, and each plugin forwards context fields to its runtime by hand (Telegram lists them in `channel-actions.ts`). Threading an id would be a new public Plugin SDK field that every third-party handler must forward. The scope reaches any handler that sends through core delivery, with no SDK change. No config, stored state, table or hook.

Review round 1 changed the mechanism: an earlier head replaced the core row's id with the action id, which broke dedupe on restart recovery (recovery commits under the queue entry id). This head keeps the queue id.

## User impact

A message sent through a plugin action (Telegram `message` tool sends, for example) appears once in the receiving chat's model history, exactly as delivered. No config, schema, protocol, stored-row or SDK change.

## Evidence

- Red on base, green here: `src/infra/outbound/outbound-send-service.integration.test.ts` "records a plugin action's durable send in destination history once" (base: two identical rows).
- Stays green: "records a receipt-only plugin action in destination history once".
- Consumer tests: 19 files passed locally (one `ocx test` set, vitest-source): the new test, `outbound-send-service{,.accepted-outcomes}.test.ts` (their module mocks now pass the scope through), `deliver.test.ts`, `deliver-confirmed-visible.test.ts`, `delivery-queue.transcript.test.ts`, `confirmed-visible-message.integration.test.ts`, `message-action-send{,.core,.media,.mirror-order,.validation}.test.ts`, subagent announce delivery/mirror tests, Telegram `action-runtime.test.ts` + `channel-actions.contract.test.ts`, Discord `actions/runtime.test.ts`, Slack `action-runtime.test.ts`, `test/qa-channel-message-tool-delivery.test.ts`.
- Real Telegram (Test Server, source Gateway) on head `c33cd7f46b40`: the DM user first got a reply ("READY"), so the DM session existed. Then `gateway call agent` ran with an isolated `sessionKey`, `deliver: false` and no `channel`/`to` hints. Its `message` tool sent one marker DM to the user. Results: the recorder saw 1 marker message, and the DM session (`agent:main:main`) had 1 assistant row for it. That row's key is the core-delivery queue id (`outbound-delivery:<uuid>:0`), so the handler's durable write recorded it and the receipt commit skipped. The Gateway logged no "multiple current destinations match" line, so the run took the path that wrote two rows before this fix. The model fixture was deterministic, so the tool call was predictable. Telegram transport and transcript were real.
- Local review: round 1 found the recovery-identity problem described above (fixed). Round 2 on `c33cd7f46b40`: patch correct, no findings.
- Rebased on main to pick up #208120: the base had #207738 without its PR-wrapper inventory fix, so `test/scripts/eager-import-closure.test.ts` was red.

## Follow-ups (out of scope)

- Registry-first destination resolver; remove the "ambiguous" skip.
- Store the not-recorded reason on the delivery queue row (schema change).
- Route direct channel notices through the history owner.
- Inbound "accepted ⇒ in transcript" guarantees.
- Failed-delivery history.

## Merge risk

Two-way door. Revert restores the duplicate row. No stored format change; the idempotency key format is the same, only which id fills it inside a plugin action. Blast radius: plugin-action sends that also go through core delivery (Telegram today).

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

* fix: let a fallback model finish after Code Mode reads

Allow the configured fallback model to finish after a completed Code Mode cell when every host call has a successful read receipt and qualifies for direct retry. Shell writes, unfinished cells and plugin lookups without an audited replay classification still block fallback.

Closes #207895

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: d49db423-f997-43b6-b23c-4d0be08459c0

* fix: let older automations read their conversation's memory (#208143)

## What Problem This Solves

Automations created before OpenClaw recorded the creating conversation (every job without `sourceConversation`, i.e. created before #179062) name that conversation only by session key. Their scheduled runs get no memory at all: every `knowledge_*` or memory tool call fails with "the host granted this session no memory audience", and the Gateway logs `memory audience unavailable: root session agent:<agent>:cron:<job>:run:<run> has no durable chat type`. The same runs still hold owner-only tools such as `exec`. A production automation that reads and writes the owner's knowledge vault every week hit this on every run.

## User Impact

- A key-only detached automation (`isolated` / `current`) now reads its conversation's current memory, the same way a bound automation does:
  - created in the owner's direct chat: the owner's private memory;
  - created in a group or channel: only that conversation's memory, never owner-private.
- When the job recorded a requester (profile or channel sender), that requester's owner status is checked at each occurrence first; without one, the run's existing owner bit decides, as it already does for the run's tools.
- If the conversation row is gone, archived or cannot be read, the run proceeds exactly as before (no memory, no pause, no failure).
- Board, workspace, sandbox, event target and the run's tools are unchanged. `main` and `session:<key>` targets are unchanged.
- `automations bind` stays available for the exact-incarnation link but is no longer needed for memory. Docs (`cli/cron` "Binding older jobs", `automation/cron-jobs/payloads`) and Doctor's unbound note say so.

Accepted edge case: a key-only run whose agent sandbox mode is `non-main` or `all` now gets owner-private memory it did not have, when the job was created in the owner's direct chat. The owner created these jobs in their own DM, and the run already holds owner authority.

## Why This Change Was Made

`resolveScheduledPrincipal` classifies these jobs as `unbound-parent` and gives them legacy owner authority, but `buildScheduledExecutionContext` pointed their memory at the cron run row, which never has a chat type, so the memory resolver always denied. The fix stays in the existing owner:

- `admitScheduledOccurrence` (`src/cron/execution-context-admission.ts`): for an `unbound-parent` principal on a detached run, read the key-linked conversation row once. A failed read becomes "no row". No generation lease, workspace binding, sandbox or pause change. A recorded requester is admitted per occurrence through the existing `admitScheduledRequesterGrant`.
- `buildScheduledExecutionContext` (`src/cron/execution-context.ts`): with a live row, memory becomes `{ source: "parent", parent: <current sessionKey/sessionId/lifecycleRevision>, owner }`. Everything else for `unbound-parent` is unchanged.
- The memory resolver (`src/plugins/memory-audience.ts`) does not change: it already maps a direct root + owner to owner-private and direct/group/channel to that conversation's partition, for both the embedded and the CLI runtime.
- `scheduledParentKeyOf` now derives the key from `resolveScheduledPrincipal` itself, so Doctor's access review and the development replay read the same row the runtime does; the replay vector (`execution-context-projection.ts`) already labels the memory gain as intended, so it needed no edit.

Not changed: Doctor auto-bind or any stored-row write, jobs with no parent key, bound jobs with no recorded requester. On current `main`, bound jobs keep following their conversation after a reset (#205887), so no reset-degraded path exists to special-case.

## Evidence

Real-admission tests (red on the merge base `65d94342e813`, green on this head; 6 tests failed on base, all pass on head):

- `execution-context-memory-audience.test.ts` (real admission → registry → embedded and CLI resolvers): key-only owner-DM job → owner-private; key-only group job → that group's conversation only; key-only job with a revoked recorded requester → conversation only; key-only job whose conversation is gone → no audience, run admitted.
- `execution-context.test.ts`: key-only detached job gets parent memory and nothing else (board/workspace/sandbox stay the run's); archived, removed and in-session (`session:<key>`) cases keep run-session memory.
- `execution-context-admission.test.ts`: key-only read takes no generation lease; a failed read still admits the run with its own memory.
- `isolated-agent/run.bind-parent.test.ts` (real cron service + timer): the unbound job now reaches its conversation's memory, without a run-row receipt.

Local runs: the 27 test files that import the changed sources passed (`ocx test`, 6 shards). `pnpm check:changed`: typecheck, lint, guards all ok; the dead-export scan fails only on files this PR does not touch (`src/agents/command/types.ts`, `src/plugins/native-module-require.ts`, `ui/src/...`, `src/gateway/server-methods/update.test-harness.ts`), same as `main`.

End to end, scratch Gateway from source, `plugins.slots.memory: "knowledge"`, real model (`openai/gpt-5.5`). An owner Control UI direct chat was created by one real `chat.send` (row `chatType: "direct"`). A key-only isolated `agentTurn` job (owner key = that chat, no `sourceConversation`, no recorded requester, no tool policy, `toolsAllow` incl. `knowledge_remember`, `knowledge_grep`, `exec`) fired from its own `at` schedule about two minutes ahead (no forced run).

Base (`65d94342e813`):

```
[agent/embedded] memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```
```
knowledge_remember: "Knowledge access unavailable: the host granted this session no memory audience. The Gateway log entry "memory_audience_denied" for this session names the reason and its repair."
knowledge_grep: "Knowledge access unavailable: the host granted this session no memory audience. ..."
```

Head: no `memory audience unavailable` line in the Gateway log; the run's result:

```
knowledge_remember: inserted claim <claim-id>.
knowledge_grep: 1 hit — <claim-id>: "The owner's favorite tea is masala chai."
```

The claim was written under the store's `vault/private/` (owner-private).

Observed, not changed here: a session created only through `openclaw agent --session-key agent:main:main` from the CLI has no `chatType`, so a key-only job linked to such a row still gets no memory (Doctor already lists these under "no stored chat type"). Channel DMs and Control UI chats record `chatType: "direct"`.

Merge danger: two-way door. No schema, stored-row, config or protocol change; a revert restores the previous memory decision. Blast radius: memory audience of detached scheduled runs whose jobs have no `sourceConversation` but an owner/policy session key.

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

* fix(qa): let Matrix message-action checks run in creator-owned v12 rooms (#208029)

Verify the room creation event before exercising all five Matrix message actions. The homeserver authorizes the pin, and the observer verifies the event and final pinned state.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 4fd4ac3e-941b-4a56-8f9a-a0a6df7a5cae

* fix(workboard): clear lint errors in the board settings modal (#208113)

## Problem
`main` has two lint errors in `extensions/workboard/browser/pages/workboard/view-board-modal.tsx`, from #207839:
- `:218` `eslint(no-shadow)`: the save-time `columns` shadows the `columns()` accessor.
- `:497` `eslint(curly)`: the fallback-column `for-of` has no braces.

`main` CI skips `check-lint-*` for that push, so it stayed green. PRs that change `.github/workflows/ci.yml` run the full lint on the merge ref and go red (for example #207954, job `check-lint-core-5`).

## Change
- Rename the save-time variable to `changedColumns`. The request payload is unchanged: `{ columns: changedColumns }`.
- Brace the loop.

No behavior change.

## Evidence
- `pnpm exec oxlint <file>` on `main`: 2 errors (`no-shadow`, `curly`). With this change: 0 errors.
- `oxfmt --check`: clean.

## Also fixed (same class: `main` defects that `main` CI skips)
- `scripts/pr-lib/wrapper-components.txt` was missing `src/auto-reply/reply/tagged-reply-control.ts` (runtime import added by #207738), so `eager-import-closure.test.ts > keeps the PR wrapper inventory closed over runtime imports` fails on PR merge refs. Added the one line in sorted position. Test: 1 passed.
- Merged the latest `main` so the Control UI controller guard no longer compares against an old base that includes #207792's `chat-pane-shared.ts`.

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

* fix(telegram): stop false "delivery failed" alerts when a topic automation posts its report with the message tool (#208102)

Root cause: src/channels/conversation-resolution.ts:405 `deliveryRoutesShareConversation` returned "unknown" when a sent route's `to` already names a topic and an explicit threadId names the same topic, so `sourceDeliveryTargetsMatch` fell back to a raw compare that never matches the canonical automation target `<chat>:topic:N` + threadId N.

Fixes #208082


## What Problem This Solves

An automation that runs in a Telegram topic's session and is delivered to that topic posts its report with the `message` tool, but the send is not credited: the run is recorded `not-delivered`, and when the turn ends without reply text it is marked `failed` and the user gets a "delivery failed" alert for a message that arrived.

## User Impact

A send that reaches the planned topic counts as the delivery, so these runs are `delivered` and `succeeded` and the false alerts stop. A send to a different topic still doesn't count. The same matcher credits subagent completions and dedupes replies, so those paths stop missing topic sends too. No config or migration.

## Why This Change Was Made

The automation's planned target names its topic twice (`<chat>:topic:<N>` plus `threadId: N`): that is the canonical form the cron delivery resolver and Telegram's own `resolveDeliveryTarget` produce. `deliveryRoutesShareConversation` treats a route sent as given whose `to` encodes a thread and which also carries an explicit thread as ambiguous (#198934: core can't tell which one the send path uses) and returns "unknown", so `sourceDeliveryTargetsMatch` falls back to a raw string compare that fails. When the explicit thread is the thread `to` already encodes, the…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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