Skip to content

fix: let older automations read their conversation's memory - #208143

Merged
obviyus merged 1 commit into
mainfrom
fix/cron-key-only-memory
Nov 29, 2026
Merged

obviyus merged 1 commit into
mainfrom
fix/cron-key-only-memory

Conversation

@obviyus

@obviyus obviyus commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

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.

Jobs that name their conversation only by session key (no sourceConversation) resolved memory from their cron run row, which has no chat type, so knowledge and memory tools always failed with memory_audience_denied while the same run held owner-only tools.

Occurrence admission now reads the key-linked conversation row once for detached runs, and the context builder points memory at that conversation's current incarnation. A recorded requester is checked per occurrence for the owner bit; without one the run's legacy owner bit decides. A missing, archived or unreadable row keeps run-session memory and never pauses or fails the run. Board, workspace, sandbox and in-session runs are unchanged.

Co-authored-by: obviyus <[email protected]>
@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 commands Command implementations size: M labels Nov 29, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. impact:auth-provider Auth, provider routing, model choice, or SecretRef resolution may break. impact:session-state Session, memory, transcript, context, or agent state can drift or corrupt. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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 lets detached automations linked only by conversation key inherit that conversation’s memory without binding their other resources.

Example: An older weekly automation linked to an owner’s direct chat remembers and searches for “The owner’s favorite tea is masala chai.”

  • Before: Both knowledge calls fail because the cron run has no memory audience.
  • After: The automation writes the claim to owner-private memory and finds it on search.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused implementation with supplied shipped-path evidence, distinct boundary tests, and no blocking findings; tests were inspected but not executed during this read-only review.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (logs): Supplied Gateway and tool output exercises a naturally scheduled key-only job through the embedded runtime and demonstrates successful private-memory write and read after the change; CLI, group, and revoked-requester coverage is in-process rather than live.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Older detached automations cannot use native memory tools even though their linked conversation has accessible memory.
Reason: Automatic memory inheritance changes an intentional legacy policy, and the collaborator-authored PR supplies both the owner decision and a concrete production use case.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR makes a useful, explicitly authorized change to legacy automation memory access; no blocking defects were found.

Reviewed head: 7895c8972a2846e24604e1ce1290f963b263ce74

Before merge

None.

Findings

None.

Agent review details

How this fits together

Cron admission reads the stored job and conversation facts, builds occurrence-specific resource scopes, and passes the memory parent through the run registry to the shared embedded and CLI memory resolver.

flowchart LR
  A[Stored automation] --> B[Occurrence admission]
  C[Conversation row] --> B
  D[Requester admission] --> B
  B --> E[Execution context registry]
  E --> F[Embedded and CLI resolver]
  F --> G[Scoped memory provider]
Loading

Technical review

Best possible solution:

Keep memory inheritance in the existing occurrence context and shared resolver, preserving the legacy jobs’ other resource decisions.

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

Current main assigns key-only jobs run-session memory, and the shared resolver denies native memory for cron rows without a durable chat type; the body supplies matching base Gateway output.

Is this the best way to solve the issue?

The change is focused and uses existing owners; binding already provides broader resource inheritance, whereas this change supplies memory without moving the job’s workspace or changing its pause behavior.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 5b7efcd4c02e.

Provenance checked

  • Key-only automation resource policy changes intended behavior with a stated reason (240a90e: Preserve legacy decisions for jobs lacking an exact parent link; feat(cron): bind older automations to the conversation that created them #182561 subsequently provided authenticated binding as the explicit transition.)
  • Scheduled memory audience changes intended behavior with a stated reason (ddbf65c: Give linked scheduled runs their parent’s memory while capping private access by the occurrence’s requester authority.)
  • Requester admission keeps the original intent (86d835e: Admit legacy scheduled requesters through the central operator-admission owner when work starts.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned change and current main: The introduced diff adds memory inheritance for detached unbound-parent jobs; fetched main retains the previous run-session memory decision. (src/cron/execution-context.ts:454, 7895c8972a28)
  • Existing admission owner: Recorded profile and channel requesters use admitScheduledRequesterGrant when the run starts; the memory decision consumes that result without adding tool-time authority checks. (src/cron/execution-context-admission.ts:288, 7895c8972a28)
  • Intentional prior behavior: feat(cron): bind older automations to the conversation that created them #182561 deliberately kept key-only jobs unbound until an authenticated bind; this PR explains and authorizes changing memory alone while retaining the other resource decisions. Public docs: docs/cli/cron.md. (docs/cli/cron.md:176, 6f3ac84c9a60)
  • Supplied live behavior evidence: The full PR body records an isolated source Gateway, a real model, a naturally scheduled key-only job, base memory denials, and successful head knowledge writes and reads under vault/private. (7895c8972a28)
  • Accepted access change: The maintainer-authored body explicitly accepts owner-private memory for qualifying legacy jobs even under non-main or all sandbox modes; the diff leaves sandbox, workspace, tools, and persisted rows unchanged. (src/cron/execution-context.ts:457, 7895c8972a28)
  • Current checks: The reviewed head has no reported failing checks; check-lint-core-5 and checks-node-changed-compact-large-10 remain in progress, and openclaw/ci-gate remains pending. (7895c8972a28)

Likely related people:

  • Josh Lehman: Raw commit 240a90e adds src/cron/execution-context.ts:246 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 240a90ef9f95; files: src/cron/execution-context.ts)
  • Ayaan Zaidi: Raw commit 86d835e adds src/cron/execution-context-admission.ts:277 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 86d835ec3a33; files: src/cron/execution-context-admission.ts)

PR surface

Source +37, Tests +123, Docs +10. Total +170 across 10 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 63 26 +37
Tests 4 133 10 +123
Docs 2 12 2 +10
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 208 38 +170

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.

Labels

Label changes:

  • add merge-risk: 🚨 compatibility: Existing key-only jobs automatically gain conversation memory, including owner-private memory where eligible; the maintainer-authored PR explicitly accepts this change from the previous binding requirement.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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:

  • merge-risk: 🚨 compatibility: Existing key-only jobs automatically gain conversation memory, including owner-private memory where eligible; the maintainer-authored PR explicitly accepts this change from the previous binding requirement.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

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, 3:28 AM ET / 08:28 UTC.

@obviyus
obviyus merged commit 9143f38 into main Nov 29, 2026
139 checks passed
@obviyus
obviyus deleted the fix/cron-key-only-memory branch November 29, 2026 08:30
@obviyus

obviyus commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in 9143f38. Automations that name their conversation only by session key now read that conversation's current memory on detached runs (owner-private from the owner's direct chat, conversation-only from a group). Proof: 6 real-admission tests red on the base and green on the head, plus a scratch Gateway E2E where the same key-only job failed every knowledge tool with memory_audience_denied on base and wrote/read an owner-private claim on head.

obviyus added a commit that referenced this pull request Nov 29, 2026
…8190)

## What Problem This Solves

Follow-up to #208143. Some automations were created before OpenClaw recorded `owner`. These jobs record their creating conversation only as the job's top-level `sessionKey`: no `owner`, no `scheduledToolPolicy`, no `sourceConversation`. `resolveScheduledPrincipal` ignored that field, so it classified the jobs as `operator` (`unlinked-legacy`). Their runs got no memory, but they still held legacy owner authority. Every `knowledge_*` call failed, and the Gateway logged:

```
memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```

A production job hit this on every daily run. It was created by the agent in a Telegram group: `sessionTarget: "isolated"`, `agentTurn`, `toolsAllow` includes `knowledge_grep`/`knowledge_record`, `callerOrigin: unknown`.

## User Impact

- A detached (`isolated` / `current`) job that names its conversation only by top-level `sessionKey` now reads that conversation's current memory. #208143 gave key-only jobs the same path:
  - created in a group or channel: only that conversation's memory;
  - created in the owner's direct chat: the owner's private memory.
- Unchanged for these jobs: placement stays `detached`, authority stays legacy owner, the automations scope stays `self`, and board, workspace, sandbox and event target stay the run's own. If the conversation row is gone or archived, the run keeps going as before, with no memory.
- These jobs are now `unbound-parent`. As a result, `automations bind` accepts them, and Doctor lists them under "not bound … recorded by key only" instead of skipping them. This is intended.
- Unchanged: jobs with a `trusted` policy, and jobs that run inside a session (`main`, `session:<key>`). For these, the top-level `sessionKey` is the run's own lane, not a creating conversation. The setup-created proactive job (`session:<main>` + `sessionKey`) and heartbeat monitors migrated to `session:<key>` stay `operator`, so Doctor does not report them as unbound.
- `cron.add --session-key` from an operator, for a session that does not exist yet, still stores a top-level `sessionKey` with no `owner` or `sourceConversation`. Such a job now reads that session's memory once the session exists. An authenticated operator linked that session, and the run already holds operator/owner authority, so the memory matches. If the session exists when the job is created, `cron.add` already captures `sourceConversation`, and nothing changes.

Accepted edge case: a heartbeat monitor that Doctor migrated with `heartbeat.isolatedSession: true` is `isolated` with `sessionKey` set to the heartbeat session. It now reads that session's memory, and Doctor lists it as unbound. The run already holds legacy owner authority.

## Why This Change Was Made

Only one owner changes: `resolveScheduledPrincipal` (`src/cron/execution-context.ts`). The key-only fallback now ends with the legacy key: `policy.ownerSessionKey ?? owner.sessionKey ?? job.sessionKey`. The legacy key is used only when the job runs in its own session, and never with a `trusted` policy. No new state, flag or source kind.

Readers checked:
- `scheduledParentKeyOf` (admission, Doctor access review, development replay) derives the key from `resolveScheduledPrincipal`, so the runtime, Doctor and the replay read the same row without edits.
- `resolveCronBindParent` / `cron-bind`: these jobs become bindable (`unbound-parent`). `main` stays refused.
- Doctor `execution-context-report`: these jobs move from no listing to `unbound`. `missingChatType` already keys on `memory.source === "parent"`.
- `session-automation-index` reads only `parent`, so it is unchanged.
- `execution-context-projection`: no principal-kind branch except `ingress`.
- The other `job.sessionKey` readers (delivery, wake lane, `current` run keys, visibility) do not change.

## Evidence

Tests through the existing real-admission harness. Base `2fca213d312c`: 3 failed. Head: all pass.
- `execution-context-memory-audience.test.ts` (real admission → registry → embedded and CLI resolvers): a legacy group `sessionKey` job gets only that group's conversation partition. A legacy owner-direct `sessionKey` job gets owner-private. `trusted` policy, `sessionTarget: main` and `session:<key>` stay without memory (these pass on base too).
- `execution-context.test.ts`: the legacy key gives `unbound-parent` with `detached` placement, legacy owner authority and `self` automations scope. In-session, it stays `operator`/`unlinked-legacy`.

Local: the 49 test files that import the changed source, bind-parent, admission, the registry, the projection or the Doctor report all passed (`ocx test`, 10 shards). Also ran oxfmt and `pnpm check:changed` (see below).

End to end, on a scratch Gateway from source with `plugins.slots.memory: "knowledge"` and a real model (`openai/gpt-5.5`). One real `chat.send` created a scratch conversation, and its row was set to `chatType: "group"`. A job was created with `automations add` and edited into the production shape: `agentId: main`, top-level `sessionKey` = that conversation, `sessionTarget: isolated`, the same `toolsAllow`, `toolsAllowProvenance.callerOrigin.kind: unknown`, and no `owner` / `scheduledToolPolicy` / `sourceConversation`. It fired from its own `at` schedule (no forced run).

Base (`2fca213d312c`):
```
[agent/embedded] memory audience unavailable: root session agent:main:cron:<job>:run:<run> has no durable chat type
```
```
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_grep("manifestation") returned 0 hits.
```

Merge danger: two-way door. No schema, stored-row, config or protocol change. A revert restores the previous classification. Blast radius: detached jobs with a top-level `sessionKey` and no `sourceConversation`, `owner.sessionKey` or account-policy key.

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]