Repository navigation
refactor(sessions)!: give each session one controller for turns, queues, and Stop - #175837
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
ffdd79c to
fff40cb
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fff40cba5f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
fff40cb to
e52af58
Compare
|
@clawsweeper re-review Updated head: e52af5860919a55e1ddb3a1d05aacccc6c019027. The branch, migration notes, preserved contracts, and proof record are current. Final native process scenarios, all 12 regression controls, and all six restart cases pass; committed-source review is clean. The PR body records the inherited declaration-cap failure and remaining evidence limits. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
…he child answers in seconds (openclaw#197695) fix(cron): let an owed child's answer settle the cron run before its timeout An isolated cron run that spawned a child owing its result and ended with NO_REPLY held its session turn for the whole run (openclaw#175837). When the child answered, the result handoff saw the cron run's session as busy and queued a parent turn that could only start after the run released that turn, while the run's own descendant wait returned only at the job timeout. So the run timed out as an error even when the child answered within seconds, and announce-delivered runs sent nothing. A cron-run requester now counts as busy for this handoff only while its agent attempt is live; after the attempt ends, the existing handoff lets the cron run read the child's result itself. That path never starts a turn, so there are still never two parent turns at once. No text changes. Evidence: a built Gateway with the shipped cron driver and a stand-in model where the parent spawns an owed child that answers in about 5 s and then ends with NO_REPLY, with a 40 s job timeout. On main the run timed out at 40 s with an error; with this change it finishes ok and silent within about a second of the child's answer. With --announce to a live Telegram Test Server DM, main timed out at about 40 s and sent nothing, and this change succeeded in about 11.5 s with the child's answer delivered once, in two runs each. A child slower than the timeout still times out, a failed child now reports the existing handoff error, and a child answering while the parent attempt is live, a parent that replies itself, a fire-and-forget child and a collector child behave the same on both. One row in the existing delivery table fails on main, at -1 net test lines. Details: openclaw#197695 (comment). Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 9215601) Release adaptation: Use existing active attempt handle rather than session turn activity for cron child settlement. Baseline 1 failed/110 passed; fixed 111 passed. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 7d536a79ce11952bf2db832bcec55f50983f581a)
…08435) ## What Problem This Solves `openclaw agent --local` stops with no reply and no error when the session key contains an uppercase letter. Examples are a Slack channel id (`agent:main:channel:C0123ABCDEF`) or a mixed-case DM name (`agent:main:dm:Dana-Okafor`). - No model request is made. Stdout is empty. Node prints only `Warning: Detected unsettled top-level await` and exits with code 13. - Scripts, CI jobs, cron and evaluation harnesses that drive one-shot turns get nothing back. - The OpenAI-compatible HTTP endpoints (`/v1/chat/completions`, `/v1/responses`) with an uppercase `x-openclaw-session-key` never answer: the request hangs in the Gateway. - Lowercase keys, and the Gateway `agent` route, work. Regression from #175837 (one session controller for turns, queues and Stop), first released in v2026.11.5. 2026.10.x and 2026.11.1-11.4 reply normally. On the commit before #175837, both spellings reach the model step; on #175837, the uppercase spelling hangs. ## User Impact - One-shot `agent --local` turns and OpenAI-compatible HTTP requests with mixed-case session keys run and reply again. - They reach the same session as the lowercase spelling, as the Gateway route already does. - `--json` output now reports the stored (canonical) spelling of the session key, which is the spelling the Gateway route already prints. - Signal group ids and Matrix room ids keep their case. Two peers whose ids differ only by case stay two separate sessions. ## Why This Change Was Made The agent command claims a session twice, under two spellings of the same key: - `resolveSessionKeyForRequestInternal` (`src/agents/command/session.ts`) read the store with the canonical key (`normalizeStoreSessionKey`) but returned the request spelling. - The outer turn (`agentCommandInternal` → `withSessionTurn`) claimed the session under that request spelling. - The nested embedded run claims it under the canonical store key. - The session controller matches aliases exactly, so the nested claim did not join the outer turn. Both claims share the session id, so the nested claim queued on the same controller entry behind the outer turn and waited for it forever. - Nothing else was pending, so a one-shot Node process drained its event loop and exited 13. A Gateway process kept the HTTP request open instead. The fix returns the canonical key from the resolver's final path, as its session-id paths already do. `resolveSession`'s second normalize is removed. A request spelling no longer reaches the session controller. #142746 chose to keep the request spelling ("routing keeps the request key"). That choice was harmless until the session controller started matching aliases exactly. The table test that pinned the request spelling now pins the canonical locator, with a note that it supersedes #142746. Caller audit: | Reader | Effect | |---|---| | `resolveSession` → agent command (`--local`, Gateway ingress, HTTP, plugin runtime, hooks) | Gets the canonical key. The Gateway `agent` route already canonicalized, so it is unchanged. | | `resolveSessionKeyForRequestCore`: `session-bootstrap.ts` backfill and Gateway `agent-request-routing.ts` | Inputs are session ids only. These take the session-id paths, which were already canonical. Unchanged. | | `resolveSessionKeyForRequestCore`: `agent-via-gateway.ts` (Gateway route, non-agent-shaped keys) | The result is sent to the Gateway, which canonicalizes it with the same codec. No behavior change. | | `resolveExistingSessionKeyForRequest` (`run-session-target.ts`, `agent-request-routing.ts`) | Session-id lookups. Unchanged. | | `--deliver` | Targets come from `--to`/`--channel` or the session entry's stored route (`resolveAgentDeliveryPlanWithSessionRoute`), not from parsing the key. The outbound session key now equals the runner's key. The Gateway route already passed canonical keys here. | | `--json` | Prints the canonical spelling (the Gateway route already does). | ## Entry point audit: one canonicalizer There is one codec that turns a caller's session key into the stored spelling: `normalizeSessionKeyPreservingOpaquePeerIds` (`packages/session-url-contract/src/session-key-normalization.ts:117`). It lowercases the key except Signal group ids and Matrix room ids. Every other name is a thin wrapper over it: - `normalizeStoreSessionKey` (`src/config/sessions/store-entry.ts:16-18`) returns `normalizeSessionKeyPreservingOpaquePeerIds(sessionKey)` and nothing else. - `parseAgentSessionKey` (`session-key-normalization.ts:160-164`) parses the codec's output. `toAgentStoreSessionKey` (`src/routing/session-key.ts:91`) uses that parse and the codec. - The Gateway's `resolveSessionStoreKey` / `resolveSessionStoreIdentity` (`src/gateway/session-store-key.ts:144`, `:255`) call the codec directly. The nested embedded run always claims the session under this spelling (`src/agents/embedded-agent-runner/run/session-bootstrap.ts:328-338`), so every outer claim must use it too. | Entry point | Path to the session claim | Calls the codec? | |---|---|---| | Gateway `agent` | `src/gateway/agent-turn/agent-request-routing.ts:252` uses the store identity from `session-store-key.ts:255` → `agentCommandFromGatewayIngress` → `resolveSession` | Yes, already on `main` | | `agent --local` | `src/commands/agent-via-gateway.ts:845` → `agentCommand` → `src/agents/command/prepare.ts:242` `resolveSession` → `src/agents/command/session.ts:475-486` | **This PR.** `main` returned the typed spelling. Red-on-main test. | | `/v1/chat/completions` | `src/gateway/openai-http.ts:437` (raw header or `user` key) → `src/gateway/openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | `/v1/responses` | `src/gateway/openresponses-http.ts:272` → `openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | Hooks and webhooks | `src/gateway/server/hooks.ts:315` runs a cron turn with `session:<key>`; `hooks.ts:449` builds its queue key with `resolveCronAgentSessionKey` | Yes, already on `main`, through the cron row | | Cron session targets | `src/cron/session-target.ts:29` → `src/cron/isolated-agent/run-prepare.ts:150` → `src/cron/isolated-agent/session-key.ts:15` `toAgentStoreSessionKey` (run: `agent:main:hook:GitHub-PR-1` → `agent:main:hook:github-pr-1`; `agent:main:signal:group:AbC123` unchanged) | Yes, already on `main` | | `sessions_send` by key | `src/agents/tools/sessions-send-executor.ts:334` `resolveSessionStoreKey`, then the Gateway `agent` method (`sessions-send-tool.delivery.ts:483`) | Yes, already on `main` | | ACP via the agent command or channel dispatch | `src/agents/command/prepare.ts:321` (`acpResolution` from `resolveSession`'s key); `src/auto-reply/reply/dispatch-acp.ts:127` (resolved ACP key) | Yes (agent-command ACP turns through this PR) | | ACP control plane | `src/acp/control-plane/manager.utils.ts:63-85` `resolveAcpSessionTarget` and `acpSessionActorKey` | **This PR.** `main` lowercased with a plain `toLowerCase` before the store codec, which merged case-distinct Signal/Matrix peers into one actor and pointed a mixed-case key at its lowercase neighbor's row. Both now use `normalizeStoreSessionKey`. Red-on-main test. | Also in this PR, `resolveSessionKeyForRequestInternal` normalizes before main-alias matching. `agent:main:MAIN` with a custom `session.mainKey` now reaches the configured main session instead of a separate `agent:main:main` row (red-on-main test). No other listed entry point bypasses the codec. ## Evidence Reproduced on `main` (2cd6be7) through the published entry point (`node openclaw.mjs agent --local … --json`), with an isolated state dir and no provider (a turn that reaches the model step ends in a visible `Unknown model` error): - 8 of 8 runs with uppercase keys exited 13 with empty stdout and made no model request. 4 of 4 runs with lowercase keys reached the model step. - Swapping case moves the failure: `agent:main:channel:c3tt2oeiaj7` works and `agent:main:dm:Marcus-Lindqvist` fails, so the trigger is case, not the channel kind. - With a local fake OpenAI-compatible provider: `--local` with a lowercase key replied "OK"; with an uppercase key it exited 13 with 0 provider requests. The Gateway `agent` route with the uppercase key replied "OK". `POST /v1/chat/completions` with `x-openclaw-session-key: agent:main:openai:HttpUpper-ABC` got no response in 60 s (0 provider requests); the lowercase spelling answered 200. - An `async_hooks` trace located the pending promise in `claimSessionControllerTask` (the nested claim waiting behind the outer turn on the same controller entry). A probe showed the outer key `…Marcus-Lindqvist` and the nested key `…marcus-lindqvist`. Tests (red on the merge base, green on this branch): - `src/agents/command/session.exact-target.test.ts`: the resolver returns the persisted locator (ULID, Slack-style channel, mixed-case DM and case in the `agent:Main:Signal` prefix are red on base). Both spellings continue the same session. Signal and Matrix opaque peer ids keep their case. Peers that differ only by case (`signal:group:AbC123` / `abc123`, and the same for Matrix) stay separate sessions with separate entries and session ids. That test is green on base too: main already keeps them apart, and this change keeps that. - `src/commands/agent-local.session-key-case.test.ts`: real `agent --local` turns against a fake provider, each bounded by a 45 s race. The Slack-style channel and mixed-case DM rows are red on base ("did not settle"). The case-only Signal pair runs two turns with two distinct sessions. - `src/gateway/openai-compatible-session-key-case.server.test.ts`: `/v1/chat/completions` and `/v1/responses` with an uppercase `x-openclaw-session-key`. Both are red on base ("did not answer" within 45 s). On this branch both reach the model step. - `src/acp/control-plane/manager.utils.session-key-case.test.ts` (new): case-distinct Signal group and Matrix room pairs resolve to distinct ACP targets and actor keys, and the mixed-case target finds its own persisted row. Both rows are red on the merge base, where the targets came out lowercased and merged. - `session.exact-target.test.ts` main-alias rows: `agent:main:MAIN` / `agent:main:Main` with `session.mainKey: "work"` resolve to `agent:main:work`. Red on the merge base, which returned `agent:main:MAIN`. - ACP consumers green after the ACP change: `manager.test`, `manager.initialize-session`, `manager.cancel-session`, `manager.runtime-handle-ensure.reset`, `agent.acp`, plus the three session-key-case files (6 shards). - Consumers rerun green: `session-store`, `session.yielded-parent-reuse`, `agent-command.live-model-switch`, `embedded-agent-runner.e2e`, `session-bootstrap.detached`, `session-suspension`, `agent.session`, `agent-via-gateway` (8 shards). - `pnpm check:changed`: typecheck, lint, format and guards pass. The dead-export scan fails on five exports this change does not touch (the same on `main`). The same CLI reproduction on this branch: all 12 runs reach the model step and end with the visible `Unknown model` error (exit 1, JSON on stdout). None exits 13. | case | session key | exit | stdout | wall | stderr marker | |---|---|---|---|---|---| | lower 1 (fresh) | agent:main:dm:marcus-lindqvist | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | | upper 1 (after DM) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 5s | Unknown model: openai/gpt-5-mini | | upper 2 (repeat) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 2 (same session, lowercase) | agent:main:channel:c3tt2oeiaj7 | 1 | 260 B | 11s | Unknown model: openai/gpt-5-mini | | upper 3 (mixed-case DM) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | upper 4 (mixed-case DM repeat) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 3 | agent:main:dm:marcus-lindqvist | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 5 (fresh state, first turn) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 7s | Unknown model: openai/gpt-5-mini | | upper 6 (Slack-style) | agent:main:slack:channel:C0123ABCDEF | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 7 | agent:main:dm:Dana-Okafor | 1 | 260 B | 10s | Unknown model: openai/gpt-5-mini | | upper 8 (case in prefix) | agent:Main:Channel:C3TT2OEIAJ7 | 1 | 260 B | 12s | Unknown model: openai/gpt-5-mini | | lower 4 | agent:main:channel:c0123abcdef | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | Merge danger: two-way door. No stored data, schema, config or protocol changes. Stored session rows already use the canonical key, so a revert restores the old behavior exactly. Blast radius: every caller of the agent command that passes a mixed-case session key. Co-authored-by: Ayaan Zaidi <[email protected]>
…08435) ## What Problem This Solves `openclaw agent --local` stops with no reply and no error when the session key contains an uppercase letter. Examples are a Slack channel id (`agent:main:channel:C0123ABCDEF`) or a mixed-case DM name (`agent:main:dm:Dana-Okafor`). - No model request is made. Stdout is empty. Node prints only `Warning: Detected unsettled top-level await` and exits with code 13. - Scripts, CI jobs, cron and evaluation harnesses that drive one-shot turns get nothing back. - The OpenAI-compatible HTTP endpoints (`/v1/chat/completions`, `/v1/responses`) with an uppercase `x-openclaw-session-key` never answer: the request hangs in the Gateway. - Lowercase keys, and the Gateway `agent` route, work. Regression from #175837 (one session controller for turns, queues and Stop), first released in v2026.11.5. 2026.10.x and 2026.11.1-11.4 reply normally. On the commit before #175837, both spellings reach the model step; on #175837, the uppercase spelling hangs. ## User Impact - One-shot `agent --local` turns and OpenAI-compatible HTTP requests with mixed-case session keys run and reply again. - They reach the same session as the lowercase spelling, as the Gateway route already does. - `--json` output now reports the stored (canonical) spelling of the session key, which is the spelling the Gateway route already prints. - Signal group ids and Matrix room ids keep their case. Two peers whose ids differ only by case stay two separate sessions. ## Why This Change Was Made The agent command claims a session twice, under two spellings of the same key: - `resolveSessionKeyForRequestInternal` (`src/agents/command/session.ts`) read the store with the canonical key (`normalizeStoreSessionKey`) but returned the request spelling. - The outer turn (`agentCommandInternal` → `withSessionTurn`) claimed the session under that request spelling. - The nested embedded run claims it under the canonical store key. - The session controller matches aliases exactly, so the nested claim did not join the outer turn. Both claims share the session id, so the nested claim queued on the same controller entry behind the outer turn and waited for it forever. - Nothing else was pending, so a one-shot Node process drained its event loop and exited 13. A Gateway process kept the HTTP request open instead. The fix returns the canonical key from the resolver's final path, as its session-id paths already do. `resolveSession`'s second normalize is removed. A request spelling no longer reaches the session controller. #142746 chose to keep the request spelling ("routing keeps the request key"). That choice was harmless until the session controller started matching aliases exactly. The table test that pinned the request spelling now pins the canonical locator, with a note that it supersedes #142746. Caller audit: | Reader | Effect | |---|---| | `resolveSession` → agent command (`--local`, Gateway ingress, HTTP, plugin runtime, hooks) | Gets the canonical key. The Gateway `agent` route already canonicalized, so it is unchanged. | | `resolveSessionKeyForRequestCore`: `session-bootstrap.ts` backfill and Gateway `agent-request-routing.ts` | Inputs are session ids only. These take the session-id paths, which were already canonical. Unchanged. | | `resolveSessionKeyForRequestCore`: `agent-via-gateway.ts` (Gateway route, non-agent-shaped keys) | The result is sent to the Gateway, which canonicalizes it with the same codec. No behavior change. | | `resolveExistingSessionKeyForRequest` (`run-session-target.ts`, `agent-request-routing.ts`) | Session-id lookups. Unchanged. | | `--deliver` | Targets come from `--to`/`--channel` or the session entry's stored route (`resolveAgentDeliveryPlanWithSessionRoute`), not from parsing the key. The outbound session key now equals the runner's key. The Gateway route already passed canonical keys here. | | `--json` | Prints the canonical spelling (the Gateway route already does). | ## Entry point audit: one canonicalizer There is one codec that turns a caller's session key into the stored spelling: `normalizeSessionKeyPreservingOpaquePeerIds` (`packages/session-url-contract/src/session-key-normalization.ts:117`). It lowercases the key except Signal group ids and Matrix room ids. Every other name is a thin wrapper over it: - `normalizeStoreSessionKey` (`src/config/sessions/store-entry.ts:16-18`) returns `normalizeSessionKeyPreservingOpaquePeerIds(sessionKey)` and nothing else. - `parseAgentSessionKey` (`session-key-normalization.ts:160-164`) parses the codec's output. `toAgentStoreSessionKey` (`src/routing/session-key.ts:91`) uses that parse and the codec. - The Gateway's `resolveSessionStoreKey` / `resolveSessionStoreIdentity` (`src/gateway/session-store-key.ts:144`, `:255`) call the codec directly. The nested embedded run always claims the session under this spelling (`src/agents/embedded-agent-runner/run/session-bootstrap.ts:328-338`), so every outer claim must use it too. | Entry point | Path to the session claim | Calls the codec? | |---|---|---| | Gateway `agent` | `src/gateway/agent-turn/agent-request-routing.ts:252` uses the store identity from `session-store-key.ts:255` → `agentCommandFromGatewayIngress` → `resolveSession` | Yes, already on `main` | | `agent --local` | `src/commands/agent-via-gateway.ts:845` → `agentCommand` → `src/agents/command/prepare.ts:242` `resolveSession` → `src/agents/command/session.ts:475-486` | **This PR.** `main` returned the typed spelling. Red-on-main test. | | `/v1/chat/completions` | `src/gateway/openai-http.ts:437` (raw header or `user` key) → `src/gateway/openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | `/v1/responses` | `src/gateway/openresponses-http.ts:272` → `openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | Hooks and webhooks | `src/gateway/server/hooks.ts:315` runs a cron turn with `session:<key>`; `hooks.ts:449` builds its queue key with `resolveCronAgentSessionKey` | Yes, already on `main`, through the cron row | | Cron session targets | `src/cron/session-target.ts:29` → `src/cron/isolated-agent/run-prepare.ts:150` → `src/cron/isolated-agent/session-key.ts:15` `toAgentStoreSessionKey` (run: `agent:main:hook:GitHub-PR-1` → `agent:main:hook:github-pr-1`; `agent:main:signal:group:AbC123` unchanged) | Yes, already on `main` | | `sessions_send` by key | `src/agents/tools/sessions-send-executor.ts:334` `resolveSessionStoreKey`, then the Gateway `agent` method (`sessions-send-tool.delivery.ts:483`) | Yes, already on `main` | | ACP via the agent command or channel dispatch | `src/agents/command/prepare.ts:321` (`acpResolution` from `resolveSession`'s key); `src/auto-reply/reply/dispatch-acp.ts:127` (resolved ACP key) | Yes (agent-command ACP turns through this PR) | | ACP control plane | `src/acp/control-plane/manager.utils.ts:63-85` `resolveAcpSessionTarget` and `acpSessionActorKey` | **This PR.** `main` lowercased with a plain `toLowerCase` before the store codec, which merged case-distinct Signal/Matrix peers into one actor and pointed a mixed-case key at its lowercase neighbor's row. Both now use `normalizeStoreSessionKey`. Red-on-main test. | Also in this PR, `resolveSessionKeyForRequestInternal` normalizes before main-alias matching. `agent:main:MAIN` with a custom `session.mainKey` now reaches the configured main session instead of a separate `agent:main:main` row (red-on-main test). No other listed entry point bypasses the codec. ## Evidence Reproduced on `main` (2cd6be7) through the published entry point (`node openclaw.mjs agent --local … --json`), with an isolated state dir and no provider (a turn that reaches the model step ends in a visible `Unknown model` error): - 8 of 8 runs with uppercase keys exited 13 with empty stdout and made no model request. 4 of 4 runs with lowercase keys reached the model step. - Swapping case moves the failure: `agent:main:channel:c3tt2oeiaj7` works and `agent:main:dm:Marcus-Lindqvist` fails, so the trigger is case, not the channel kind. - With a local fake OpenAI-compatible provider: `--local` with a lowercase key replied "OK"; with an uppercase key it exited 13 with 0 provider requests. The Gateway `agent` route with the uppercase key replied "OK". `POST /v1/chat/completions` with `x-openclaw-session-key: agent:main:openai:HttpUpper-ABC` got no response in 60 s (0 provider requests); the lowercase spelling answered 200. - An `async_hooks` trace located the pending promise in `claimSessionControllerTask` (the nested claim waiting behind the outer turn on the same controller entry). A probe showed the outer key `…Marcus-Lindqvist` and the nested key `…marcus-lindqvist`. Tests (red on the merge base, green on this branch): - `src/agents/command/session.exact-target.test.ts`: the resolver returns the persisted locator (ULID, Slack-style channel, mixed-case DM and case in the `agent:Main:Signal` prefix are red on base). Both spellings continue the same session. Signal and Matrix opaque peer ids keep their case. Peers that differ only by case (`signal:group:AbC123` / `abc123`, and the same for Matrix) stay separate sessions with separate entries and session ids. That test is green on base too: main already keeps them apart, and this change keeps that. - `src/commands/agent-local.session-key-case.test.ts`: real `agent --local` turns against a fake provider, each bounded by a 45 s race. The Slack-style channel and mixed-case DM rows are red on base ("did not settle"). The case-only Signal pair runs two turns with two distinct sessions. - `src/gateway/openai-compatible-session-key-case.server.test.ts`: `/v1/chat/completions` and `/v1/responses` with an uppercase `x-openclaw-session-key`. Both are red on base ("did not answer" within 45 s). On this branch both reach the model step. - `src/acp/control-plane/manager.utils.session-key-case.test.ts` (new): case-distinct Signal group and Matrix room pairs resolve to distinct ACP targets and actor keys, and the mixed-case target finds its own persisted row. Both rows are red on the merge base, where the targets came out lowercased and merged. - `session.exact-target.test.ts` main-alias rows: `agent:main:MAIN` / `agent:main:Main` with `session.mainKey: "work"` resolve to `agent:main:work`. Red on the merge base, which returned `agent:main:MAIN`. - ACP consumers green after the ACP change: `manager.test`, `manager.initialize-session`, `manager.cancel-session`, `manager.runtime-handle-ensure.reset`, `agent.acp`, plus the three session-key-case files (6 shards). - Consumers rerun green: `session-store`, `session.yielded-parent-reuse`, `agent-command.live-model-switch`, `embedded-agent-runner.e2e`, `session-bootstrap.detached`, `session-suspension`, `agent.session`, `agent-via-gateway` (8 shards). - `pnpm check:changed`: typecheck, lint, format and guards pass. The dead-export scan fails on five exports this change does not touch (the same on `main`). The same CLI reproduction on this branch: all 12 runs reach the model step and end with the visible `Unknown model` error (exit 1, JSON on stdout). None exits 13. | case | session key | exit | stdout | wall | stderr marker | |---|---|---|---|---|---| | lower 1 (fresh) | agent:main:dm:marcus-lindqvist | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | | upper 1 (after DM) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 5s | Unknown model: openai/gpt-5-mini | | upper 2 (repeat) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 2 (same session, lowercase) | agent:main:channel:c3tt2oeiaj7 | 1 | 260 B | 11s | Unknown model: openai/gpt-5-mini | | upper 3 (mixed-case DM) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | upper 4 (mixed-case DM repeat) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 3 | agent:main:dm:marcus-lindqvist | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 5 (fresh state, first turn) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 7s | Unknown model: openai/gpt-5-mini | | upper 6 (Slack-style) | agent:main:slack:channel:C0123ABCDEF | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 7 | agent:main:dm:Dana-Okafor | 1 | 260 B | 10s | Unknown model: openai/gpt-5-mini | | upper 8 (case in prefix) | agent:Main:Channel:C3TT2OEIAJ7 | 1 | 260 B | 12s | Unknown model: openai/gpt-5-mini | | lower 4 | agent:main:channel:c0123abcdef | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | Merge danger: two-way door. No stored data, schema, config or protocol changes. Stored session rows already use the canonical key, so a revert restores the old behavior exactly. Blast radius: every caller of the agent command that passes a mixed-case session key. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit d754de8) Companion audit: No later same-path, PR or SHA follow-up. Verify direct session resolution, ACP initialization, the local command and the Gateway HTTP boundaries; generic session tests in unrelated components do not need changes. Co-authored-by: RomneyDa <[email protected]>
* test(gateway): remove unused metadata entry default (#208164) * chore(ui): refresh control ui locales (#208476) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * test(gateway): remove unused prediction fixture default (#208166) * fix: keep the cached sidebar roster check reliable on a cold worker (#208461) Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 410bb4cf-c29c-4e08-8aab-8c0f0b321532 * fix(ios): match the Fast and Ultrafast bolts in the dial and Speed menu (#207692) * fix(ios): balance the Fast and Ultrafast bolts * fix(ios): keep only the composer bolt change * fix(ios): match the Speed menu bolts and space the closed row like a system icon * fix: restore the sidebar snapshot lint check (#208479) * fix: restore the sidebar snapshot lint check Rename local callback parameters and the scoped reader in the owner-filter fixture. Keep the snapshot, cache behavior and assertions unchanged. Co-authored-by: vyctorbrzezowski <[email protected]> * fix: restore the sidebar snapshot lint check Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: ee953e0e-0c10-83c8-9992-53887f23812a --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * fix(ui): show automation actions and the calendar icon in chat (#208475) * fix(ui): show automation actions and the calendar icon in chat * fix(ui): preserve existing scheduler detail formatting * fix(ui): show automation actions in the collapsed chat headline * fix: let Workshop target agents on a remote Gateway (#208457) Resolve an explicit Workshop agent against the selected remote Gateway instead of requiring a client workspace. Preserve local selection, offline fallback, and mutation custody. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 63c9e22e-6f63-4efb-a0ec-9a70623b7bdc * improve(ios): hop the subagent avatars only when three or more are working (#207687) * fix(memory): avoid rereading unchanged transcripts during offline backfill (#208434) Reuse verified transcript candidates across bounded offline backfill batches. Preserve chronological selection, transcript-order checkpoints, and independent Gateway requests. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 3ee04411-cfd2-494c-8b0d-68089159440d * fix(ios): show the chat's name in the header for older chats (#207685) * test(gateway): remove unused global identity fixture default (#208168) * fix(ios): show the chat's name and actions for older chats (#207694) * fix(ios): show the chat's name in the header for older chats * fix(ios): show the chat's name and actions for older chats * fix: report skipped manual automation runs without timing out (#208453) Record the exact manual attempt alongside its finished event. Leave the deferred occurrence, retry policy, and previous job outcome untouched. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: c301e60c-7efb-49a1-b5cf-5ad85cc72d86 * fix: exercise the parent’s final check in child-handoff tests (#208478) Keep the original requester report and answer the same-turn recheck silently before accepting a Goal nudge or ending the browser scenario. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: ae0be9d4-dfa4-488d-85ee-d876220d04cf * test(gateway): remove unused injection source defaults (#208171) * fix: check the current notice for revoked runs after restart (#208484) Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 44c03bd5-4bf1-426c-8e5d-ac798e8aed01 * chore(ui): refresh control ui locales (#208500) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * test(gateway): remove unreachable approval-reader branches (#208148) * fix: model empty announcements in the stream script checkpoint test (#208482) Keep the default announce policy and report the empty-output suppression from the script runner. Without that outcome the scheduler correctly retains the prior checkpoint because required delivery is unknown. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 0dfba296-8737-4fe6-840e-34a02b298cce * fix: tell browser users when to retry after throttling Co-authored-by: VACInc <[email protected]> * fix: keep agent work moving past recoverable setup failures Co-authored-by: VACInc <[email protected]> * fix(ollama): preserve model namespaces and custom-provider shortcuts (#208401) Try the configured model name first on custom Ollama providers. Retry the shorter name once when Ollama reports that exact model missing. Classify the bounded response before redacting the diagnostic. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 62864529-04ab-4958-9344-d900f5f5c944 OpenClaw-Publication: 10a0d16a-0d8b-477d-bec9-d5a5646cc8ee OpenClaw-Publication: b9c708fb-a950-4344-ab46-7cc0109d0dbe * fix: keep unrelated work going during background waits Co-authored-by: VACInc <[email protected]> * test(gateway): remove unused request fixture defaults (#208141) * fix: report image size presets without marking them ignored (#208436) Report the preset sent by the image provider and flag returned files whose dimensions differ from that preset. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: d1dd36c3-16e3-4571-9f1c-a7281abfecc0 * feat(ios): show messages with many images as a stack that opens the whole gallery (#207679) * feat(ios): open large photo messages as a stack * fix(ios): restore photo stack preview retries * fix: keep the sidebar reload test’s pins in its owner filter (#208510) Give the fixture’s pinned sessions the active owner so the warm-reload checks exercise the same unselected row and all seven PR badges. Keep production filtering and the handoff assertions unchanged. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 5b3e6d5a-8804-4266-a591-dc4e944e476c * fix(packaging): preserve root Ciao when packing hardlinked dependencies (#201049) Pack npm-selected files from a private copy when a bundled dependency shares inodes with a warm pnpm store. Use the existing bundle restager so the installed root package can resolve patched Ciao and the standalone plugin keeps its own dependencies. Keep npm inventory code outside the Docker packaging CLI's startup imports so an isolated checkout can still parse arguments. Refs #198010, #198011 and #199156. Co-authored-by: Vincent Koc <[email protected]> OpenClaw-Publication: 80f31ad4-a520-8ab8-95ad-dc374a12031e Co-authored-by: vincentkoc <[email protected]> * docs: show where to find run status in Threads (#208486) Document the unread dot on collapsed Threads rows and where to find run status, session kind, and token usage. Readers can use the row menu to manage a session. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: bed96ea2-9fab-49ae-af48-cc68cfd4e937 * fix: retain callers in main-thread stall profiles (#208503) * fix: stop switching models when a session entry changes during a turn (#208480) Root cause: src/agents/failover-error.ts:63 `RUNTIME_COORDINATION_ERROR_NAMES` does not list the SQLite session-entry conflict errors, so model fallback classifies a local session-entry write conflict as a model failure and moves on to the next model. Fixes #208432 ## What Problem This Solves Sometimes another write changes a session's stored entry while a turn is preparing its own write to it. OpenClaw then raises `SqliteSessionMutationConflictError` ("SQLite session state changed while preparing session-entry.patch"). Model fallback treated that local error as a provider failure. It logged `candidate_failed` and tried every configured fallback model, within milliseconds and before any provider request. The turn then ended on the last fallback, often a small local model, or failed with `UNAVAILABLE` when the chain ran out. The reporter saw 136 false fallback decisions across 64 runs on one gateway. ## User Impact A session-entry conflict no longer switches models. The turn stops at the current model and reports the original conflict error. The transcript-conflict sibling (`SqliteTranscriptMutationConflictError`) already worked this way, and so did session capability metadata changes (#179290). Real provider failures fall back exactly as before. This PR stops the false fallback walk. It does not remove the conflict itself (see Evidence). ## Why This Change Was Made `resolveModelFallbackError` already has one owner for local coordination errors: errors named in `RUNTIME_COORDINATION_ERROR_NAMES` resolve to `coordination`. The fallback attempt then logs `chain_stopped reason=local_runtime_coordination` and rethrows the original error. This PR adds two names: - `SqliteSessionMutationConflictError`, the reported error. - `SessionEntryLifecycleUpsertConflictError`, its lifecycle-upsert sibling. It is the same class of stale-entry conflict and takes the same stop path. Both worker transports rebuild these errors under their real names: `session-actor-storage-result.ts` and `openclaw-state-worker-error-identity.ts`. So the name check matches on the real path, wrapped causes included. Changing models can never fix a stale session snapshot, so whichever writer caused the conflict, walking the chain is wrong. This is the same change as #179312. ## Evidence - Source: on main and in the reporter's 2026.11.10-11.12 dist, `resolveModelFallbackError` returns `unknown` for these errors. `model-fallback-attempt.ts` then returns `{ error }` and starts the next candidate. - Regression: two rows in `src/agents/model-fallback.terminal-boundary.test.ts`, one per error. Each sends the conflict through the state-worker encode/decode (`identifyError`/`createError`) into `runWithModelFallback`. - With the classifier change reverted, they fail: the runner treats the conflict as a provider failure and consults provider failover policy. - With it, `run` is called once, no fallback step or error callback fires, and the original error is rethrown. - Control, built Gateway (main `0118f8b774`) in an isolated container with mock providers: a real HTTP 529 from the primary still gives `candidate_failed ... reason=overloaded` and then `candidate_succeeded` on the fallback (3/3 turns). - Not reproduced: the competing writer. On a built main Gateway I tried: - operator `sessions.patch` label changes during turns. They are admitted through session lifecycle and lose the race themselves. - a second `agent` message into the same session mid-turn. It was rejected. - 15 subagent spawns on a Claude CLI fallback chain. - holding an in-candidate session write open for 1.5-3 s. None produced the conflict. The likely source is the Claude CLI runner's in-candidate compare-and-swap writes reading a cached snapshot. That is storage code and out of scope here. The user evidence is the reporter's production logs: 156 conflicts, 136 `candidate_failed` with one error hash, every candidate failing about 30 ms after the previous one, before any provider call. - Details: https://github.com/openclaw/openclaw/pull/208480#issuecomment-7260755152 Thanks @YK-03 for the fix and @Fahd84110 for the detailed report and log analysis. Merge danger: two-way door. Two entries in an error-name list, no stored state or contract change; a revert fully restores the old routing. Blast radius: only turns that hit these local session-entry conflicts, which now stop instead of switching models. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: tell sessions_send notify callers when the target's event queue is full (#208411) Root cause: src/agents/tools/sessions-send-tool.delivery.ts:98 `sessions_send` notify enqueues through `enqueueSystemEventEntry`, which logs the queue owner's `SystemEventQueueFullError` and returns null, so the tool turns a full queue into the generic "Notification was not queued." Fixes #206751 ## What Problem This Solves When a session already has 20 passive notices waiting (for example notify messages sent while it had no turn), every `sessions_send` with `mode: "notify"` to it fails with "Notification was not queued." The caller can't tell why, or what to do; the reason only shows up as a Gateway log line. ## User Impact The notify result now carries the queue's own explanation: "System event queue is full (20 pending). Let the session process pending events before retrying the notification." Nothing else changes: queue size, which turns drain the queue, and the watch-notice text stay as they are. Other refusals (duplicate notice, replaced store) still return "Notification was not queued." ## Why This Change Was Made The queue owner already throws this error for callers that ask for it (`enqueueRequiredSystemEventEntry`, `enqueueSystemEventWithReceipt`). Notify now asks for it on the passive pool too and returns the message. It doesn't switch to the waking API, so a notify still never starts a turn. The draining part of the report (followups and handoffs never consuming the backlog on 2026.11.6) is already fixed on main by #197725 (699e538939bb) and #197692 (794a6a806ff1), first shipped in 2026.11.10-beta.1. The Gateway run below checks that. ## Evidence Built Gateway in a secretless container with a scripted chat-completions model and the built-in runtime. Agent `main`'s main session gets only internal turns. It watches another session that changes three times, receives 21 notifies from another agent, runs a main-session cron systemEvent job, and then gets a `sessions_send` followup. - main e36ee79bf2df: 19 notifies queued (one slot held by a pending watch notice), then `{"status":"error","error":"Notification was not queued."}` twice. - this branch: the same run, but those two results are `{"status":"error","error":"System event queue is full (20 pending). Let the session process pending events before retrying the notification."}`. - Identical on both: three watch changes produced one notice, which was consumed by its own turn. The cron turn did not consume the passive notices, which is intended. The followup turn adopted all 20 notes, and the next notify was queued. Full proof output: https://github.com/openclaw/openclaw/pull/208411#issuecomment-7258856547 - Regression `sessions-send-tool.admission.test.ts` ("tells the notifying caller when the passive queue is full") fails on main with the generic message and passes here. `system-events.capacity`, `local-request-context.session-notify` and `agent-command.sessions-send-system-events` also pass. Thanks @jaimeehenry for the detailed report and refill timings. Merge danger: two-way door. The change only affects the error text of a refused notify; nothing is stored. Blast radius: `sessions_send` notify callers that hit a full queue. Observed proof lines: https://github.com/openclaw/openclaw/pull/208411#issuecomment-7258856547 Co-authored-by: Ayaan Zaidi <[email protected]> * fix(ui): keep desktop chat Details from failing after shell recovery (#208485) Publish the desktop Details observers without returning the signal setter’s result to Solid. Cover empty-panel discovery with a browser regression. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 747c757b-12c9-4962-85e7-629db68d9ab4 * test(gateway): remove unused request fixture default (#208180) * fix(macos): recover credentials from the legacy app directory (#208315) Use the matching bundled Doctor to migrate supported OpenClaw shared state in the separate Mac identity directory, then retry credential admission. Keep independent native imports read-only. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: f45adf5e-6357-446d-9889-0d50c265a8af * fix(gateway): keep the access-loss notice out of a reset conversation (#208495) ## What Problem This Solves When an owner removes someone from a shared session while that person's reply is streaming, OpenClaw stops the run and posts "Stopped 1 run started by Carol: their access to this session changed." If the stopped producer is still finishing, that notice is written by a background task. If the owner resets the session right after (`/new`, New chat, `sessions.reset`), the reset can commit before that task runs. The notice then opens the **new** conversation with a line about the old one, and the model reads it in its next prompt. On a real Gateway this happened in 29 of 30 attempts. Cause: the notice is addressed by session key only. Reset keeps the transcript id and rotates the conversation's lifecycle revision. The inject checks only the transcript id, so it cannot tell the retired conversation from the new one. ## Fix The notice holds the incarnation of the conversation its runs were stopped in, using the existing transcript-lease owner (`acquireTranscriptLease(chat, pin, { exact: "lifecycle" })`, the same hold cron occurrences use). - The pin comes from the snapshot the Stop already loads, before the stop. The lease is taken inside the background notice task, after it waits for the stopped producer, and released when the task ends. - The lease's check runs through the inject's existing guard argument, which the transcript write calls inside the append. A reset that commits at any point before the append retires the notice. - A retired conversation skips the notice with one info log line ("the conversation was reset or deleted"). Any other failure keeps the existing warning. Neither reaches the permission writer. - The inject reports a revoked hold as an ordinary failure, so the task asks the lease itself before deciding. - No session-id comparison outside the owner: the session-identity ratchet is unchanged. ## The native Codex mirror after a reset: no code A scratch fixture showed that a stopped Codex turn's native mirror can append after the lifecycle revision rotates. That fixture rotated the revision directly. Through `sessions.reset` on a real Codex turn it did not happen (0 of 10): - Isolated Gateway, native Codex app-server, `openai/gpt-5.4-mini`. A ~1500-word reply was stopped mid-stream and the session reset, either right after Stop or by reset alone. - 0 of 10 runs put the partial in the new conversation; all 10 put it before the reset boundary. Control without reset: the partial is persisted (2 of 2). - Why: reset preempts the active run and waits for its settlement, including the mirror write, before committing (`session-reset-service.ts`, `policy: "preempt"`). Rollover and `/new` preempt the same way; delete waits. - Not checked: the implicit daily/idle freshness rotation during a later turn's admission (`deferImplicitRollover`, `agent-session-patch.ts`; CLI and cron callers). Named here as a residual; no failure observed. ## User Impact - A reset right after removing someone opens a clean conversation. - The old conversation keeps the stopped partial reply. Its notice is not written: that conversation was retired by the reset, and the transcript owner does not append to a retired conversation. - Access removal, its immediate reply, and the stopped run are unchanged. Without a reset, the notice is posted as before. - Incognito sessions: reset deletes them; a notice raced by that reset is dropped with a warning instead of the info line. - A sharing or permission change on the same session in the milliseconds between the notice taking its hold and writing also drops the notice with a warning. Ordinary writes by other members do not affect it. - A failed session lookup in the notice is now logged as a warning; it no longer fails the access-removal request on the path without a retained producer. ## Evidence - `src/gateway/server.participation-access-loss.test.ts` (real in-process Gateway): the notice is held at two points, before the notice task starts and after it took its hold, while `sessions.reset` commits. Both cases are red on the merge base on the assertion (the notice is in the new conversation) and green with the fix (6 of 6 in the file). The existing cases, including the notice without a reset, stay green. - Negative control for the test itself: with the notice's pin temporarily taken at notice time instead of before the stop (so the lease is granted after the reset), the "before the notice task starts" case goes red on the assertion. Reverted; not part of the change. - W16's original race on the real in-process Gateway (release the stopped producer, then reset at once, 5 attempts): notice in the new conversation 0 of 5 with the fix; 29 of 30 on main. - Session-identity ratchet unchanged; core typecheck clean. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: keep plugin migrations out of early update preparation (#208473) ## What Problem This Solves Updating to a build with a lower version label but newer database schemas can run that build's plugin maintenance while the old Gateway is still serving. This can migrate live state before the release trial can restore it, leaving the old build unable to read its own database. ## User Impact Candidates declaring a newer state **or agent** schema wait until their own Gateway is ready before maintaining plugins. Real downgrades keep their existing pre-trial maintenance, including releases without schema metadata; no extra command or prompt is added. This fixes the installed updater only. Shipped beta.1/beta.2 updaters keep invoking the candidate's maintenance command early, and the candidate-side command is unchanged: those beta users can still hit the reported semver-lower/schema-newer migration failure. This PR does not claim to repair that first hop. ## Why This Change Was Made The old branch assumed a lower semantic version could not carry a newer database schema. Read the prepared candidate's existing package schema metadata using the shared parser, and retain the branch only when neither schema exceeds the running build's matching version. Missing metadata preserves the older-release behavior. - v2026.11.11 and v2026.11.12 declare state schema 40 and agent schema 42, so both pass the new schema guard against running state 42 / agent 45. They retain pre-trial maintenance when the existing semver check identifies an actual downgrade; equal/newer versions still bypass this branch. - No launcher changes (format 4), new metadata fields, records, statuses, flags, retries, or scheduling. - Net against the base: production **+14**, tests **+33**, docs **+5** lines. The small guard is necessary to preserve downgrade maintenance while preventing early forward migrations; direction takes precedence over a line-neutral target. ## Evidence - **Red on main `3a8456857492`**, mbp-m5, vitest-source: both schema-newer table cases incorrectly ran maintenance; the real plugin-lifecycle child also reached live-state admission before the trial. Three failures were the intended regressions; the three legacy/equal-version controls passed. Test duration 15.38 seconds. - **Green with this change**, mbp-m5, vitest-source: `ocx test src/update/prepare.test.ts -t 'defers semver-lower|maintains downgrade|already-current'` — **14 passed**, including missing metadata, older schemas, newer state, equal-state/newer-agent, and existing already-current behavior. Test duration 15.21 seconds. - Focused lint: both changed TypeScript files passed (5.30 seconds). Formatting: all three changed files passed (8 ms). - Local ClawSweeper reviewed exact head `e3baa43199d79e5ff9d59dc6abc02457d3101aa7`: complete, patch correct, zero source/security findings. Product-path lane results remain separate evidence. - [Current-head PR CI](https://github.com/openclaw/openclaw/actions/runs/46295242495): **green** on `c25395b4cbd6afcfa5159a22736297153d292418`, after the requested main merge brought in #208479's unrelated UI lint fix. The prior [CI run](https://github.com/openclaw/openclaw/actions/runs/46293669143) encountered that unchanged UI lint failure; no updater edits were needed. Build/type coverage ran in CI; no local broad suite was run. - [Package Acceptance](https://github.com/openclaw/openclaw/actions/runs/46294339408) exercised `e3baa43199d79e5ff9d59dc6abc02457d3101aa7`; this behavior proof is retained after the requested main-only merge: - [Survivor 2026.11.11](https://github.com/openclaw/openclaw/actions/runs/46294339408/job/141452129152): **passed** (18m56s). - [Survivor 2026.11.12](https://github.com/openclaw/openclaw/actions/runs/46294339408/job/141452129260): **passed** (24m40s). - [update-restart-auth, openclaw@latest](https://github.com/openclaw/openclaw/actions/runs/46294339408/job/141452129251): **passed** (29m41s). - Package integrity passed. The overall acceptance run is red only because the unrelated [npm 12 installed-package budget check](https://github.com/openclaw/openclaw/actions/runs/46294339408/job/141449644533) found 47,546 entries against a 47,500 budget (#208295); the aggregate correctly reports that failure. No retry or budget change was made. - Beta baselines are intentionally excluded because their shipped updater is not changed. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: dismiss passkey prompts from the remote Browser panel (#208407) Let a remote Browser panel user dismiss a pending native passkey prompt without reloading the page or losing form input. Keep native passkey sign-in available on the host. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 6312d4d5-5a52-4232-8d8d-5d3176acf091 * fix(android): avoid scanning system CAs before pinned Gateway connections (#208425) Implement Android’s hostname-aware trust-manager overload so OkHttp can validate a pinned leaf without indexing the platform CA store. Delegate platform-trusted chains to Android with the connection hostname. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: e7eceedd-d8ad-4117-a9ab-bf17e1b073c9 * fix: preserve child completion inputs across Gateway restarts (#208367) Reuse the accepted requester attribution for a completion replay under the same operator and session when restart no longer has the original tool caller. Keep exact input and receipt conflict checks. Verify both consumed inputs and the model-visible history delivery in the restart fixture. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: df68cb90-0108-4a28-a654-3645f36fe14e OpenClaw-Publication: 5a817054-c824-4889-8949-154e54475698 * test(gateway): remove unused steering fallback default (#208181) * fix: ask for an agent before Linux Quick Chat sends (#208431) Honor the Gateway roster when Quick Chat requires an explicit agent choice. Pressing Return retains the draft and opens the picker. After the user selects an agent, the next Return sends to that agent's session. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: ad454f08-fdff-4e14-bd03-471ba86defcc * fix: keep Matrix DM replies in the original thread (#208128) Preserve the case-sensitive Matrix DM thread root in session storage and reply ownership. Doctor restores the existing transcript and its idle local worker placement when Matrix delivery metadata identifies the original thread. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 1838c4b4-deed-4503-b3fb-8b73c0f74e0e OpenClaw-Publication: c478e718-8bb8-857e-be0c-91b9b5998ded * feat: choose where automations run (#201285) Let an automation run in a named conversation, use recent messages as context, or send a result to a selected chat. Save the conversation key so the link survives renaming. Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: a62843b0-acd0-83f5-b79e-f5cbf9cdbb9c Co-authored-by: daniel-lxs <[email protected]> * fix: avoid waiting for immutable update records during Gateway startup (#208471) Related: #208359 ## What Problem This Solves Gateway startup can wait for a SQLite child worker before opening its listener on an adopted immutable installation. A stalled worker can delay startup for its 300-second-plus timeout, even though this startup ownership check was meant to be file-only and best effort. ## User Impact Startup no longer inspects the immutable adoption database before binding. Packaging-owned macOS app, desktop app, and container installs still suppress self-update through `openclaw-install-owner.json`. Immutable layouts without that marker also suppress self-update, whether adopted or unadopted. Immutable installations are updated outside the Gateway service. The existing root/current/release layout detector uses file shape and `lstat` only; startup does not read the adoption record or launch its SQLite worker. Strict update admission is unchanged, including its refusal directing users to run `openclaw update` as root outside the service. ## Why This Change Was Made Replace the worker-backed startup inspection with the existing file-only immutable layout detector; keep packaging marker filtering and best-effort inspection warnings. No new statuses, records, timers, caches, owner fields, or other mechanisms. Whole PR versus main: production net -1 line; tests net +10 lines; total net +9. The follow-up versus reviewed head `bbce2253194c` is production +11 and tests +10. Only the startup module, its existing test, and an export on the existing immutable layout detector change. ## Evidence - Original main-baseline proof on mbp-m5 showed startup called `readImmutableInstallRecord` before bind. - The added immutable-layout regression failed against the pre-follow-up startup code: root, current-symlink, and release-directory entry points all incorrectly advertised `update.run`. - With this follow-up, `ocx test src/gateway/server-startup-plugins.test.ts -t "suppresses immutable self-update|advertises self-update"` passed all 7 selected cases on mbp-m5: three immutable entry points (without an owner marker), three packaging owners, and an unmarked mutable installation. Each immutable case asserts no worker-backed record read. Duration 23.93 seconds, mostly compiler preparation; assertions took 27 ms total. - Changed-file Oxfmt and Oxlint checks passed on mbp-m5 (3 files; 0 lint warnings/errors). - No local full build, full suite, browser click, or real worker timeout was run. CI supplies broad proof. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: keep unrelated tools running when a batch hits the repeat limit Co-authored-by: VACInc <[email protected]> * fix: check recorded automation owners before running (#201287) Check the recorded human owner before scheduled work and process-watcher launches. Scheduled occurrences read the saved owner when the in-memory catalog is cold. An administrator can recover a job whose owner has been removed. Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 01bffa98-2a33-8d2c-89aa-fcd0156303c7 Co-authored-by: daniel-lxs <[email protected]> * fix(gateway): start under a group-writable HOME when file logs are unavailable (#208499) ## Problem `openclaw gateway run` refuses to start when `$HOME` is group-writable without a sticky bit, which is common for shared container volumes: ``` [gateway] sidecars failed to start: WorkerTaskError: Directory "$HOME" is writable by group or others and has no sticky bit. ... Gateway failed to start: ... ``` `openclaw agent --local` in the same HOME runs normally and only drops file logs with `[openclaw] log directory unavailable; records dropped`. Users affected: containerized and shared-HOME installs. Shipped in v2026.11.10. Cause: the logging transport already decides that an unsafe default log directory means "drop records and warn". One reader bypassed that decision. The Gateway startup summary line `log file: <path>` (src/gateway/server-startup-log.ts) awaits `getResolvedLoggerSettings()`, which rethrows the resolution error. Since #197742 moved resolution into a worker, that await fails Gateway startup. Doctor's reader already caught the same error privately. ## Solution `getResolvedLoggerSettings()` owns the outcome. `file` is absent when the default log directory is unavailable, and it never throws for that. - Gateway startup prints `log file: unavailable`. The transport's existing warning still names the cause and the `chmod` fix. - Doctor drops its private try/catch and reads the same field. The directory safety check itself is unchanged. Temp roots, worker scratch and SQLite staging still refuse unsafe ancestors when they are used. ## Impact - The Gateway starts and runs turns under a group-writable HOME, as `--local` already does. File logs are still dropped, with the same warning. - `openclaw logs` and log tail use separate resolvers and are unchanged. - Not a security regression: config, credentials and state already live under the same HOME, and Gateways before v2026.11.10 started there. ## Evidence - `src/logging/logger-file-transport.worker.test.ts` now runs the existing default-root proof, whose `--disposable-default-root` path no test invoked. Its unsafe-directory step asserts `file` is absent. Red on main (`WorkerTaskError ... no sticky bit`), green here. - `test/e2e/gateway-unsafe-home.built-cli.e2e.test.ts`: built CLI, HOME 0775. The Gateway starts, logs `log file: unavailable` plus the transport's warning with the `chmod go-w` fix, and `agent` completes a turn. - Real CLI repro (built dist, isolated HOME 0775 with state under it, fake OpenAI-compatible server): main 3/3 `Gateway failed to start`; this branch 3/3 Gateway ready, turn completed. - Consumer suites green: doctor-format.test.ts, log-tail.test.ts, logger-settings.test.ts, logger-env.test.ts, server-startup-log.test.ts. - Readers of `getResolvedLoggerSettings()`: Gateway startup summary and Doctor's runtime hints (plus tests). `resolveTarget` rejects only while resolving the default root, and the writer already drops records on every such rejection, so the reader and the writer agree on "unavailable". - `LoggerResolvedSettings` (also exported from `openclaw/plugin-sdk/logging-core`) now marks `file` optional. Plugin SDK impact query (`sdk-export:openclaw/plugin-sdk/logging-core#LoggerResolvedSettings`, ClawHub, 2026-11-29): 0 plugins reference it (coverage 2,332 complete / 421 partial / 30 failed of 2,783); no bundled plugin imports it (`rg` over `extensions/`). No SDK function returns this type, so plugins can only construct it. - Typecheck at this head: `pnpm tsgo:core` clean. `pnpm tsgo:core:test` has one error, in `ui/src/pages/logs/view.test.tsx:21`, which this PR does not touch; it comes from base (#207383/#208163). The built-CLI e2e passes locally (13 s). Co-authored-by: Ayaan Zaidi <[email protected]> * chore(release): close out 2026.11.12 on main (#208158) * chore(release): close out 2026.11.12 on main Co-authored-by: RomneyDa <[email protected]> * fix(release): leave locale refresh to its dedicated workflow Co-authored-by: RomneyDa <[email protected]> * ci: refresh closeout checks after main lint fix Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: RomneyDa <[email protected]> * test(gateway): remove unused steering cancellation default (#208173) * fix: recognize the file format for extensionless path lookups (#208516) Root cause: extensions/oc-path/src/cli.ts:92 `loadOcPathFile` chose the parser only from the address's file hint, so an extensionless address such as `oc://alias/count` was parsed as Markdown even when `--file settings.json` named a JSON file. Fixes #208496 Thanks @LinzeShi for the report and the fix. ## What Problem This Solves A caller can reuse an address such as `oc://alias/count` and point it at a JSON file with `--file settings.json`. Even when the file contains `count`, `path resolve` and `path find` report no match and `path set --value-json` refuses the edit. `path emit` already identifies the same file as JSON. ## Fix The shared loader now falls back to the file name when the address has no recognized extension: `kind = addressKind ?? inferKind(absPath)`. `resolve`, `find` and `set` all load through it. A format in the address still wins, so `oc://x.json/count --file snapshot.txt` keeps reading JSON. An unknown file extension with no address hint still parses as Markdown, as before. ## Tests One table-driven case in `cli.test.ts` runs resolve, find and a real `set` for both directions (extensionless address on `settings.json`, red on the merge base; JSON address on `snapshot.md`). The near-duplicate `CLI-R04` YAML resolve smoke test was removed: `CLI-F01` already resolves YAML leaves from the workspace. This keeps the file under its line cap. ## Evidence Built CLI (`pnpm build`, `node openclaw.mjs path ...`) in a clean container with only the oc-path plugin enabled, merge base `0ebe414929fc` vs this branch. Output is in the evidence comment linked below. - Base: `resolve oc://alias/count --file settings.json` -> exit 1 `resolved:false`; `find 'oc://alias/*'` -> 0 matches; `set ... 2 --value-json` -> `not-writable`. - Fix: resolve -> `valueText "1"`; find -> `oc://alias/count`; set -> exit 0, file is now valid JSON `{"count":2}`. - Unchanged on both: `oc://x.json/count --file snapshot.txt` (JSON, resolve and set), `--file data.unknownext` (no match, emit kind `md`), Markdown frontmatter resolve/set through `oc://AGENTS.md/...` and `oc://alias/...`. Evidence comment: https://github.com/openclaw/openclaw/pull/208516#issuecomment-7261291447 ## Merge danger Two-way door: a revert fully undoes it. No stored state, config or contract change. Blast radius: `openclaw path resolve|find|set` when the address has no recognized extension and `--file` has one. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: keep automatic Activity recaps on the session provider (#208460) Derive the utility route from the same session model and account used for dashboard titles. Preserve configured utility fallbacks and the no-primary-retry policy when the recap chain is exhausted. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 0e68b312-2003-42fd-88df-918a4c915065 * fix: keep the draft caret when closing chat search (#208428) Restore the rich editor’s selection when transcript search closes. Keep the original shortcut control as the focus target and fall back to the composer if that control was removed. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: a91ce076-21d5-4792-8b57-8d51daf9370a * fix: point automations to their signed-out account (#208493) Keep an unavailable fallback model from masking the recorded account refusal. Preserve the catalog miss for the fallback itself and leave cross-provider jobs scheduled. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 97c31b82-4f5b-4790-bc72-b34b555bb286 * fix(cli): one run deadline for openclaw agent on both routes (#208522) ## What Problem This Solves One command, two deadlines. Without `--timeout`: - `openclaw agent` through the Gateway sent a CLI fallback of **600 s** (`--timeout ?? agents.defaults.timeoutSeconds ?? 600`) as the run's per-attempt deadline. At 600 s the Gateway aborted the attempt and the run ended with `timeoutPhase: "provider"` and "Request timed out before a response was generated". - `openclaw agent --local` resolved `agents.defaults.timeoutSeconds`, which defaults to **48 hours**, as Gateway turns and cron do. - `openclaw agent exec` hardcoded **600 s**. So long coding tasks finished with `--local` and were cut at 10 minutes through the Gateway. In a long-task coding evaluation (DeepSWE), 3 of 5 Gateway-route trials ended at 607–608 s, while `--local` trials of the same tasks ran 1,084–2,279 s without a cut. The 600 s dates from when the CLI waited on a bounded client timer. That wait has been unbounded for a long time (the CLI waits for the Gateway's terminal result), but the 600 kept travelling as the run's own deadline. Three related bugs come from the same CLI-side value: 1. **Remote Gateway config was overridden.** The CLI sent the CLI host's `agents.defaults.timeoutSeconds`, so a remote Gateway's own setting never applied to CLI turns. 2. **Subagent timeouts were shadowed.** The Gateway gives a turn into a live registered subagent session that subagent's `runTimeoutSeconds` only when the request carries no timeout. The CLI always sent one. 3. **The docs matched only one route.** They said "default 600" for `openclaw agent`, which was true on the Gateway route and false with `--local`. ## Fix `resolveAgentTimeoutMs` (`agents.defaults.timeoutSeconds`, default 48 h) is now the only owner of how long `openclaw agent` and `openclaw agent exec` run, on both routes. - The Gateway route sends `timeout` only when `--timeout` is given; the Gateway resolves the default exactly as for every other turn. - `agent exec` no longer hardcodes 600; without `--timeout` its embedded run resolves the same default. - The CLI's wait for a yielded turn's subagents has no deadline unless `--timeout` is given. It still ends on the follow-up reply, Ctrl-C or disconnect. - Removed the stale transport hint "use --timeout <seconds> to extend the CLI wait". - Help text and docs now state one default for every route: `docs/cli/agent.md`, `docs/tools/agent-send.md`, `docs/gateway/cli-backends.md`, `docs/tools/autoreview.md`, `docs/plugins/codex-harness-reference/timeouts.md`. `--timeout N` behaves exactly as before on both routes, including `0` (unlimited). ## Behavior change - **Old:** without `--timeout`, `openclaw agent` through the Gateway and `openclaw agent exec` stopped each model attempt at **600 s (10 minutes)**. - **New:** they use `agents.defaults.timeoutSeconds`, which is **48 hours** unless configured, the same deadline as `openclaw agent --local`, Control UI and channel turns, and cron. - **To keep the old cap:** pass `--timeout 600`, or set `agents.defaults.timeoutSeconds: 600` in the config (the Gateway's config on the Gateway route). - **Accepted cost:** a script or CI job that relied on the implicit 600 s cap and passes no `--timeout` loses it. A run that neither stalls nor repeats can then run until 48 hours or the job's own limit. Stalled and looping runs are still stopped by the model idle timeout (120 s without output) and the existing loop guards. - **The timeout message** now names the limit that fired and how to raise it: "…the run reached its 10m limit. Please try again, or raise the limit with `--timeout <seconds>` for `openclaw agent`, or `agents.defaults.timeoutSeconds` in your config." ## User Impact - Long tasks through the Gateway are no longer stopped at 10 minutes; `--local` is unchanged. - **Default change:** Gateway-route `openclaw agent` and `agent exec` without `--timeout` now get `agents.defaults.timeoutSeconds` (48 h unless configured) instead of 600 s. Scripts that relied on the implicit 10-minute stop should pass `--timeout 600`. - Autoreview passes launched without a helper timeout can now run up to `agents.defaults.timeoutSeconds` (48 h unless configured) instead of 600 s; helpers that set a timeout are unchanged. - A scripted `openclaw agent` whose yielded turn waits on subagents now waits until they settle (or Ctrl-C/disconnect) instead of exiting 1 at 600 s; pass `--timeout` to bound that wait. - A dead provider is still caught by the model idle timeout (120 s without output). A looping agent is bounded by the configured run deadline and the existing runaway guards. - If the CLI process is killed with SIGKILL or its connection drops, an accepted Gateway run continues and its result is added to the session (accepted execution is bound to the Gateway lifetime, not the caller's connection). Ctrl-C/SIGTERM still sends `chat.abort`, as before. ## Evidence - Red on the merge base, green with the fix: - `src/commands/agent-via-gateway.deadline.test.ts`: without `--timeout`, the Gateway request carries no `timeout` for a local and a remote Gateway (main sent 600 from the CLI host's config). - `src/commands/agent-exec.test.ts`: `agent exec` without `--timeout` passes no timeout to the run (main passed "600"). - `src/cli/program/register.agent.test.ts`: `agent exec fix` without `--timeout` reaches the command with no timeout (main's Commander default injected "600"). - The Gateway already gives a timeout-less request into a registered subagent session that subagent's budget (`agent.session-followup` suite, unchanged). - Affected consumers rerun green: `agent-via-gateway.test.ts`, `agent-via-gateway.yield.test.ts`, `register.agent.test.ts`. - Real-product evidence: the long-task evaluation above (Gateway route 3 of 5 trials cut at 600 s; `--local` none cut). - `src/agents/embedded-agent-runner/run/terminal-timeout.test.ts`: the provider timeout message names the limit that fired (from the run's deadline), `--timeout <seconds>` and `agents.defaults.timeoutSeconds`. Co-authored-by: Ayaan Zaidi <[email protected]> * test(gateway): keep restart recovery fixtures under Gateway ownership (#208302) The shared test harness sets VITEST, which skips the singleton lock. In the restart-resume and yield-restart CI failures, offline SQLite maintenance took the state database while a live Gateway was resuming work. Clear both test markers for those child processes and verify the replacement Gateway owns the lock in the existing SIGKILL case. * chore(ui): refresh control ui locales (#208547) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: reply to agent turns whose session key has uppercase letters (#208435) ## What Problem This Solves `openclaw agent --local` stops with no reply and no error when the session key contains an uppercase letter. Examples are a Slack channel id (`agent:main:channel:C0123ABCDEF`) or a mixed-case DM name (`agent:main:dm:Dana-Okafor`). - No model request is made. Stdout is empty. Node prints only `Warning: Detected unsettled top-level await` and exits with code 13. - Scripts, CI jobs, cron and evaluation harnesses that drive one-shot turns get nothing back. - The OpenAI-compatible HTTP endpoints (`/v1/chat/completions`, `/v1/responses`) with an uppercase `x-openclaw-session-key` never answer: the request hangs in the Gateway. - Lowercase keys, and the Gateway `agent` route, work. Regression from #175837 (one session controller for turns, queues and Stop), first released in v2026.11.5. 2026.10.x and 2026.11.1-11.4 reply normally. On the commit before #175837, both spellings reach the model step; on #175837, the uppercase spelling hangs. ## User Impact - One-shot `agent --local` turns and OpenAI-compatible HTTP requests with mixed-case session keys run and reply again. - They reach the same session as the lowercase spelling, as the Gateway route already does. - `--json` output now reports the stored (canonical) spelling of the session key, which is the spelling the Gateway route already prints. - Signal group ids and Matrix room ids keep their case. Two peers whose ids differ only by case stay two separate sessions. ## Why This Change Was Made The agent command claims a session twice, under two spellings of the same key: - `resolveSessionKeyForRequestInternal` (`src/agents/command/session.ts`) read the store with the canonical key (`normalizeStoreSessionKey`) but returned the request spelling. - The outer turn (`agentCommandInternal` → `withSessionTurn`) claimed the session under that request spelling. - The nested embedded run claims it under the canonical store key. - The session controller matches aliases exactly, so the nested claim did not join the outer turn. Both claims share the session id, so the nested claim queued on the same controller entry behind the outer turn and waited for it forever. - Nothing else was pending, so a one-shot Node process drained its event loop and exited 13. A Gateway process kept the HTTP request open instead. The fix returns the canonical key from the resolver's final path, as its session-id paths already do. `resolveSession`'s second normalize is removed. A request spelling no longer reaches the session controller. #142746 chose to keep the request spelling ("routing keeps the request key"). That choice was harmless until the session controller started matching aliases exactly. The table test that pinned the request spelling now pins the canonical locator, with a note that it supersedes #142746. Caller audit: | Reader | Effect | |---|---| | `resolveSession` → agent command (`--local`, Gateway ingress, HTTP, plugin runtime, hooks) | Gets the canonical key. The Gateway `agent` route already canonicalized, so it is unchanged. | | `resolveSessionKeyForRequestCore`: `session-bootstrap.ts` backfill and Gateway `agent-request-routing.ts` | Inputs are session ids only. These take the session-id paths, which were already canonical. Unchanged. | | `resolveSessionKeyForRequestCore`: `agent-via-gateway.ts` (Gateway route, non-agent-shaped keys) | The result is sent to the Gateway, which canonicalizes it with the same codec. No behavior change. | | `resolveExistingSessionKeyForRequest` (`run-session-target.ts`, `agent-request-routing.ts`) | Session-id lookups. Unchanged. | | `--deliver` | Targets come from `--to`/`--channel` or the session entry's stored route (`resolveAgentDeliveryPlanWithSessionRoute`), not from parsing the key. The outbound session key now equals the runner's key. The Gateway route already passed canonical keys here. | | `--json` | Prints the canonical spelling (the Gateway route already does). | ## Entry point audit: one canonicalizer There is one codec that turns a caller's session key into the stored spelling: `normalizeSessionKeyPreservingOpaquePeerIds` (`packages/session-url-contract/src/session-key-normalization.ts:117`). It lowercases the key except Signal group ids and Matrix room ids. Every other name is a thin wrapper over it: - `normalizeStoreSessionKey` (`src/config/sessions/store-entry.ts:16-18`) returns `normalizeSessionKeyPreservingOpaquePeerIds(sessionKey)` and nothing else. - `parseAgentSessionKey` (`session-key-normalization.ts:160-164`) parses the codec's output. `toAgentStoreSessionKey` (`src/routing/session-key.ts:91`) uses that parse and the codec. - The Gateway's `resolveSessionStoreKey` / `resolveSessionStoreIdentity` (`src/gateway/session-store-key.ts:144`, `:255`) call the codec directly. The nested embedded run always claims the session under this spelling (`src/agents/embedded-agent-runner/run/session-bootstrap.ts:328-338`), so every outer claim must use it too. | Entry point | Path to the session claim | Calls the codec? | |---|---|---| | Gateway `agent` | `src/gateway/agent-turn/agent-request-routing.ts:252` uses the store identity from `session-store-key.ts:255` → `agentCommandFromGatewayIngress` → `resolveSession` | Yes, already on `main` | | `agent --local` | `src/commands/agent-via-gateway.ts:845` → `agentCommand` → `src/agents/command/prepare.ts:242` `resolveSession` → `src/agents/command/session.ts:475-486` | **This PR.** `main` returned the typed spelling. Red-on-main test. | | `/v1/chat/completions` | `src/gateway/openai-http.ts:437` (raw header or `user` key) → `src/gateway/openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | `/v1/responses` | `src/gateway/openresponses-http.ts:272` → `openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | Hooks and webhooks | `src/gateway/server/hooks.ts:315` runs a cron turn with `session:<key>`; `hooks.ts:449` builds its queue key with `resolveCronAgentSessionKey` | Yes, already on `main`, through the cron row | | Cron session targets | `src/cron/session-target.ts:29` → `src/cron/isolated-agent/run-prepare.ts:150` → `src/cron/isolated-agent/session-key.ts:15` `toAgentStoreSessionKey` (run: `agent:main:hook:GitHub-PR-1` → `agent:main:hook:github-pr-1`; `agent:main:signal:group:AbC123` unchanged) | Yes, already on `main` | | `sessions_send` by key | `src/agents/tools/sessions-send-executor.ts:334` `resolveSessionStoreKey`, then the Gateway `agent` method (`sessions-send-tool.delivery.ts:483`) | Yes, already on `main` | | ACP via the agent command or channel dispatch | `src/agents/command/prepare.ts:321` (`acpResolution` from `resolveSession`'s key); `src/auto-reply/reply/dispatch-acp.ts:127` (resolved ACP key) | Yes (agent-command ACP turns through this PR) | | ACP control plane | `src/acp/control-plane/manager.utils.ts:63-85` `resolveAcpSessionTarget` and `acpSessionActorKey` | **This PR.** `main` lowercased with a plain `toLowerCase` before the store codec, which merged case-distinct Signal/Matrix peers into one actor and pointed a mixed-case key at its lowercase neighbor's row. Both now use `normalizeStoreSessionKey`. Red-on-main test. | Also in this PR, `resolveSessionKeyForRequestInternal` normalizes before main-alias matching. `agent:main:MAIN` with a custom `session.mainKey` now reaches the configured main session instead of a separate `agent:main:main` row (red-on-main test). No other listed entry point bypasses the codec. ## Evidence Reproduced on `main` (2cd6be7e) through the published entry point (`node openclaw.mjs agent --local … --json`), with an isolated state dir and no provider (a turn that reaches the model step ends in a visible `Unknown model` error): - 8 of 8 runs with uppercase keys exited 13 with empty stdout and made no model request. 4 of 4 runs with lowercase keys reached the model step. - Swapping case moves the failure: `agent:main:channel:c3tt2oeiaj7` works and `agent:main:dm:Marcus-Lindqvist` fails, so the trigger is case, not the channel kind. - With a local fake OpenAI-compatible provider: `--local` with a lowercase key replied "OK"; with an uppercase key it exited 13 with 0 provider requests. The Gateway `agent` route with the uppercase key replied "OK". `POST /v1/chat/completions` with `x-openclaw-session-key: agent:main:openai:HttpUpper-ABC` got no response in 60 s (0 provider requests); the lowercase spelling answered 200. - An `async_hooks` trace located the pending promise in `claimSessionControllerTask` (the nested claim waiting behind the outer turn on the same controller entry). A probe showed the outer key `…Marcus-Lindqvist` and the nested key `…marcus-lindqvist`. Tests (red on the merge base, green on this branch): - `src/agents/command/session.exact-target.test.ts`: the resolver returns the persisted locator (ULID, Slack-style channel, mixed-case DM and case in the `agent:Main:Signal` prefix are red on base). Both spellings continue the same session. Signal and Matrix opaque peer ids keep their case. Peers that differ only by case (`signal:group:AbC123` / `abc123`, and the same for Matrix) stay separate sessions with separate entries and session ids. That test is green on base too: main already keeps them apart, and this change keeps that. - `src/commands/agent-local.session-key-case.test.ts`: real `agent --local` turns against a fake provider, each bounded by a 45 s race. The Slack-style channel and mixed-case DM rows are red on base ("did not settle"). The case-only Signal pair runs two turns with two distinct sessions. - `src/gateway/openai-compatible-session-key-case.server.test.ts`: `/v1/chat/completions` and `/v1/responses` with an uppercase `x-openclaw-session-key`. Both are red on base ("did not answer" within 45 s). On this branch both reach the model step. - `src/acp/control-plane/manager.utils.session-key-case.test.ts` (new): case-distinct Signal group and Matrix room pairs resolve to distinct ACP targets and actor keys, and the mixed-case target finds its own persisted row. Both rows are red on the merge base, where the targets came out lowercased and merged. - `session.exact-target.test.ts` main-alias rows: `agent:main:MAIN` / `agent:main:Main` with `session.mainKey: "work"` resolve to `agent:main:work`. Red on the merge base, which returned `agent:main:MAIN`. - ACP consumers green after the ACP change: `manager.test`, `manager.initialize-session`, `manager.cancel-session`, `manager.runtime-handle-ensure.reset`, `agent.acp`, plus the three session-key-case files (6 shards). - Consumers rerun green: `session-store`, `session.yielded-parent-reuse`, `agent-command.live-model-switch`, `embedded-agent-runner.e2e`, `session-bootstrap.detached`, `session-suspension`, `agent.session`, `agent-via-gateway` (8 shards). - `pnpm check:changed`: typecheck, lint, format and guards pass. The dead-export scan fails on five exports this change does not touch (the same on `main`). The same CLI reproduction on this branch: all 12 runs reach the model step and end with the visible `Unknown model` error (exit 1, JSON on stdout). None exits 13. | case | session key | exit | stdout | wall | stderr marker | |---|---|---|---|---|---| | lower 1 (fresh) | agent:main:dm:marcus-lindqvist | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | | upper 1 (after DM) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 5s | Unknown model: openai/gpt-5-mini | | upper 2 (repeat) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 2 (same session, lowercase) | agent:main:channel:c3tt2oeiaj7 | 1 | 260 B | 11s | Unknown model: openai/gpt-5-mini | | upper 3 (mixed-case DM) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | upper 4 (mixed-case DM repeat) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 3 | agent:main:dm:marcus-lindqvist | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 5 (fresh state, first turn) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 7s | Unknown model: openai/gpt-5-mini | | upper 6 (Slack-style) | agent:main:slack:channel:C0123ABCDEF | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 7 | agent:main:dm:Dana-Okafor | 1 | 260 B | 10s | Unknown model: openai/gpt-5-mini | | upper 8 (case in prefix) | agent:Main:Channel:C3TT2OEIAJ7 | 1 | 260 B | 12s | Unknown model: openai/gpt-5-mini | | lower 4 | agent:main:channel:c0123abcdef | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | Merge danger: two-way door. No stored data, schema, config or protocol changes. Stored session rows already use the canonical key, so a revert restores the old behavior exactly. Blast radius: every caller of the agent command that passes a mixed-case session key. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(release): keep Doctor deprecation deadlines from blocking frozen release sources (#207875) Release npm preflight now enforces the Doctor deprecation registry as of the source's main merge base, through a trusted harness preload. Deadlines reached after a release line leaves main are reported as warnings instead of blocking publication. Main CI and PR guards keep wall-clock enforcement. Co-authored-by: RomneyDa <[email protected]> * fix: show who answered a recovered Linux Quick Chat message (#208515) Keep the original agent's display name with a Quick Chat send so a recovered reply shows who answered when the Gateway default changes. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 31cd1031-73b1-4ad1-8770-1aa7c5fb79f9 * fix: keep fork compaction off the parent’s Claude account (#208415) Check the selected Claude account against the saved native session before manual compaction, including after a restart. A fork can compact on its selected account after its first ordinary turn establishes a native session there. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 34da9584-a62a-4ed5-8cf3-a0b3e6387e25 OpenClaw-Publication: 4527fb28-07bf-43c1-854e-e4a27bd33b16 * fix: keep images for unlisted Ollama Cloud vision models (#208531) Inspect the selected tag through the configured daemon without pulling it. Keep the previous fallback when the daemon cannot describe an unlisted cloud model. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 374db0dd-bba5-450f-b42d-fed88841557f * fix(agents): seed the first persistent turn after a one-shot run (#208502) ## Problem A one-shot run (`openclaw agent --local`, `agent exec`) in a non-empty workspace blocks the first persistent conversation there for 24 hours. Repro on main with the built CLI and a fake model: 1. `openclaw setup --baseline --workspace .` in a project directory holding `README.md` (git or not) 2. `openclaw agent --local -m hi`: works 3. `openclaw gateway run`, then `openclaw agent -m hi`: fails before any model call with `OpenClaw workspace appears to have disappeared after a recent initialization ... | WORKSPACE_VANISHED` The same project without step 2 works. Users affected: anyone who tries a one-shot turn in a project workspace and then uses the Gateway, Control UI or a channel. The skip-then-seed sequence also happens without a Gateway: `agent exec`, then any persistent chat. Cause: in `ensureAgentWorkspaceOwned` (src/agents/workspace.ts), the no-seed branch writes a disappearance attestation for any non-empty workspace without initializing it. Since #206477, every one-shot run takes that branch. The seeding branch then sees no persona files, reads the fresh attestation as "OpenClaw initialized this workspace", and refuses as if the workspace had been wiped. Shipped in v2026.12.1-beta.2. ## Solution One owner, one meaning: only a workspace OpenClaw initialized can vanish. "Initialized" is the existing setup-state marker (`bootstrapSeededAt` / `setupCompletedAt`). That marker lives in SQLite (`workspace_setup_state`, src/agents/workspace-state-store.kernel.ts:69-75), outside the workspace, so `git clean` or a lost mount cannot remove it. Legacy in-workspace state is never parsed at runtime (src/agents/workspace-legacy-state.ts:1-2). The brand-new path in `ensureAgentWorkspaceOwned` now: - refuses when the marker is present and either the attestation or the setup state is recent. This keeps the vanished-workspace guard (#88333) for a lost mount, `git clean -fd`, `git stash -u` and a wipe that leaves project files. Recent setup state without an attestation was already refused further down, by `clearExpiredState`; the refusal now happens explicitly at this decision. - seeds normally when there is no marker. The attestation then came from a no-seed run, and the workspace was never initialized. A no-seed attestation also stops steering the first seeding turn: - The first seeding turn no longer reads attestation hashes when it decides whether setup is complete. In that branch there is no marker, so any attestation came from a no-seed run and never recorded seeded files. Paths that run with a marker (survival evidence, completion repair) still read the hashes, as before. - The "recently attested customization" shortcut is removed. It could fire only without a marker, so a project `AGENTS.md` skipped `BOOTSTRAP.md` after a one-shot turn but not without one. - An expired attestation alone no longer marks a brand-new workspace as "reseeding expired state"; only the marker does. Before, a git project seeded `BOOTSTRAP.md` after 24 h but not before. Writers of an attestation without a setup marker (all in the no-seed branch, src/agents/workspace.ts:589-623): one-shot runs (`agent --local`, `exec`), `agents.defaults.skipBootstrap`, and agent creation with deferred initialization (the Template add flow, src/templates/gateway-add-apply.ts:199-203). That branch writes no persona files, only a purpose `AGENTS.md` when a purpose is given, so a never-initialized workspace has no OpenClaw identity to lose. `rg deferInitialization` finds no production caller that combines a purpose with deferred agent creation (`agents-onboarding.ts` defers a session, not agent creation). All of these writers now read the same way at the first seeding turn. No schema change, no new parameter, no new state. ## Impact - `--local`/`exec` followed by a Gateway or chat turn in a project workspace works. The first persistent turn seeds the same files and setup state as it does without the one-shot turn. - Initialized workspaces still refuse with the same messa…
…08435) ## What Problem This Solves `openclaw agent --local` stops with no reply and no error when the session key contains an uppercase letter. Examples are a Slack channel id (`agent:main:channel:C0123ABCDEF`) or a mixed-case DM name (`agent:main:dm:Dana-Okafor`). - No model request is made. Stdout is empty. Node prints only `Warning: Detected unsettled top-level await` and exits with code 13. - Scripts, CI jobs, cron and evaluation harnesses that drive one-shot turns get nothing back. - The OpenAI-compatible HTTP endpoints (`/v1/chat/completions`, `/v1/responses`) with an uppercase `x-openclaw-session-key` never answer: the request hangs in the Gateway. - Lowercase keys, and the Gateway `agent` route, work. Regression from #175837 (one session controller for turns, queues and Stop), first released in v2026.11.5. 2026.10.x and 2026.11.1-11.4 reply normally. On the commit before #175837, both spellings reach the model step; on #175837, the uppercase spelling hangs. ## User Impact - One-shot `agent --local` turns and OpenAI-compatible HTTP requests with mixed-case session keys run and reply again. - They reach the same session as the lowercase spelling, as the Gateway route already does. - `--json` output now reports the stored (canonical) spelling of the session key, which is the spelling the Gateway route already prints. - Signal group ids and Matrix room ids keep their case. Two peers whose ids differ only by case stay two separate sessions. ## Why This Change Was Made The agent command claims a session twice, under two spellings of the same key: - `resolveSessionKeyForRequestInternal` (`src/agents/command/session.ts`) read the store with the canonical key (`normalizeStoreSessionKey`) but returned the request spelling. - The outer turn (`agentCommandInternal` → `withSessionTurn`) claimed the session under that request spelling. - The nested embedded run claims it under the canonical store key. - The session controller matches aliases exactly, so the nested claim did not join the outer turn. Both claims share the session id, so the nested claim queued on the same controller entry behind the outer turn and waited for it forever. - Nothing else was pending, so a one-shot Node process drained its event loop and exited 13. A Gateway process kept the HTTP request open instead. The fix returns the canonical key from the resolver's final path, as its session-id paths already do. `resolveSession`'s second normalize is removed. A request spelling no longer reaches the session controller. #142746 chose to keep the request spelling ("routing keeps the request key"). That choice was harmless until the session controller started matching aliases exactly. The table test that pinned the request spelling now pins the canonical locator, with a note that it supersedes #142746. Caller audit: | Reader | Effect | |---|---| | `resolveSession` → agent command (`--local`, Gateway ingress, HTTP, plugin runtime, hooks) | Gets the canonical key. The Gateway `agent` route already canonicalized, so it is unchanged. | | `resolveSessionKeyForRequestCore`: `session-bootstrap.ts` backfill and Gateway `agent-request-routing.ts` | Inputs are session ids only. These take the session-id paths, which were already canonical. Unchanged. | | `resolveSessionKeyForRequestCore`: `agent-via-gateway.ts` (Gateway route, non-agent-shaped keys) | The result is sent to the Gateway, which canonicalizes it with the same codec. No behavior change. | | `resolveExistingSessionKeyForRequest` (`run-session-target.ts`, `agent-request-routing.ts`) | Session-id lookups. Unchanged. | | `--deliver` | Targets come from `--to`/`--channel` or the session entry's stored route (`resolveAgentDeliveryPlanWithSessionRoute`), not from parsing the key. The outbound session key now equals the runner's key. The Gateway route already passed canonical keys here. | | `--json` | Prints the canonical spelling (the Gateway route already does). | ## Entry point audit: one canonicalizer There is one codec that turns a caller's session key into the stored spelling: `normalizeSessionKeyPreservingOpaquePeerIds` (`packages/session-url-contract/src/session-key-normalization.ts:117`). It lowercases the key except Signal group ids and Matrix room ids. Every other name is a thin wrapper over it: - `normalizeStoreSessionKey` (`src/config/sessions/store-entry.ts:16-18`) returns `normalizeSessionKeyPreservingOpaquePeerIds(sessionKey)` and nothing else. - `parseAgentSessionKey` (`session-key-normalization.ts:160-164`) parses the codec's output. `toAgentStoreSessionKey` (`src/routing/session-key.ts:91`) uses that parse and the codec. - The Gateway's `resolveSessionStoreKey` / `resolveSessionStoreIdentity` (`src/gateway/session-store-key.ts:144`, `:255`) call the codec directly. The nested embedded run always claims the session under this spelling (`src/agents/embedded-agent-runner/run/session-bootstrap.ts:328-338`), so every outer claim must use it too. | Entry point | Path to the session claim | Calls the codec? | |---|---|---| | Gateway `agent` | `src/gateway/agent-turn/agent-request-routing.ts:252` uses the store identity from `session-store-key.ts:255` → `agentCommandFromGatewayIngress` → `resolveSession` | Yes, already on `main` | | `agent --local` | `src/commands/agent-via-gateway.ts:845` → `agentCommand` → `src/agents/command/prepare.ts:242` `resolveSession` → `src/agents/command/session.ts:475-486` | **This PR.** `main` returned the typed spelling. Red-on-main test. | | `/v1/chat/completions` | `src/gateway/openai-http.ts:437` (raw header or `user` key) → `src/gateway/openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | `/v1/responses` | `src/gateway/openresponses-http.ts:272` → `openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | Hooks and webhooks | `src/gateway/server/hooks.ts:315` runs a cron turn with `session:<key>`; `hooks.ts:449` builds its queue key with `resolveCronAgentSessionKey` | Yes, already on `main`, through the cron row | | Cron session targets | `src/cron/session-target.ts:29` → `src/cron/isolated-agent/run-prepare.ts:150` → `src/cron/isolated-agent/session-key.ts:15` `toAgentStoreSessionKey` (run: `agent:main:hook:GitHub-PR-1` → `agent:main:hook:github-pr-1`; `agent:main:signal:group:AbC123` unchanged) | Yes, already on `main` | | `sessions_send` by key | `src/agents/tools/sessions-send-executor.ts:334` `resolveSessionStoreKey`, then the Gateway `agent` method (`sessions-send-tool.delivery.ts:483`) | Yes, already on `main` | | ACP via the agent command or channel dispatch | `src/agents/command/prepare.ts:321` (`acpResolution` from `resolveSession`'s key); `src/auto-reply/reply/dispatch-acp.ts:127` (resolved ACP key) | Yes (agent-command ACP turns through this PR) | | ACP control plane | `src/acp/control-plane/manager.utils.ts:63-85` `resolveAcpSessionTarget` and `acpSessionActorKey` | **This PR.** `main` lowercased with a plain `toLowerCase` before the store codec, which merged case-distinct Signal/Matrix peers into one actor and pointed a mixed-case key at its lowercase neighbor's row. Both now use `normalizeStoreSessionKey`. Red-on-main test. | Also in this PR, `resolveSessionKeyForRequestInternal` normalizes before main-alias matching. `agent:main:MAIN` with a custom `session.mainKey` now reaches the configured main session instead of a separate `agent:main:main` row (red-on-main test). No other listed entry point bypasses the codec. ## Evidence Reproduced on `main` (2cd6be7) through the published entry point (`node openclaw.mjs agent --local … --json`), with an isolated state dir and no provider (a turn that reaches the model step ends in a visible `Unknown model` error): - 8 of 8 runs with uppercase keys exited 13 with empty stdout and made no model request. 4 of 4 runs with lowercase keys reached the model step. - Swapping case moves the failure: `agent:main:channel:c3tt2oeiaj7` works and `agent:main:dm:Marcus-Lindqvist` fails, so the trigger is case, not the channel kind. - With a local fake OpenAI-compatible provider: `--local` with a lowercase key replied "OK"; with an uppercase key it exited 13 with 0 provider requests. The Gateway `agent` route with the uppercase key replied "OK". `POST /v1/chat/completions` with `x-openclaw-session-key: agent:main:openai:HttpUpper-ABC` got no response in 60 s (0 provider requests); the lowercase spelling answered 200. - An `async_hooks` trace located the pending promise in `claimSessionControllerTask` (the nested claim waiting behind the outer turn on the same controller entry). A probe showed the outer key `…Marcus-Lindqvist` and the nested key `…marcus-lindqvist`. Tests (red on the merge base, green on this branch): - `src/agents/command/session.exact-target.test.ts`: the resolver returns the persisted locator (ULID, Slack-style channel, mixed-case DM and case in the `agent:Main:Signal` prefix are red on base). Both spellings continue the same session. Signal and Matrix opaque peer ids keep their case. Peers that differ only by case (`signal:group:AbC123` / `abc123`, and the same for Matrix) stay separate sessions with separate entries and session ids. That test is green on base too: main already keeps them apart, and this change keeps that. - `src/commands/agent-local.session-key-case.test.ts`: real `agent --local` turns against a fake provider, each bounded by a 45 s race. The Slack-style channel and mixed-case DM rows are red on base ("did not settle"). The case-only Signal pair runs two turns with two distinct sessions. - `src/gateway/openai-compatible-session-key-case.server.test.ts`: `/v1/chat/completions` and `/v1/responses` with an uppercase `x-openclaw-session-key`. Both are red on base ("did not answer" within 45 s). On this branch both reach the model step. - `src/acp/control-plane/manager.utils.session-key-case.test.ts` (new): case-distinct Signal group and Matrix room pairs resolve to distinct ACP targets and actor keys, and the mixed-case target finds its own persisted row. Both rows are red on the merge base, where the targets came out lowercased and merged. - `session.exact-target.test.ts` main-alias rows: `agent:main:MAIN` / `agent:main:Main` with `session.mainKey: "work"` resolve to `agent:main:work`. Red on the merge base, which returned `agent:main:MAIN`. - ACP consumers green after the ACP change: `manager.test`, `manager.initialize-session`, `manager.cancel-session`, `manager.runtime-handle-ensure.reset`, `agent.acp`, plus the three session-key-case files (6 shards). - Consumers rerun green: `session-store`, `session.yielded-parent-reuse`, `agent-command.live-model-switch`, `embedded-agent-runner.e2e`, `session-bootstrap.detached`, `session-suspension`, `agent.session`, `agent-via-gateway` (8 shards). - `pnpm check:changed`: typecheck, lint, format and guards pass. The dead-export scan fails on five exports this change does not touch (the same on `main`). The same CLI reproduction on this branch: all 12 runs reach the model step and end with the visible `Unknown model` error (exit 1, JSON on stdout). None exits 13. | case | session key | exit | stdout | wall | stderr marker | |---|---|---|---|---|---| | lower 1 (fresh) | agent:main:dm:marcus-lindqvist | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | | upper 1 (after DM) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 5s | Unknown model: openai/gpt-5-mini | | upper 2 (repeat) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 2 (same session, lowercase) | agent:main:channel:c3tt2oeiaj7 | 1 | 260 B | 11s | Unknown model: openai/gpt-5-mini | | upper 3 (mixed-case DM) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | upper 4 (mixed-case DM repeat) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 3 | agent:main:dm:marcus-lindqvist | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 5 (fresh state, first turn) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 7s | Unknown model: openai/gpt-5-mini | | upper 6 (Slack-style) | agent:main:slack:channel:C0123ABCDEF | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 7 | agent:main:dm:Dana-Okafor | 1 | 260 B | 10s | Unknown model: openai/gpt-5-mini | | upper 8 (case in prefix) | agent:Main:Channel:C3TT2OEIAJ7 | 1 | 260 B | 12s | Unknown model: openai/gpt-5-mini | | lower 4 | agent:main:channel:c0123abcdef | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | Merge danger: two-way door. No stored data, schema, config or protocol changes. Stored session rows already use the canonical key, so a revert restores the old behavior exactly. Blast radius: every caller of the agent command that passes a mixed-case session key. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit d754de8) Release adaptation: Allow a 120 s bounded fake-provider CLI completion race: the cold checkout exceeded the original 45 s once; a traced rerun passed local CLI and exact-target regressions. Co-authored-by: RomneyDa <[email protected]>
…enclaw#208435) ## What Problem This Solves `openclaw agent --local` stops with no reply and no error when the session key contains an uppercase letter. Examples are a Slack channel id (`agent:main:channel:C0123ABCDEF`) or a mixed-case DM name (`agent:main:dm:Dana-Okafor`). - No model request is made. Stdout is empty. Node prints only `Warning: Detected unsettled top-level await` and exits with code 13. - Scripts, CI jobs, cron and evaluation harnesses that drive one-shot turns get nothing back. - The OpenAI-compatible HTTP endpoints (`/v1/chat/completions`, `/v1/responses`) with an uppercase `x-openclaw-session-key` never answer: the request hangs in the Gateway. - Lowercase keys, and the Gateway `agent` route, work. Regression from openclaw#175837 (one session controller for turns, queues and Stop), first released in v2026.11.5. 2026.10.x and 2026.11.1-11.4 reply normally. On the commit before openclaw#175837, both spellings reach the model step; on openclaw#175837, the uppercase spelling hangs. ## User Impact - One-shot `agent --local` turns and OpenAI-compatible HTTP requests with mixed-case session keys run and reply again. - They reach the same session as the lowercase spelling, as the Gateway route already does. - `--json` output now reports the stored (canonical) spelling of the session key, which is the spelling the Gateway route already prints. - Signal group ids and Matrix room ids keep their case. Two peers whose ids differ only by case stay two separate sessions. ## Why This Change Was Made The agent command claims a session twice, under two spellings of the same key: - `resolveSessionKeyForRequestInternal` (`src/agents/command/session.ts`) read the store with the canonical key (`normalizeStoreSessionKey`) but returned the request spelling. - The outer turn (`agentCommandInternal` → `withSessionTurn`) claimed the session under that request spelling. - The nested embedded run claims it under the canonical store key. - The session controller matches aliases exactly, so the nested claim did not join the outer turn. Both claims share the session id, so the nested claim queued on the same controller entry behind the outer turn and waited for it forever. - Nothing else was pending, so a one-shot Node process drained its event loop and exited 13. A Gateway process kept the HTTP request open instead. The fix returns the canonical key from the resolver's final path, as its session-id paths already do. `resolveSession`'s second normalize is removed. A request spelling no longer reaches the session controller. openclaw#142746 chose to keep the request spelling ("routing keeps the request key"). That choice was harmless until the session controller started matching aliases exactly. The table test that pinned the request spelling now pins the canonical locator, with a note that it supersedes openclaw#142746. Caller audit: | Reader | Effect | |---|---| | `resolveSession` → agent command (`--local`, Gateway ingress, HTTP, plugin runtime, hooks) | Gets the canonical key. The Gateway `agent` route already canonicalized, so it is unchanged. | | `resolveSessionKeyForRequestCore`: `session-bootstrap.ts` backfill and Gateway `agent-request-routing.ts` | Inputs are session ids only. These take the session-id paths, which were already canonical. Unchanged. | | `resolveSessionKeyForRequestCore`: `agent-via-gateway.ts` (Gateway route, non-agent-shaped keys) | The result is sent to the Gateway, which canonicalizes it with the same codec. No behavior change. | | `resolveExistingSessionKeyForRequest` (`run-session-target.ts`, `agent-request-routing.ts`) | Session-id lookups. Unchanged. | | `--deliver` | Targets come from `--to`/`--channel` or the session entry's stored route (`resolveAgentDeliveryPlanWithSessionRoute`), not from parsing the key. The outbound session key now equals the runner's key. The Gateway route already passed canonical keys here. | | `--json` | Prints the canonical spelling (the Gateway route already does). | ## Entry point audit: one canonicalizer There is one codec that turns a caller's session key into the stored spelling: `normalizeSessionKeyPreservingOpaquePeerIds` (`packages/session-url-contract/src/session-key-normalization.ts:117`). It lowercases the key except Signal group ids and Matrix room ids. Every other name is a thin wrapper over it: - `normalizeStoreSessionKey` (`src/config/sessions/store-entry.ts:16-18`) returns `normalizeSessionKeyPreservingOpaquePeerIds(sessionKey)` and nothing else. - `parseAgentSessionKey` (`session-key-normalization.ts:160-164`) parses the codec's output. `toAgentStoreSessionKey` (`src/routing/session-key.ts:91`) uses that parse and the codec. - The Gateway's `resolveSessionStoreKey` / `resolveSessionStoreIdentity` (`src/gateway/session-store-key.ts:144`, `:255`) call the codec directly. The nested embedded run always claims the session under this spelling (`src/agents/embedded-agent-runner/run/session-bootstrap.ts:328-338`), so every outer claim must use it too. | Entry point | Path to the session claim | Calls the codec? | |---|---|---| | Gateway `agent` | `src/gateway/agent-turn/agent-request-routing.ts:252` uses the store identity from `session-store-key.ts:255` → `agentCommandFromGatewayIngress` → `resolveSession` | Yes, already on `main` | | `agent --local` | `src/commands/agent-via-gateway.ts:845` → `agentCommand` → `src/agents/command/prepare.ts:242` `resolveSession` → `src/agents/command/session.ts:475-486` | **This PR.** `main` returned the typed spelling. Red-on-main test. | | `/v1/chat/completions` | `src/gateway/openai-http.ts:437` (raw header or `user` key) → `src/gateway/openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | `/v1/responses` | `src/gateway/openresponses-http.ts:272` → `openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | Hooks and webhooks | `src/gateway/server/hooks.ts:315` runs a cron turn with `session:<key>`; `hooks.ts:449` builds its queue key with `resolveCronAgentSessionKey` | Yes, already on `main`, through the cron row | | Cron session targets | `src/cron/session-target.ts:29` → `src/cron/isolated-agent/run-prepare.ts:150` → `src/cron/isolated-agent/session-key.ts:15` `toAgentStoreSessionKey` (run: `agent:main:hook:GitHub-PR-1` → `agent:main:hook:github-pr-1`; `agent:main:signal:group:AbC123` unchanged) | Yes, already on `main` | | `sessions_send` by key | `src/agents/tools/sessions-send-executor.ts:334` `resolveSessionStoreKey`, then the Gateway `agent` method (`sessions-send-tool.delivery.ts:483`) | Yes, already on `main` | | ACP via the agent command or channel dispatch | `src/agents/command/prepare.ts:321` (`acpResolution` from `resolveSession`'s key); `src/auto-reply/reply/dispatch-acp.ts:127` (resolved ACP key) | Yes (agent-command ACP turns through this PR) | | ACP control plane | `src/acp/control-plane/manager.utils.ts:63-85` `resolveAcpSessionTarget` and `acpSessionActorKey` | **This PR.** `main` lowercased with a plain `toLowerCase` before the store codec, which merged case-distinct Signal/Matrix peers into one actor and pointed a mixed-case key at its lowercase neighbor's row. Both now use `normalizeStoreSessionKey`. Red-on-main test. | Also in this PR, `resolveSessionKeyForRequestInternal` normalizes before main-alias matching. `agent:main:MAIN` with a custom `session.mainKey` now reaches the configured main session instead of a separate `agent:main:main` row (red-on-main test). No other listed entry point bypasses the codec. ## Evidence Reproduced on `main` (cdb53af) through the published entry point (`node openclaw.mjs agent --local … --json`), with an isolated state dir and no provider (a turn that reaches the model step ends in a visible `Unknown model` error): - 8 of 8 runs with uppercase keys exited 13 with empty stdout and made no model request. 4 of 4 runs with lowercase keys reached the model step. - Swapping case moves the failure: `agent:main:channel:c3tt2oeiaj7` works and `agent:main:dm:Marcus-Lindqvist` fails, so the trigger is case, not the channel kind. - With a local fake OpenAI-compatible provider: `--local` with a lowercase key replied "OK"; with an uppercase key it exited 13 with 0 provider requests. The Gateway `agent` route with the uppercase key replied "OK". `POST /v1/chat/completions` with `x-openclaw-session-key: agent:main:openai:HttpUpper-ABC` got no response in 60 s (0 provider requests); the lowercase spelling answered 200. - An `async_hooks` trace located the pending promise in `claimSessionControllerTask` (the nested claim waiting behind the outer turn on the same controller entry). A probe showed the outer key `…Marcus-Lindqvist` and the nested key `…marcus-lindqvist`. Tests (red on the merge base, green on this branch): - `src/agents/command/session.exact-target.test.ts`: the resolver returns the persisted locator (ULID, Slack-style channel, mixed-case DM and case in the `agent:Main:Signal` prefix are red on base). Both spellings continue the same session. Signal and Matrix opaque peer ids keep their case. Peers that differ only by case (`signal:group:AbC123` / `abc123`, and the same for Matrix) stay separate sessions with separate entries and session ids. That test is green on base too: main already keeps them apart, and this change keeps that. - `src/commands/agent-local.session-key-case.test.ts`: real `agent --local` turns against a fake provider, each bounded by a 45 s race. The Slack-style channel and mixed-case DM rows are red on base ("did not settle"). The case-only Signal pair runs two turns with two distinct sessions. - `src/gateway/openai-compatible-session-key-case.server.test.ts`: `/v1/chat/completions` and `/v1/responses` with an uppercase `x-openclaw-session-key`. Both are red on base ("did not answer" within 45 s). On this branch both reach the model step. - `src/acp/control-plane/manager.utils.session-key-case.test.ts` (new): case-distinct Signal group and Matrix room pairs resolve to distinct ACP targets and actor keys, and the mixed-case target finds its own persisted row. Both rows are red on the merge base, where the targets came out lowercased and merged. - `session.exact-target.test.ts` main-alias rows: `agent:main:MAIN` / `agent:main:Main` with `session.mainKey: "work"` resolve to `agent:main:work`. Red on the merge base, which returned `agent:main:MAIN`. - ACP consumers green after the ACP change: `manager.test`, `manager.initialize-session`, `manager.cancel-session`, `manager.runtime-handle-ensure.reset`, `agent.acp`, plus the three session-key-case files (6 shards). - Consumers rerun green: `session-store`, `session.yielded-parent-reuse`, `agent-command.live-model-switch`, `embedded-agent-runner.e2e`, `session-bootstrap.detached`, `session-suspension`, `agent.session`, `agent-via-gateway` (8 shards). - `pnpm check:changed`: typecheck, lint, format and guards pass. The dead-export scan fails on five exports this change does not touch (the same on `main`). The same CLI reproduction on this branch: all 12 runs reach the model step and end with the visible `Unknown model` error (exit 1, JSON on stdout). None exits 13. | case | session key | exit | stdout | wall | stderr marker | |---|---|---|---|---|---| | lower 1 (fresh) | agent:main:dm:marcus-lindqvist | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | | upper 1 (after DM) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 5s | Unknown model: openai/gpt-5-mini | | upper 2 (repeat) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 2 (same session, lowercase) | agent:main:channel:c3tt2oeiaj7 | 1 | 260 B | 11s | Unknown model: openai/gpt-5-mini | | upper 3 (mixed-case DM) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | upper 4 (mixed-case DM repeat) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 3 | agent:main:dm:marcus-lindqvist | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 5 (fresh state, first turn) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 7s | Unknown model: openai/gpt-5-mini | | upper 6 (Slack-style) | agent:main:slack:channel:C0123ABCDEF | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 7 | agent:main:dm:Dana-Okafor | 1 | 260 B | 10s | Unknown model: openai/gpt-5-mini | | upper 8 (case in prefix) | agent:Main:Channel:C3TT2OEIAJ7 | 1 | 260 B | 12s | Unknown model: openai/gpt-5-mini | | lower 4 | agent:main:channel:c0123abcdef | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | Merge danger: two-way door. No stored data, schema, config or protocol changes. Stored session rows already use the canonical key, so a revert restores the old behavior exactly. Blast radius: every caller of the agent command that passes a mixed-case session key. Co-authored-by: Ayaan Zaidi <[email protected]>
* test(gateway): remove unused metadata entry default (#208164) * chore(ui): refresh control ui locales (#208476) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * test(gateway): remove unused prediction fixture default (#208166) * fix: keep the cached sidebar roster check reliable on a cold worker (#208461) Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 410bb4cf-c29c-4e08-8aab-8c0f0b321532 * fix(ios): match the Fast and Ultrafast bolts in the dial and Speed menu (#207692) * fix(ios): balance the Fast and Ultrafast bolts * fix(ios): keep only the composer bolt change * fix(ios): match the Speed menu bolts and space the closed row like a system icon * fix: restore the sidebar snapshot lint check (#208479) * fix: restore the sidebar snapshot lint check Rename local callback parameters and the scoped reader in the owner-filter fixture. Keep the snapshot, cache behavior and assertions unchanged. Co-authored-by: vyctorbrzezowski <[email protected]> * fix: restore the sidebar snapshot lint check Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: ee953e0e-0c10-83c8-9992-53887f23812a --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> * fix(ui): show automation actions and the calendar icon in chat (#208475) * fix(ui): show automation actions and the calendar icon in chat * fix(ui): preserve existing scheduler detail formatting * fix(ui): show automation actions in the collapsed chat headline * fix: let Workshop target agents on a remote Gateway (#208457) Resolve an explicit Workshop agent against the selected remote Gateway instead of requiring a client workspace. Preserve local selection, offline fallback, and mutation custody. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 63c9e22e-6f63-4efb-a0ec-9a70623b7bdc * improve(ios): hop the subagent avatars only when three or more are working (#207687) * fix(memory): avoid rereading unchanged transcripts during offline backfill (#208434) Reuse verified transcript candidates across bounded offline backfill batches. Preserve chronological selection, transcript-order checkpoints, and independent Gateway requests. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 3ee04411-cfd2-494c-8b0d-68089159440d * fix(ios): show the chat's name in the header for older chats (#207685) * test(gateway): remove unused global identity fixture default (#208168) * fix(ios): show the chat's name and actions for older chats (#207694) * fix(ios): show the chat's name in the header for older chats * fix(ios): show the chat's name and actions for older chats * fix: report skipped manual automation runs without timing out (#208453) Record the exact manual attempt alongside its finished event. Leave the deferred occurrence, retry policy, and previous job outcome untouched. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: c301e60c-7efb-49a1-b5cf-5ad85cc72d86 * fix: exercise the parent’s final check in child-handoff tests (#208478) Keep the original requester report and answer the same-turn recheck silently before accepting a Goal nudge or ending the browser scenario. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: ae0be9d4-dfa4-488d-85ee-d876220d04cf * test(gateway): remove unused injection source defaults (#208171) * fix: check the current notice for revoked runs after restart (#208484) Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 44c03bd5-4bf1-426c-8e5d-ac798e8aed01 * chore(ui): refresh control ui locales (#208500) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * test(gateway): remove unreachable approval-reader branches (#208148) * fix: model empty announcements in the stream script checkpoint test (#208482) Keep the default announce policy and report the empty-output suppression from the script runner. Without that outcome the scheduler correctly retains the prior checkpoint because required delivery is unknown. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 0dfba296-8737-4fe6-840e-34a02b298cce * fix: tell browser users when to retry after throttling Co-authored-by: VACInc <[email protected]> * fix: keep agent work moving past recoverable setup failures Co-authored-by: VACInc <[email protected]> * fix(ollama): preserve model namespaces and custom-provider shortcuts (#208401) Try the configured model name first on custom Ollama providers. Retry the shorter name once when Ollama reports that exact model missing. Classify the bounded response before redacting the diagnostic. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 62864529-04ab-4958-9344-d900f5f5c944 OpenClaw-Publication: 10a0d16a-0d8b-477d-bec9-d5a5646cc8ee OpenClaw-Publication: b9c708fb-a950-4344-ab46-7cc0109d0dbe * fix: keep unrelated work going during background waits Co-authored-by: VACInc <[email protected]> * test(gateway): remove unused request fixture defaults (#208141) * fix: report image size presets without marking them ignored (#208436) Report the preset sent by the image provider and flag returned files whose dimensions differ from that preset. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: d1dd36c3-16e3-4571-9f1c-a7281abfecc0 * feat(ios): show messages with many images as a stack that opens the whole gallery (#207679) * feat(ios): open large photo messages as a stack * fix(ios): restore photo stack preview retries * fix: keep the sidebar reload test’s pins in its owner filter (#208510) Give the fixture’s pinned sessions the active owner so the warm-reload checks exercise the same unselected row and all seven PR badges. Keep production filtering and the handoff assertions unchanged. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 5b3e6d5a-8804-4266-a591-dc4e944e476c * fix(packaging): preserve root Ciao when packing hardlinked dependencies (#201049) Pack npm-selected files from a private copy when a bundled dependency shares inodes with a warm pnpm store. Use the existing bundle restager so the installed root package can resolve patched Ciao and the standalone plugin keeps its own dependencies. Keep npm inventory code outside the Docker packaging CLI's startup imports so an isolated checkout can still parse arguments. Refs #198010, #198011 and #199156. Co-authored-by: Vincent Koc <[email protected]> OpenClaw-Publication: 80f31ad4-a520-8ab8-95ad-dc374a12031e Co-authored-by: vincentkoc <[email protected]> * docs: show where to find run status in Threads (#208486) Document the unread dot on collapsed Threads rows and where to find run status, session kind, and token usage. Readers can use the row menu to manage a session. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: bed96ea2-9fab-49ae-af48-cc68cfd4e937 * fix: retain callers in main-thread stall profiles (#208503) * fix: stop switching models when a session entry changes during a turn (#208480) Root cause: src/agents/failover-error.ts:63 `RUNTIME_COORDINATION_ERROR_NAMES` does not list the SQLite session-entry conflict errors, so model fallback classifies a local session-entry write conflict as a model failure and moves on to the next model. Fixes #208432 ## What Problem This Solves Sometimes another write changes a session's stored entry while a turn is preparing its own write to it. OpenClaw then raises `SqliteSessionMutationConflictError` ("SQLite session state changed while preparing session-entry.patch"). Model fallback treated that local error as a provider failure. It logged `candidate_failed` and tried every configured fallback model, within milliseconds and before any provider request. The turn then ended on the last fallback, often a small local model, or failed with `UNAVAILABLE` when the chain ran out. The reporter saw 136 false fallback decisions across 64 runs on one gateway. ## User Impact A session-entry conflict no longer switches models. The turn stops at the current model and reports the original conflict error. The transcript-conflict sibling (`SqliteTranscriptMutationConflictError`) already worked this way, and so did session capability metadata changes (#179290). Real provider failures fall back exactly as before. This PR stops the false fallback walk. It does not remove the conflict itself (see Evidence). ## Why This Change Was Made `resolveModelFallbackError` already has one owner for local coordination errors: errors named in `RUNTIME_COORDINATION_ERROR_NAMES` resolve to `coordination`. The fallback attempt then logs `chain_stopped reason=local_runtime_coordination` and rethrows the original error. This PR adds two names: - `SqliteSessionMutationConflictError`, the reported error. - `SessionEntryLifecycleUpsertConflictError`, its lifecycle-upsert sibling. It is the same class of stale-entry conflict and takes the same stop path. Both worker transports rebuild these errors under their real names: `session-actor-storage-result.ts` and `openclaw-state-worker-error-identity.ts`. So the name check matches on the real path, wrapped causes included. Changing models can never fix a stale session snapshot, so whichever writer caused the conflict, walking the chain is wrong. This is the same change as #179312. ## Evidence - Source: on main and in the reporter's 2026.11.10-11.12 dist, `resolveModelFallbackError` returns `unknown` for these errors. `model-fallback-attempt.ts` then returns `{ error }` and starts the next candidate. - Regression: two rows in `src/agents/model-fallback.terminal-boundary.test.ts`, one per error. Each sends the conflict through the state-worker encode/decode (`identifyError`/`createError`) into `runWithModelFallback`. - With the classifier change reverted, they fail: the runner treats the conflict as a provider failure and consults provider failover policy. - With it, `run` is called once, no fallback step or error callback fires, and the original error is rethrown. - Control, built Gateway (main `64503d2d75`) in an isolated container with mock providers: a real HTTP 529 from the primary still gives `candidate_failed ... reason=overloaded` and then `candidate_succeeded` on the fallback (3/3 turns). - Not reproduced: the competing writer. On a built main Gateway I tried: - operator `sessions.patch` label changes during turns. They are admitted through session lifecycle and lose the race themselves. - a second `agent` message into the same session mid-turn. It was rejected. - 15 subagent spawns on a Claude CLI fallback chain. - holding an in-candidate session write open for 1.5-3 s. None produced the conflict. The likely source is the Claude CLI runner's in-candidate compare-and-swap writes reading a cached snapshot. That is storage code and out of scope here. The user evidence is the reporter's production logs: 156 conflicts, 136 `candidate_failed` with one error hash, every candidate failing about 30 ms after the previous one, before any provider call. - Details: https://github.com/openclaw/openclaw/pull/208480#issuecomment-7260755152 Thanks @YK-03 for the fix and @Fahd84110 for the detailed report and log analysis. Merge danger: two-way door. Two entries in an error-name list, no stored state or contract change; a revert fully restores the old routing. Blast radius: only turns that hit these local session-entry conflicts, which now stop instead of switching models. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: tell sessions_send notify callers when the target's event queue is full (#208411) Root cause: src/agents/tools/sessions-send-tool.delivery.ts:98 `sessions_send` notify enqueues through `enqueueSystemEventEntry`, which logs the queue owner's `SystemEventQueueFullError` and returns null, so the tool turns a full queue into the generic "Notification was not queued." Fixes #206751 ## What Problem This Solves When a session already has 20 passive notices waiting (for example notify messages sent while it had no turn), every `sessions_send` with `mode: "notify"` to it fails with "Notification was not queued." The caller can't tell why, or what to do; the reason only shows up as a Gateway log line. ## User Impact The notify result now carries the queue's own explanation: "System event queue is full (20 pending). Let the session process pending events before retrying the notification." Nothing else changes: queue size, which turns drain the queue, and the watch-notice text stay as they are. Other refusals (duplicate notice, replaced store) still return "Notification was not queued." ## Why This Change Was Made The queue owner already throws this error for callers that ask for it (`enqueueRequiredSystemEventEntry`, `enqueueSystemEventWithReceipt`). Notify now asks for it on the passive pool too and returns the message. It doesn't switch to the waking API, so a notify still never starts a turn. The draining part of the report (followups and handoffs never consuming the backlog on 2026.11.6) is already fixed on main by #197725 (c418b20a51fb) and #197692 (e0a9dad7cd1c), first shipped in 2026.11.10-beta.1. The Gateway run below checks that. ## Evidence Built Gateway in a secretless container with a scripted chat-completions model and the built-in runtime. Agent `main`'s main session gets only internal turns. It watches another session that changes three times, receives 21 notifies from another agent, runs a main-session cron systemEvent job, and then gets a `sessions_send` followup. - main ff5c787a6229: 19 notifies queued (one slot held by a pending watch notice), then `{"status":"error","error":"Notification was not queued."}` twice. - this branch: the same run, but those two results are `{"status":"error","error":"System event queue is full (20 pending). Let the session process pending events before retrying the notification."}`. - Identical on both: three watch changes produced one notice, which was consumed by its own turn. The cron turn did not consume the passive notices, which is intended. The followup turn adopted all 20 notes, and the next notify was queued. Full proof output: https://github.com/openclaw/openclaw/pull/208411#issuecomment-7258856547 - Regression `sessions-send-tool.admission.test.ts` ("tells the notifying caller when the passive queue is full") fails on main with the generic message and passes here. `system-events.capacity`, `local-request-context.session-notify` and `agent-command.sessions-send-system-events` also pass. Thanks @jaimeehenry for the detailed report and refill timings. Merge danger: two-way door. The change only affects the error text of a refused notify; nothing is stored. Blast radius: `sessions_send` notify callers that hit a full queue. Observed proof lines: https://github.com/openclaw/openclaw/pull/208411#issuecomment-7258856547 Co-authored-by: Ayaan Zaidi <[email protected]> * fix(ui): keep desktop chat Details from failing after shell recovery (#208485) Publish the desktop Details observers without returning the signal setter’s result to Solid. Cover empty-panel discovery with a browser regression. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 747c757b-12c9-4962-85e7-629db68d9ab4 * test(gateway): remove unused request fixture default (#208180) * fix(macos): recover credentials from the legacy app directory (#208315) Use the matching bundled Doctor to migrate supported OpenClaw shared state in the separate Mac identity directory, then retry credential admission. Keep independent native imports read-only. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: f45adf5e-6357-446d-9889-0d50c265a8af * fix(gateway): keep the access-loss notice out of a reset conversation (#208495) ## What Problem This Solves When an owner removes someone from a shared session while that person's reply is streaming, OpenClaw stops the run and posts "Stopped 1 run started by Carol: their access to this session changed." If the stopped producer is still finishing, that notice is written by a background task. If the owner resets the session right after (`/new`, New chat, `sessions.reset`), the reset can commit before that task runs. The notice then opens the **new** conversation with a line about the old one, and the model reads it in its next prompt. On a real Gateway this happened in 29 of 30 attempts. Cause: the notice is addressed by session key only. Reset keeps the transcript id and rotates the conversation's lifecycle revision. The inject checks only the transcript id, so it cannot tell the retired conversation from the new one. ## Fix The notice holds the incarnation of the conversation its runs were stopped in, using the existing transcript-lease owner (`acquireTranscriptLease(chat, pin, { exact: "lifecycle" })`, the same hold cron occurrences use). - The pin comes from the snapshot the Stop already loads, before the stop. The lease is taken inside the background notice task, after it waits for the stopped producer, and released when the task ends. - The lease's check runs through the inject's existing guard argument, which the transcript write calls inside the append. A reset that commits at any point before the append retires the notice. - A retired conversation skips the notice with one info log line ("the conversation was reset or deleted"). Any other failure keeps the existing warning. Neither reaches the permission writer. - The inject reports a revoked hold as an ordinary failure, so the task asks the lease itself before deciding. - No session-id comparison outside the owner: the session-identity ratchet is unchanged. ## The native Codex mirror after a reset: no code A scratch fixture showed that a stopped Codex turn's native mirror can append after the lifecycle revision rotates. That fixture rotated the revision directly. Through `sessions.reset` on a real Codex turn it did not happen (0 of 10): - Isolated Gateway, native Codex app-server, `openai/gpt-5.4-mini`. A ~1500-word reply was stopped mid-stream and the session reset, either right after Stop or by reset alone. - 0 of 10 runs put the partial in the new conversation; all 10 put it before the reset boundary. Control without reset: the partial is persisted (2 of 2). - Why: reset preempts the active run and waits for its settlement, including the mirror write, before committing (`session-reset-service.ts`, `policy: "preempt"`). Rollover and `/new` preempt the same way; delete waits. - Not checked: the implicit daily/idle freshness rotation during a later turn's admission (`deferImplicitRollover`, `agent-session-patch.ts`; CLI and cron callers). Named here as a residual; no failure observed. ## User Impact - A reset right after removing someone opens a clean conversation. - The old conversation keeps the stopped partial reply. Its notice is not written: that conversation was retired by the reset, and the transcript owner does not append to a retired conversation. - Access removal, its immediate reply, and the stopped run are unchanged. Without a reset, the notice is posted as before. - Incognito sessions: reset deletes them; a notice raced by that reset is dropped with a warning instead of the info line. - A sharing or permission change on the same session in the milliseconds between the notice taking its hold and writing also drops the notice with a warning. Ordinary writes by other members do not affect it. - A failed session lookup in the notice is now logged as a warning; it no longer fails the access-removal request on the path without a retained producer. ## Evidence - `src/gateway/server.participation-access-loss.test.ts` (real in-process Gateway): the notice is held at two points, before the notice task starts and after it took its hold, while `sessions.reset` commits. Both cases are red on the merge base on the assertion (the notice is in the new conversation) and green with the fix (6 of 6 in the file). The existing cases, including the notice without a reset, stay green. - Negative control for the test itself: with the notice's pin temporarily taken at notice time instead of before the stop (so the lease is granted after the reset), the "before the notice task starts" case goes red on the assertion. Reverted; not part of the change. - W16's original race on the real in-process Gateway (release the stopped producer, then reset at once, 5 attempts): notice in the new conversation 0 of 5 with the fix; 29 of 30 on main. - Session-identity ratchet unchanged; core typecheck clean. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: keep plugin migrations out of early update preparation (#208473) ## What Problem This Solves Updating to a build with a lower version label but newer database schemas can run that build's plugin maintenance while the old Gateway is still serving. This can migrate live state before the release trial can restore it, leaving the old build unable to read its own database. ## User Impact Candidates declaring a newer state **or agent** schema wait until their own Gateway is ready before maintaining plugins. Real downgrades keep their existing pre-trial maintenance, including releases without schema metadata; no extra command or prompt is added. This fixes the installed updater only. Shipped beta.1/beta.2 updaters keep invoking the candidate's maintenance command early, and the candidate-side command is unchanged: those beta users can still hit the reported semver-lower/schema-newer migration failure. This PR does not claim to repair that first hop. ## Why This Change Was Made The old branch assumed a lower semantic version could not carry a newer database schema. Read the prepared candidate's existing package schema metadata using the shared parser, and retain the branch only when neither schema exceeds the running build's matching version. Missing metadata preserves the older-release behavior. - v2026.11.11 and v2026.11.12 declare state schema 40 and agent schema 42, so both pass the new schema guard against running state 42 / agent 45. They retain pre-trial maintenance when the existing semver check identifies an actual downgrade; equal/newer versions still bypass this branch. - No launcher changes (format 4), new metadata fields, records, statuses, flags, retries, or scheduling. - Net against the base: production **+14**, tests **+33**, docs **+5** lines. The small guard is necessary to preserve downgrade maintenance while preventing early forward migrations; direction takes precedence over a line-neutral target. ## Evidence - **Red on main `baf938dfb8c2`**, mbp-m5, vitest-source: both schema-newer table cases incorrectly ran maintenance; the real plugin-lifecycle child also reached live-state admission before the trial. Three failures were the intended regressions; the three legacy/equal-version controls passed. Test duration 15.38 seconds. - **Green with this change**, mbp-m5, vitest-source: `ocx test src/update/prepare.test.ts -t 'defers semver-lower|maintains downgrade|already-current'` — **14 passed**, including missing metadata, older schemas, newer state, equal-state/newer-agent, and existing already-current behavior. Test duration 15.21 seconds. - Focused lint: both changed TypeScript files passed (5.30 seconds). Formatting: all three changed files passed (8 ms). - Local ClawSweeper reviewed exact head `e3baa43199d79e5ff9d59dc6abc02457d3101aa7`: complete, patch correct, zero source/security findings. Product-path lane results remain separate evidence. - [Current-head PR CI](https://github.com/openclaw/openclaw/actions/runs/46295242495): **green** on `c25395b4cbd6afcfa5159a22736297153d292418`, after the requested main merge brought in #208479's unrelated UI lint fix. The prior [CI run](https://github.com/openclaw/openclaw/actions/runs/46293669143) encountered that unchanged UI lint failure; no updater edits were needed. Build/type coverage ran in CI; no local broad suite was run. - [Package Acceptance](https://github.com/openclaw/openclaw/actions/runs/46294339408) exercised `e3baa43199d79e5ff9d59dc6abc02457d3101aa7`; this behavior proof is retained after the requested main-only merge: - [Survivor 2026.11.11](https://github.com/openclaw/openclaw/actions/runs/46294339408/job/141452129152): **passed** (18m56s). - [Survivor 2026.11.12](https://github.com/openclaw/openclaw/actions/runs/46294339408/job/141452129260): **passed** (24m40s). - [update-restart-auth, openclaw@latest](https://github.com/openclaw/openclaw/actions/runs/46294339408/job/141452129251): **passed** (29m41s). - Package integrity passed. The overall acceptance run is red only because the unrelated [npm 12 installed-package budget check](https://github.com/openclaw/openclaw/actions/runs/46294339408/job/141449644533) found 47,546 entries against a 47,500 budget (#208295); the aggregate correctly reports that failure. No retry or budget change was made. - Beta baselines are intentionally excluded because their shipped updater is not changed. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: dismiss passkey prompts from the remote Browser panel (#208407) Let a remote Browser panel user dismiss a pending native passkey prompt without reloading the page or losing form input. Keep native passkey sign-in available on the host. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 6312d4d5-5a52-4232-8d8d-5d3176acf091 * fix(android): avoid scanning system CAs before pinned Gateway connections (#208425) Implement Android’s hostname-aware trust-manager overload so OkHttp can validate a pinned leaf without indexing the platform CA store. Delegate platform-trusted chains to Android with the connection hostname. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: e7eceedd-d8ad-4117-a9ab-bf17e1b073c9 * fix: preserve child completion inputs across Gateway restarts (#208367) Reuse the accepted requester attribution for a completion replay under the same operator and session when restart no longer has the original tool caller. Keep exact input and receipt conflict checks. Verify both consumed inputs and the model-visible history delivery in the restart fixture. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: df68cb90-0108-4a28-a654-3645f36fe14e OpenClaw-Publication: 5a817054-c824-4889-8949-154e54475698 * test(gateway): remove unused steering fallback default (#208181) * fix: ask for an agent before Linux Quick Chat sends (#208431) Honor the Gateway roster when Quick Chat requires an explicit agent choice. Pressing Return retains the draft and opens the picker. After the user selects an agent, the next Return sends to that agent's session. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: ad454f08-fdff-4e14-bd03-471ba86defcc * fix: keep Matrix DM replies in the original thread (#208128) Preserve the case-sensitive Matrix DM thread root in session storage and reply ownership. Doctor restores the existing transcript and its idle local worker placement when Matrix delivery metadata identifies the original thread. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 1838c4b4-deed-4503-b3fb-8b73c0f74e0e OpenClaw-Publication: c478e718-8bb8-857e-be0c-91b9b5998ded * feat: choose where automations run (#201285) Let an automation run in a named conversation, use recent messages as context, or send a result to a selected chat. Save the conversation key so the link survives renaming. Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: a62843b0-acd0-83f5-b79e-f5cbf9cdbb9c Co-authored-by: daniel-lxs <[email protected]> * fix: avoid waiting for immutable update records during Gateway startup (#208471) Related: #208359 ## What Problem This Solves Gateway startup can wait for a SQLite child worker before opening its listener on an adopted immutable installation. A stalled worker can delay startup for its 300-second-plus timeout, even though this startup ownership check was meant to be file-only and best effort. ## User Impact Startup no longer inspects the immutable adoption database before binding. Packaging-owned macOS app, desktop app, and container installs still suppress self-update through `openclaw-install-owner.json`. Immutable layouts without that marker also suppress self-update, whether adopted or unadopted. Immutable installations are updated outside the Gateway service. The existing root/current/release layout detector uses file shape and `lstat` only; startup does not read the adoption record or launch its SQLite worker. Strict update admission is unchanged, including its refusal directing users to run `openclaw update` as root outside the service. ## Why This Change Was Made Replace the worker-backed startup inspection with the existing file-only immutable layout detector; keep packaging marker filtering and best-effort inspection warnings. No new statuses, records, timers, caches, owner fields, or other mechanisms. Whole PR versus main: production net -1 line; tests net +10 lines; total net +9. The follow-up versus reviewed head `bbce2253194c` is production +11 and tests +10. Only the startup module, its existing test, and an export on the existing immutable layout detector change. ## Evidence - Original main-baseline proof on mbp-m5 showed startup called `readImmutableInstallRecord` before bind. - The added immutable-layout regression failed against the pre-follow-up startup code: root, current-symlink, and release-directory entry points all incorrectly advertised `update.run`. - With this follow-up, `ocx test src/gateway/server-startup-plugins.test.ts -t "suppresses immutable self-update|advertises self-update"` passed all 7 selected cases on mbp-m5: three immutable entry points (without an owner marker), three packaging owners, and an unmarked mutable installation. Each immutable case asserts no worker-backed record read. Duration 23.93 seconds, mostly compiler preparation; assertions took 27 ms total. - Changed-file Oxfmt and Oxlint checks passed on mbp-m5 (3 files; 0 lint warnings/errors). - No local full build, full suite, browser click, or real worker timeout was run. CI supplies broad proof. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: keep unrelated tools running when a batch hits the repeat limit Co-authored-by: VACInc <[email protected]> * fix: check recorded automation owners before running (#201287) Check the recorded human owner before scheduled work and process-watcher launches. Scheduled occurrences read the saved owner when the in-memory catalog is cold. An administrator can recover a job whose owner has been removed. Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 01bffa98-2a33-8d2c-89aa-fcd0156303c7 Co-authored-by: daniel-lxs <[email protected]> * fix(gateway): start under a group-writable HOME when file logs are unavailable (#208499) ## Problem `openclaw gateway run` refuses to start when `$HOME` is group-writable without a sticky bit, which is common for shared container volumes: ``` [gateway] sidecars failed to start: WorkerTaskError: Directory "$HOME" is writable by group or others and has no sticky bit. ... Gateway failed to start: ... ``` `openclaw agent --local` in the same HOME runs normally and only drops file logs with `[openclaw] log directory unavailable; records dropped`. Users affected: containerized and shared-HOME installs. Shipped in v2026.11.10. Cause: the logging transport already decides that an unsafe default log directory means "drop records and warn". One reader bypassed that decision. The Gateway startup summary line `log file: <path>` (src/gateway/server-startup-log.ts) awaits `getResolvedLoggerSettings()`, which rethrows the resolution error. Since #197742 moved resolution into a worker, that await fails Gateway startup. Doctor's reader already caught the same error privately. ## Solution `getResolvedLoggerSettings()` owns the outcome. `file` is absent when the default log directory is unavailable, and it never throws for that. - Gateway startup prints `log file: unavailable`. The transport's existing warning still names the cause and the `chmod` fix. - Doctor drops its private try/catch and reads the same field. The directory safety check itself is unchanged. Temp roots, worker scratch and SQLite staging still refuse unsafe ancestors when they are used. ## Impact - The Gateway starts and runs turns under a group-writable HOME, as `--local` already does. File logs are still dropped, with the same warning. - `openclaw logs` and log tail use separate resolvers and are unchanged. - Not a security regression: config, credentials and state already live under the same HOME, and Gateways before v2026.11.10 started there. ## Evidence - `src/logging/logger-file-transport.worker.test.ts` now runs the existing default-root proof, whose `--disposable-default-root` path no test invoked. Its unsafe-directory step asserts `file` is absent. Red on main (`WorkerTaskError ... no sticky bit`), green here. - `test/e2e/gateway-unsafe-home.built-cli.e2e.test.ts`: built CLI, HOME 0775. The Gateway starts, logs `log file: unavailable` plus the transport's warning with the `chmod go-w` fix, and `agent` completes a turn. - Real CLI repro (built dist, isolated HOME 0775 with state under it, fake OpenAI-compatible server): main 3/3 `Gateway failed to start`; this branch 3/3 Gateway ready, turn completed. - Consumer suites green: doctor-format.test.ts, log-tail.test.ts, logger-settings.test.ts, logger-env.test.ts, server-startup-log.test.ts. - Readers of `getResolvedLoggerSettings()`: Gateway startup summary and Doctor's runtime hints (plus tests). `resolveTarget` rejects only while resolving the default root, and the writer already drops records on every such rejection, so the reader and the writer agree on "unavailable". - `LoggerResolvedSettings` (also exported from `openclaw/plugin-sdk/logging-core`) now marks `file` optional. Plugin SDK impact query (`sdk-export:openclaw/plugin-sdk/logging-core#LoggerResolvedSettings`, ClawHub, 2026-11-29): 0 plugins reference it (coverage 2,332 complete / 421 partial / 30 failed of 2,783); no bundled plugin imports it (`rg` over `extensions/`). No SDK function returns this type, so plugins can only construct it. - Typecheck at this head: `pnpm tsgo:core` clean. `pnpm tsgo:core:test` has one error, in `ui/src/pages/logs/view.test.tsx:21`, which this PR does not touch; it comes from base (#207383/#208163). The built-CLI e2e passes locally (13 s). Co-authored-by: Ayaan Zaidi <[email protected]> * chore(release): close out 2026.11.12 on main (#208158) * chore(release): close out 2026.11.12 on main Co-authored-by: RomneyDa <[email protected]> * fix(release): leave locale refresh to its dedicated workflow Co-authored-by: RomneyDa <[email protected]> * ci: refresh closeout checks after main lint fix Co-authored-by: RomneyDa <[email protected]> --------- Co-authored-by: RomneyDa <[email protected]> * test(gateway): remove unused steering cancellation default (#208173) * fix: recognize the file format for extensionless path lookups (#208516) Root cause: extensions/oc-path/src/cli.ts:92 `loadOcPathFile` chose the parser only from the address's file hint, so an extensionless address such as `oc://alias/count` was parsed as Markdown even when `--file settings.json` named a JSON file. Fixes #208496 Thanks @LinzeShi for the report and the fix. ## What Problem This Solves A caller can reuse an address such as `oc://alias/count` and point it at a JSON file with `--file settings.json`. Even when the file contains `count`, `path resolve` and `path find` report no match and `path set --value-json` refuses the edit. `path emit` already identifies the same file as JSON. ## Fix The shared loader now falls back to the file name when the address has no recognized extension: `kind = addressKind ?? inferKind(absPath)`. `resolve`, `find` and `set` all load through it. A format in the address still wins, so `oc://x.json/count --file snapshot.txt` keeps reading JSON. An unknown file extension with no address hint still parses as Markdown, as before. ## Tests One table-driven case in `cli.test.ts` runs resolve, find and a real `set` for both directions (extensionless address on `settings.json`, red on the merge base; JSON address on `snapshot.md`). The near-duplicate `CLI-R04` YAML resolve smoke test was removed: `CLI-F01` already resolves YAML leaves from the workspace. This keeps the file under its line cap. ## Evidence Built CLI (`pnpm build`, `node openclaw.mjs path ...`) in a clean container with only the oc-path plugin enabled, merge base `8ec71b2a1326` vs this branch. Output is in the evidence comment linked below. - Base: `resolve oc://alias/count --file settings.json` -> exit 1 `resolved:false`; `find 'oc://alias/*'` -> 0 matches; `set ... 2 --value-json` -> `not-writable`. - Fix: resolve -> `valueText "1"`; find -> `oc://alias/count`; set -> exit 0, file is now valid JSON `{"count":2}`. - Unchanged on both: `oc://x.json/count --file snapshot.txt` (JSON, resolve and set), `--file data.unknownext` (no match, emit kind `md`), Markdown frontmatter resolve/set through `oc://AGENTS.md/...` and `oc://alias/...`. Evidence comment: https://github.com/openclaw/openclaw/pull/208516#issuecomment-7261291447 ## Merge danger Two-way door: a revert fully undoes it. No stored state, config or contract change. Blast radius: `openclaw path resolve|find|set` when the address has no recognized extension and `--file` has one. Co-authored-by: Ayaan Zaidi <[email protected]> * fix: keep automatic Activity recaps on the session provider (#208460) Derive the utility route from the same session model and account used for dashboard titles. Preserve configured utility fallbacks and the no-primary-retry policy when the recap chain is exhausted. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 0e68b312-2003-42fd-88df-918a4c915065 * fix: keep the draft caret when closing chat search (#208428) Restore the rich editor’s selection when transcript search closes. Keep the original shortcut control as the focus target and fall back to the composer if that control was removed. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: a91ce076-21d5-4792-8b57-8d51daf9370a * fix: point automations to their signed-out account (#208493) Keep an unavailable fallback model from masking the recorded account refusal. Preserve the catalog miss for the fallback itself and leave cross-provider jobs scheduled. Worked on by: - @daniel-lxs Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 97c31b82-4f5b-4790-bc72-b34b555bb286 * fix(cli): one run deadline for openclaw agent on both routes (#208522) ## What Problem This Solves One command, two deadlines. Without `--timeout`: - `openclaw agent` through the Gateway sent a CLI fallback of **600 s** (`--timeout ?? agents.defaults.timeoutSeconds ?? 600`) as the run's per-attempt deadline. At 600 s the Gateway aborted the attempt and the run ended with `timeoutPhase: "provider"` and "Request timed out before a response was generated". - `openclaw agent --local` resolved `agents.defaults.timeoutSeconds`, which defaults to **48 hours**, as Gateway turns and cron do. - `openclaw agent exec` hardcoded **600 s**. So long coding tasks finished with `--local` and were cut at 10 minutes through the Gateway. In a long-task coding evaluation (DeepSWE), 3 of 5 Gateway-route trials ended at 607–608 s, while `--local` trials of the same tasks ran 1,084–2,279 s without a cut. The 600 s dates from when the CLI waited on a bounded client timer. That wait has been unbounded for a long time (the CLI waits for the Gateway's terminal result), but the 600 kept travelling as the run's own deadline. Three related bugs come from the same CLI-side value: 1. **Remote Gateway config was overridden.** The CLI sent the CLI host's `agents.defaults.timeoutSeconds`, so a remote Gateway's own setting never applied to CLI turns. 2. **Subagent timeouts were shadowed.** The Gateway gives a turn into a live registered subagent session that subagent's `runTimeoutSeconds` only when the request carries no timeout. The CLI always sent one. 3. **The docs matched only one route.** They said "default 600" for `openclaw agent`, which was true on the Gateway route and false with `--local`. ## Fix `resolveAgentTimeoutMs` (`agents.defaults.timeoutSeconds`, default 48 h) is now the only owner of how long `openclaw agent` and `openclaw agent exec` run, on both routes. - The Gateway route sends `timeout` only when `--timeout` is given; the Gateway resolves the default exactly as for every other turn. - `agent exec` no longer hardcodes 600; without `--timeout` its embedded run resolves the same default. - The CLI's wait for a yielded turn's subagents has no deadline unless `--timeout` is given. It still ends on the follow-up reply, Ctrl-C or disconnect. - Removed the stale transport hint "use --timeout <seconds> to extend the CLI wait". - Help text and docs now state one default for every route: `docs/cli/agent.md`, `docs/tools/agent-send.md`, `docs/gateway/cli-backends.md`, `docs/tools/autoreview.md`, `docs/plugins/codex-harness-reference/timeouts.md`. `--timeout N` behaves exactly as before on both routes, including `0` (unlimited). ## Behavior change - **Old:** without `--timeout`, `openclaw agent` through the Gateway and `openclaw agent exec` stopped each model attempt at **600 s (10 minutes)**. - **New:** they use `agents.defaults.timeoutSeconds`, which is **48 hours** unless configured, the same deadline as `openclaw agent --local`, Control UI and channel turns, and cron. - **To keep the old cap:** pass `--timeout 600`, or set `agents.defaults.timeoutSeconds: 600` in the config (the Gateway's config on the Gateway route). - **Accepted cost:** a script or CI job that relied on the implicit 600 s cap and passes no `--timeout` loses it. A run that neither stalls nor repeats can then run until 48 hours or the job's own limit. Stalled and looping runs are still stopped by the model idle timeout (120 s without output) and the existing loop guards. - **The timeout message** now names the limit that fired and how to raise it: "…the run reached its 10m limit. Please try again, or raise the limit with `--timeout <seconds>` for `openclaw agent`, or `agents.defaults.timeoutSeconds` in your config." ## User Impact - Long tasks through the Gateway are no longer stopped at 10 minutes; `--local` is unchanged. - **Default change:** Gateway-route `openclaw agent` and `agent exec` without `--timeout` now get `agents.defaults.timeoutSeconds` (48 h unless configured) instead of 600 s. Scripts that relied on the implicit 10-minute stop should pass `--timeout 600`. - Autoreview passes launched without a helper timeout can now run up to `agents.defaults.timeoutSeconds` (48 h unless configured) instead of 600 s; helpers that set a timeout are unchanged. - A scripted `openclaw agent` whose yielded turn waits on subagents now waits until they settle (or Ctrl-C/disconnect) instead of exiting 1 at 600 s; pass `--timeout` to bound that wait. - A dead provider is still caught by the model idle timeout (120 s without output). A looping agent is bounded by the configured run deadline and the existing runaway guards. - If the CLI process is killed with SIGKILL or its connection drops, an accepted Gateway run continues and its result is added to the session (accepted execution is bound to the Gateway lifetime, not the caller's connection). Ctrl-C/SIGTERM still sends `chat.abort`, as before. ## Evidence - Red on the merge base, green with the fix: - `src/commands/agent-via-gateway.deadline.test.ts`: without `--timeout`, the Gateway request carries no `timeout` for a local and a remote Gateway (main sent 600 from the CLI host's config). - `src/commands/agent-exec.test.ts`: `agent exec` without `--timeout` passes no timeout to the run (main passed "600"). - `src/cli/program/register.agent.test.ts`: `agent exec fix` without `--timeout` reaches the command with no timeout (main's Commander default injected "600"). - The Gateway already gives a timeout-less request into a registered subagent session that subagent's budget (`agent.session-followup` suite, unchanged). - Affected consumers rerun green: `agent-via-gateway.test.ts`, `agent-via-gateway.yield.test.ts`, `register.agent.test.ts`. - Real-product evidence: the long-task evaluation above (Gateway route 3 of 5 trials cut at 600 s; `--local` none cut). - `src/agents/embedded-agent-runner/run/terminal-timeout.test.ts`: the provider timeout message names the limit that fired (from the run's deadline), `--timeout <seconds>` and `agents.defaults.timeoutSeconds`. Co-authored-by: Ayaan Zaidi <[email protected]> * test(gateway): keep restart recovery fixtures under Gateway ownership (#208302) The shared test harness sets VITEST, which skips the singleton lock. In the restart-resume and yield-restart CI failures, offline SQLite maintenance took the state database while a live Gateway was resuming work. Clear both test markers for those child processes and verify the replacement Gateway owns the lock in the existing SIGKILL case. * chore(ui): refresh control ui locales (#208547) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: reply to agent turns whose session key has uppercase letters (#208435) ## What Problem This Solves `openclaw agent --local` stops with no reply and no error when the session key contains an uppercase letter. Examples are a Slack channel id (`agent:main:channel:C0123ABCDEF`) or a mixed-case DM name (`agent:main:dm:Dana-Okafor`). - No model request is made. Stdout is empty. Node prints only `Warning: Detected unsettled top-level await` and exits with code 13. - Scripts, CI jobs, cron and evaluation harnesses that drive one-shot turns get nothing back. - The OpenAI-compatible HTTP endpoints (`/v1/chat/completions`, `/v1/responses`) with an uppercase `x-openclaw-session-key` never answer: the request hangs in the Gateway. - Lowercase keys, and the Gateway `agent` route, work. Regression from #175837 (one session controller for turns, queues and Stop), first released in v2026.11.5. 2026.10.x and 2026.11.1-11.4 reply normally. On the commit before #175837, both spellings reach the model step; on #175837, the uppercase spelling hangs. ## User Impact - One-shot `agent --local` turns and OpenAI-compatible HTTP requests with mixed-case session keys run and reply again. - They reach the same session as the lowercase spelling, as the Gateway route already does. - `--json` output now reports the stored (canonical) spelling of the session key, which is the spelling the Gateway route already prints. - Signal group ids and Matrix room ids keep their case. Two peers whose ids differ only by case stay two separate sessions. ## Why This Change Was Made The agent command claims a session twice, under two spellings of the same key: - `resolveSessionKeyForRequestInternal` (`src/agents/command/session.ts`) read the store with the canonical key (`normalizeStoreSessionKey`) but returned the request spelling. - The outer turn (`agentCommandInternal` → `withSessionTurn`) claimed the session under that request spelling. - The nested embedded run claims it under the canonical store key. - The session controller matches aliases exactly, so the nested claim did not join the outer turn. Both claims share the session id, so the nested claim queued on the same controller entry behind the outer turn and waited for it forever. - Nothing else was pending, so a one-shot Node process drained its event loop and exited 13. A Gateway process kept the HTTP request open instead. The fix returns the canonical key from the resolver's final path, as its session-id paths already do. `resolveSession`'s second normalize is removed. A request spelling no longer reaches the session controller. #142746 chose to keep the request spelling ("routing keeps the request key"). That choice was harmless until the session controller started matching aliases exactly. The table test that pinned the request spelling now pins the canonical locator, with a note that it supersedes #142746. Caller audit: | Reader | Effect | |---|---| | `resolveSession` → agent command (`--local`, Gateway ingress, HTTP, plugin runtime, hooks) | Gets the canonical key. The Gateway `agent` route already canonicalized, so it is unchanged. | | `resolveSessionKeyForRequestCore`: `session-bootstrap.ts` backfill and Gateway `agent-request-routing.ts` | Inputs are session ids only. These take the session-id paths, which were already canonical. Unchanged. | | `resolveSessionKeyForRequestCore`: `agent-via-gateway.ts` (Gateway route, non-agent-shaped keys) | The result is sent to the Gateway, which canonicalizes it with the same codec. No behavior change. | | `resolveExistingSessionKeyForRequest` (`run-session-target.ts`, `agent-request-routing.ts`) | Session-id lookups. Unchanged. | | `--deliver` | Targets come from `--to`/`--channel` or the session entry's stored route (`resolveAgentDeliveryPlanWithSessionRoute`), not from parsing the key. The outbound session key now equals the runner's key. The Gateway route already passed canonical keys here. | | `--json` | Prints the canonical spelling (the Gateway route already does). | ## Entry point audit: one canonicalizer There is one codec that turns a caller's session key into the stored spelling: `normalizeSessionKeyPreservingOpaquePeerIds` (`packages/session-url-contract/src/session-key-normalization.ts:117`). It lowercases the key except Signal group ids and Matrix room ids. Every other name is a thin wrapper over it: - `normalizeStoreSessionKey` (`src/config/sessions/store-entry.ts:16-18`) returns `normalizeSessionKeyPreservingOpaquePeerIds(sessionKey)` and nothing else. - `parseAgentSessionKey` (`session-key-normalization.ts:160-164`) parses the codec's output. `toAgentStoreSessionKey` (`src/routing/session-key.ts:91`) uses that parse and the codec. - The Gateway's `resolveSessionStoreKey` / `resolveSessionStoreIdentity` (`src/gateway/session-store-key.ts:144`, `:255`) call the codec directly. The nested embedded run always claims the session under this spelling (`src/agents/embedded-agent-runner/run/session-bootstrap.ts:328-338`), so every outer claim must use it too. | Entry point | Path to the session claim | Calls the codec? | |---|---|---| | Gateway `agent` | `src/gateway/agent-turn/agent-request-routing.ts:252` uses the store identity from `session-store-key.ts:255` → `agentCommandFromGatewayIngress` → `resolveSession` | Yes, already on `main` | | `agent --local` | `src/commands/agent-via-gateway.ts:845` → `agentCommand` → `src/agents/command/prepare.ts:242` `resolveSession` → `src/agents/command/session.ts:475-486` | **This PR.** `main` returned the typed spelling. Red-on-main test. | | `/v1/chat/completions` | `src/gateway/openai-http.ts:437` (raw header or `user` key) → `src/gateway/openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | `/v1/responses` | `src/gateway/openresponses-http.ts:272` → `openai-compatible-agent-run.ts:177` → `resolveSession` | **This PR.** Red-on-main test. | | Hooks and webhooks | `src/gateway/server/hooks.ts:315` runs a cron turn with `session:<key>`; `hooks.ts:449` builds its queue key with `resolveCronAgentSessionKey` | Yes, already on `main`, through the cron row | | Cron session targets | `src/cron/session-target.ts:29` → `src/cron/isolated-agent/run-prepare.ts:150` → `src/cron/isolated-agent/session-key.ts:15` `toAgentStoreSessionKey` (run: `agent:main:hook:GitHub-PR-1` → `agent:main:hook:github-pr-1`; `agent:main:signal:group:AbC123` unchanged) | Yes, already on `main` | | `sessions_send` by key | `src/agents/tools/sessions-send-executor.ts:334` `resolveSessionStoreKey`, then the Gateway `agent` method (`sessions-send-tool.delivery.ts:483`) | Yes, already on `main` | | ACP via the agent command or channel dispatch | `src/agents/command/prepare.ts:321` (`acpResolution` from `resolveSession`'s key); `src/auto-reply/reply/dispatch-acp.ts:127` (resolved ACP key) | Yes (agent-command ACP turns through this PR) | | ACP control plane | `src/acp/control-plane/manager.utils.ts:63-85` `resolveAcpSessionTarget` and `acpSessionActorKey` | **This PR.** `main` lowercased with a plain `toLowerCase` before the store codec, which merged case-distinct Signal/Matrix peers into one actor and pointed a mixed-case key at its lowercase neighbor's row. Both now use `normalizeStoreSessionKey`. Red-on-main test. | Also in this PR, `resolveSessionKeyForRequestInternal` normalizes before main-alias matching. `agent:main:MAIN` with a custom `session.mainKey` now reaches the configured main session instead of a separate `agent:main:main` row (red-on-main test). No other listed entry point bypasses the codec. ## Evidence Reproduced on `main` (cdb53aff) through the published entry point (`node openclaw.mjs agent --local … --json`), with an isolated state dir and no provider (a turn that reaches the model step ends in a visible `Unknown model` error): - 8 of 8 runs with uppercase keys exited 13 with empty stdout and made no model request. 4 of 4 runs with lowercase keys reached the model step. - Swapping case moves the failure: `agent:main:channel:c3tt2oeiaj7` works and `agent:main:dm:Marcus-Lindqvist` fails, so the trigger is case, not the channel kind. - With a local fake OpenAI-compatible provider: `--local` with a lowercase key replied "OK"; with an uppercase key it exited 13 with 0 provider requests. The Gateway `agent` route with the uppercase key replied "OK". `POST /v1/chat/completions` with `x-openclaw-session-key: agent:main:openai:HttpUpper-ABC` got no response in 60 s (0 provider requests); the lowercase spelling answered 200. - An `async_hooks` trace located the pending promise in `claimSessionControllerTask` (the nested claim waiting behind the outer turn on the same controller entry). A probe showed the outer key `…Marcus-Lindqvist` and the nested key `…marcus-lindqvist`. Tests (red on the merge base, green on this branch): - `src/agents/command/session.exact-target.test.ts`: the resolver returns the persisted locator (ULID, Slack-style channel, mixed-case DM and case in the `agent:Main:Signal` prefix are red on base). Both spellings continue the same session. Signal and Matrix opaque peer ids keep their case. Peers that differ only by case (`signal:group:AbC123` / `abc123`, and the same for Matrix) stay separate sessions with separate entries and session ids. That test is green on base too: main already keeps them apart, and this change keeps that. - `src/commands/agent-local.session-key-case.test.ts`: real `agent --local` turns against a fake provider, each bounded by a 45 s race. The Slack-style channel and mixed-case DM rows are red on base ("did not settle"). The case-only Signal pair runs two turns with two distinct sessions. - `src/gateway/openai-compatible-session-key-case.server.test.ts`: `/v1/chat/completions` and `/v1/responses` with an uppercase `x-openclaw-session-key`. Both are red on base ("did not answer" within 45 s). On this branch both reach the model step. - `src/acp/control-plane/manager.utils.session-key-case.test.ts` (new): case-distinct Signal group and Matrix room pairs resolve to distinct ACP targets and actor keys, and the mixed-case target finds its own persisted row. Both rows are red on the merge base, where the targets came out lowercased and merged. - `session.exact-target.test.ts` main-alias rows: `agent:main:MAIN` / `agent:main:Main` with `session.mainKey: "work"` resolve to `agent:main:work`. Red on the merge base, which returned `agent:main:MAIN`. - ACP consumers green after the ACP change: `manager.test`, `manager.initialize-session`, `manager.cancel-session`, `manager.runtime-handle-ensure.reset`, `agent.acp`, plus the three session-key-case files (6 shards). - Consumers rerun green: `session-store`, `session.yielded-parent-reuse`, `agent-command.live-model-switch`, `embedded-agent-runner.e2e`, `session-bootstrap.detached`, `session-suspension`, `agent.session`, `agent-via-gateway` (8 shards). - `pnpm check:changed`: typecheck, lint, format and guards pass. The dead-export scan fails on five exports this change does not touch (the same on `main`). The same CLI reproduction on this branch: all 12 runs reach the model step and end with the visible `Unknown model` error (exit 1, JSON on stdout). None exits 13. | case | session key | exit | stdout | wall | stderr marker | |---|---|---|---|---|---| | lower 1 (fresh) | agent:main:dm:marcus-lindqvist | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | | upper 1 (after DM) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 5s | Unknown model: openai/gpt-5-mini | | upper 2 (repeat) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 2 (same session, lowercase) | agent:main:channel:c3tt2oeiaj7 | 1 | 260 B | 11s | Unknown model: openai/gpt-5-mini | | upper 3 (mixed-case DM) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | upper 4 (mixed-case DM repeat) | agent:main:dm:Marcus-Lindqvist | 1 | 260 B | 6s | Unknown model: openai/gpt-5-mini | | lower 3 | agent:main:dm:marcus-lindqvist | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 5 (fresh state, first turn) | agent:main:channel:C3TT2OEIAJ7 | 1 | 260 B | 7s | Unknown model: openai/gpt-5-mini | | upper 6 (Slack-style) | agent:main:slack:channel:C0123ABCDEF | 1 | 260 B | 9s | Unknown model: openai/gpt-5-mini | | upper 7 | agent:main:dm:Dana-Okafor | 1 | 260 B | 10s | Unknown model: openai/gpt-5-mini | | upper 8 (case in prefix) | agent:Main:Channel:C3TT2OEIAJ7 | 1 | 260 B | 12s | Unknown model: openai/gpt-5-mini | | lower 4 | agent:main:channel:c0123abcdef | 1 | 260 B | 8s | Unknown model: openai/gpt-5-mini | Merge danger: two-way door. No stored data, schema, config or protocol changes. Stored session rows already use the canonical key, so a revert restores the old behavior exactly. Blast radius: every caller of the agent command that passes a mixed-case session key. Co-authored-by: Ayaan Zaidi <[email protected]> * fix(release): keep Doctor deprecation deadlines from blocking frozen release sources (#207875) Release npm preflight now enforces the Doctor deprecation registry as of the source's main merge base, through a trusted harness preload. Deadlines reached after a release line leaves main are reported as warnings instead of blocking publication. Main CI and PR guards keep wall-clock enforcement. Co-authored-by: RomneyDa <[email protected]> * fix: show who answered a recovered Linux Quick Chat message (#208515) Keep the original agent's display name with a Quick Chat send so a recovered reply shows who answered when the Gateway default changes. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 31cd1031-73b1-4ad1-8770-1aa7c5fb79f9 * fix: keep fork compaction off the parent’s Claude account (#208415) Check the selected Claude account against the saved native session before manual compaction, including after a restart. A fork can compact on its selected account after its first ordinary turn establishes a native session there. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 34da9584-a62a-4ed5-8cf3-a0b3e6387e25 OpenClaw-Publication: 4527fb28-07bf-43c1-854e-e4a27bd33b16 * fix: keep images for unlisted Ollama Cloud vision models (#208531) Inspect the selected tag through the configured daemon without pulling it. Keep the previous fallback when the daemon cannot describe an unlisted cloud model. Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 374db0dd-bba5-450f-b42d-fed88841557f * fix(agents): seed the first persistent turn after a one-shot run (#208502) ## Problem A one-shot run (`openclaw agent --local`, `agent exec`) in a non-empty workspace blocks the first persistent conversation there for 24 hours. Repro on main with the built CLI and a fake model: 1. `openclaw setup --baseline --workspace .` in a project directory holding `README.md` (git or not) 2. `openclaw agent --local -m hi`: works 3. `openclaw gateway run`, then `openclaw agent -m hi`: fails before any model call with `OpenClaw workspace appears to have disappeared after a recent initialization ... | WORKSPACE_VANISHED` The same project without step 2 works. Users affected: anyone who tries a one-shot turn in a project workspace and then uses the Gateway, Control UI or a channel. The skip-then-seed sequence also happens without a Gateway: `agent exec`, then any persistent chat. Cause: in `ensureAgentWorkspaceOwned` (src/agents/workspace.ts), the no-seed branch writes a disappearance attestation for any non-empty workspace without initializing it. Since #206477, every one-shot run takes that branch. The seeding branch then sees no persona files, reads the fresh attestation as "OpenClaw initialized this workspace", and refuses as if the workspace had been wiped. Shipped in v2026.12.1-beta.2. ## Solution One owner, one meaning: only a workspace OpenClaw initialized can vanish. "Initialized" is the existing setup-state marker (`bootstrapSeededAt` / `setupCompletedAt`). That marker lives in SQLite (`workspace_setup_state`, src/agents/workspace-state-store.kernel.ts:69-75), outside the workspace, so `git clean` or a lost mount cannot remove it. Legacy in-workspace state is never parsed at runtime (src/agents/workspace-legacy-state.ts:1-2). The brand-new path in `ensureAgentWorkspaceOwned` now: - refuses when the marker is present and either the attestation or the setup state is recent. This keeps the vanished-workspace guard (#88333) for a lost mount, `git clean -fd`, `git stash -u` and a wipe that leaves project files. Recent setup state without an attestation was already refused further down, by `clearExpiredState`; the refusal now happens explicitly at this decision. - seeds normally when there is no marker. The attestation then came from a no-seed run, and the workspace was never initialized. A no-seed attestation also stops steering the first seeding turn: - The first seeding turn no longer reads attestation hashes when it decides whether setup is complete. In that branch there is no marker, so any attestation came from a no-seed run and never recorded seeded files. Paths that run with a marker (survival evidence, completion repair) still read the hashes, as before. - The "recently attested customization" shortcut is removed. It could fire only without a marker, so a project `AGENTS.md` skipped `BOOTSTRAP.md` after a one-shot turn but not without one. - An expired attestation alone no longer marks a brand-new workspace as "reseeding expired state"; only the marker does. Before, a git project seeded `BOOTSTRAP.md` after 24 h but not before. Writers of an attestation without a setup marker (all in the no-seed branch, src/agents/workspace.ts:589-623): one-shot runs (`agent --local`, `exec`), `agents.defaults.skipBootstrap`, and agent creation with deferred initialization (the Template add flow, src/templates/gateway-add-apply.ts:199-203). That branch writes no persona files, only a purpose `AGENTS.md` when a purpose is given, so a never-initialized workspace has no OpenClaw identity to lose. `rg deferInitialization` finds no production caller that combines a purpose with deferred agent creation (`agents-onboarding.ts` defers a session, not agent creation). All of these writers now read the same way at the first seeding turn. No schema change, no new parameter, no new state. ## Impact - `--local`/`exec` followed by a Gateway or chat turn in a project workspace works. The first persistent turn seeds the same files and setup state as it does without the one-shot turn. - Initialized workspaces still refuse with the same messa…
Current head and prerequisites
The latest follow-up corrects a missing monotonic timestamp in the Codex native-yield fixture. Its nominal 60-second deadline calculated
NaNand fell back to a 1 ms timer, which could abort the attempt before terminal release. Unmodified candidate reproduction: 43 passed / 1 timed out at 120 seconds. Clean main94fa98bfd93aalso failed the same case withcompleted=falseafter its shorter immediate wait; the four relevant production owners are byte-identical. Adding onlyattemptStartedAtMonotonicMs: performance.now()retains the completion wait, all native cleanup assertions, and the existing budgets. The corrected full file passes 44/44 (68.75s test / 76.83s wrapper); the formerly timed-out case completes in 42ms. Final targeted static checks: test types passed (65.52s), extension lint passed with zero warnings/errors (21.7s analysis / 35.63s wrapper), and formatting passed (0.72s). All 57,596 tracked blobs matched the final commit before and after proof; no test children remained.The previous CI's WebKit menu-alignment failure differed by 0.0013427734375px against the existing 0.0005px tolerance. The failed test and all relevant UI components, styles, overlay lifecycle, configuration, and dependency inputs match both integrated and subsequently fetched main. The unchanged failed file passes 3/3 on candidate and clean main in Linux WebKit (12.07s / 10.62s wrappers). This is source-identical intermittent evidence, not a claimed reproduction or repair of the exact CI trigger. No UI source, assertion, tolerance, or budget is changed.
19fdd795d20a24397934ae3c3c2e29a05afbc932(treef376030fc5ab1bd958b5c2a6fa9a2a787e506b3e) integrates main94fa98bfd93a, including #176206 (b0f778e76d5e, confirmed cancellation) and #176195 (9f666d5fb605, auth publication). The reviewed queued-Stop fixture correction is included. Josh Lehman's co-author credit is retained. This ready PR replaces #165957 and remains unmerged.The latest production correction binds steering custody to the already-selected controller operation's native attachment. It no longer looks up settlement by an ambiguous session ID. An independent two-store control demonstrated that selected native teardown previously left continuation authority live while a backend receipt was held; the repaired owner revokes it. The unused private ID-based settlement helper is deleted. No additional public contract break or scheduler is introduced. Production delta for this repair is +9/−13; its regression adds 142 test lines.
The latest two CI corrections are fixture-only. Codex compaction now waits for actual native-thread queue admission before cancellation and before its no-overtake assertions, preserving exact cancellation and FIFO checks. The original file passed on both candidate and clean main, so the CI failure is not claimed as locally reproduced; source inspection establishes that three event-loop flushes did not guarantee admission. The HTTP handoff fixture now revokes access by making the session a draft: removing membership does not revoke the configured reader's permission to view other non-draft sessions. The original case passed on candidate and main while the projection was pending. A one-line diagnostic awaiting the real projection's readiness on clean main
94fa98bfd93areproduced CI exactly (expected 403, received 200; 60.74s test / 68.80s wrapper), confirming the fixture's invalid authorization premise. That diagnostic was removed and the complete main source re-audited before final proof. All 403, no-app-byte and response-header assertions remain intact. The fixture restores visibility afterward. These two fixture corrections add 63 and remove 40 test lines; production authorization behavior is unchanged. The steering regression uses scoped Gateway spies, preserving the published generic caller contract, method dispatch, and all custody assertions without casts (+16/−10 test lines).The main merge preserves the controller-owned recovery path. Its sole manual conflict was main's internal annotation on a recovery-reset helper already deleted by this cutover; the old owner stays deleted. Main's updated node-event handling and removal of the unused heartbeat preemption constant are retained.
Latest Linux runtime proof: 134/134 passed on the preceding tree, with the final commit changing only the steering regression’s Gateway mock: compaction 36, real HTTP authorization 7, node events 50, heartbeat scheduling 35, lifecycle diagnostics 6. Production core types passed in 74.52s; targeted extension test types passed in 63.73s. These runs use pinned Bun on Linux amd64 emulation, Node 24.22.0, one worker and disabled transform caches; CI uses Node 24.19.0. Prior Stop/auth, restart and SDK proof below retain their execution identities and are not claimed as final-head reruns.
Extension lint passed with zero warnings/errors after canonical SDK preparation emitted 14,017 files: 22.2s analysis, 274.07s total wrapper, with no limit change. At
caa1fdd9344d(unchanged steering sources at this head), the steering admission file passed 12/12 (68.35s Vitest / 76.45s wrapper), targeted core test types passed (59.49s), core lint passed for 10 files (32.7s analysis / 35.60s wrapper), and 11-file formatting passed (0.77s). All 57,596 tracked source blobs matched the final commit before and after proof; test descendants exited.Current whole-branch physical diff versus integrated main
94fa98bfd93a, without rename/move discounts: production +41,327/−28,661 (net +12,666); tests/helpers +82,698/−38,777; docs +773/−123; tooling +28/−88. Named test harnesses are counted with tests. These totals include moved/split files and are not new-code estimates; earlier historical totals retain their original base and classification.The two final fixture commits and preceding steering/main-integration delta have local and committed Codex reviews marked scoped-clean at P0–P2. Earlier full-cutover reviews retain their scopes. The diagnostic mock still uses explicit isolated capture; its canonical generated baseline shrinks from 8,645 to 8,644 without a new allowance or relaxed limit.
Previous-head CI run 39149467721 ran on
caa1fdd9344dbe452228279c82b6b6e161a87441; it was superseded by this repair and finished cancelled, with 150 successful jobs, 20 skipped, two failed jobs (WebKit geometry and the native-yield fixture), and three cancelled jobs. The remaining PostgreSQL conformance work was still running when the repair was published. Current-head CI run 39151107603 completed SUCCESS for19fdd795d20a24397934ae3c3c2e29a05afbc932: 154 successful jobs, 20 skipped, zero failed. Both previously failed shards and the aggregate CI gate passed. The previous34ac2d0run failed the compaction and HTTP authorization fixtures corrected above; its result does not certify this head.Earlier physical-owner corrections (
faad02f)Live
/btwcontext now belongs to the exact native registration and is read through the selected transcript file.sessions.patchcarries its resolved physical target into the controller permission operation. Stores with identical session IDs and keys no longer share snapshots or permission changes. Same-operation retries remain supported; stale registrations and successor operations cannot inherit custody. These corrections retain one owner and introduce no additional public break.Independent controls failed against the preceding production tree at the intended boundaries: the beta side question received alpha's private history/current task, and permission changes failed for the active selected store or affected the other active store when the selected store was idle. Both controls now pass through their real entry points.
The Codex native-yield fixture now awaits its foreground completion promise. Its original assertion failed identically on the candidate and clean main (43 passed / 1 failed each); the corrected file passed 44/44. The prompt-cache fixture now waits on the private announcement's public
agent.waitresult before restarting. A bounded diagnostic observed that lifecycle end left this RPC registered with claimed input immediately before restart. Original candidate and clean-main two-file selections passed; the diagnostic did not reproduce CI's extra parent request. The early barrier is corrected, but the exact cause of that extra request is not claimed as proven. The five-request, prefix, and cleanup assertions and all test budgets remain unchanged.Latest Linux proof: 161 cases passed on the exact final source: side questions 43, live permissions 36, native runs/generation 55, cron 7, prompt submission 18, and the Gateway prompt-cache/membership pair 2. The pair's final execution order was prompt-cache then membership; it is not claimed as an identical-order CI replay. The Codex 44-case result is retained with identical test bytes. All 57,584 tracked blobs matched the final tree before and after proof. Local proof used Linux amd64 emulation, Node 24.22.0 and the pinned Bun runtime; CI uses Node 24.19.0 and prepared caches. Production core types passed (86.43s); core test graph (66.22s), corrected extension test graph (70.52s), and core lint (34.39s) passed. Extension lint reached analysis with zero errors/warnings (22.4s analysis; 331.75s wrapper including SDK declaration preparation, which emitted 14,016 files within its existing cap); 16-file formatting passed (0.79s). The first prompt-submission selection used the wrong configuration and ran no cases; its corrected owner selection supplies the 18-case result. The initial narrowed extension graph omitted the owner's ambient declarations; restoring those external proof inputs passed without source changes.
The local and final committed correction reviews are scoped-clean at P0–P2. Latest follow-up delta versus
49c06dc: production +50/−23; tests/helpers +250/−18; tooling −1. Complete cutover versus integrated main28f97f236f882, before rename discounts: production +41,344/−28,673 (net +12,671) across 690 paths; tests/helpers +82,472/−38,723 across 1,175 paths; docs +773/−123; tooling +28/−88. These are physical diff totals, not new-code estimates for moved/split files. Earlier build, restart, SDK/API, Stop and auth results retain their source qualifications below. Only the failed CI selections and newly touched owners were rerun; no broad local suite, weakened assertion, increased budget, or retry for green was used.The
faad02fCI run found the mock-export baseline entry corrected at the current head. That historical run does not certify the current head.Previous-head CI run 39141022644 completed FAILURE: 153 successful jobs, 20 skipped, two failed shards and the aggregate gate. The Stop and auth shards passed.
extensions-bundle-5failed the inherited Codex fixture assertion above;compact-large-26failed the prompt-cache five-parent-request assertion, whose exact cause remains unproven despite the diagnosed early barrier. Both failed files have passing focused proof with the corrections.Latest owner commands (Linux, pinned Bun, one worker, transform caches disabled):
Integration history
October 18 integration —
49c06dcd6cf6: Main28f97f236f882is integrated, including the merged auth-publication repair #176195 and confirmed-cancellation repair #176206. The reviewed queued-Stop fixture now waits for the real cleanup deadline before advancing fake time. The diagnostic merge resolution preserves Incognito diagnostic suppression through the controller owner, including when its diagnostic alias retires before runtime loading or during recovery. Its migrated privacy fixture uses real controller recovery. Returned worker failures retain their diagnostic detail while the existing watchdog keeps cleanup blocked. The late main refresh also preserves the stalled-global-lane regression with distinct controller owners, controlled 24 ms/25 ms boundaries, and raw-producer settlement. No old scheduler or new public contract break was added.The committed correction review is scoped-clean at P0–P2, following the integration review and correction of its accepted privacy finding. Final Linux runtime/static results and exact-head CI are recorded below; earlier proof keeps its original execution identity.
Earlier integration proof (
49c06dc)Candidate at that stage:
49c06dcd6cf6adb3628a4c473c2b80148cefc7ef(treed785de4e6eadfdae49e33f3398c4cf0a3074a561), integrating main28f97f236f882. The original Stop/auth/privacy results executed at67bcf11de5f3; the lane correction ran at922d9f, and the additional native-ownership and watchdog-fixture proof is listed separately below. Those earlier runtime results retain their execution identity; the final CI run supplies broad proof for the complete candidate. Both prerequisite repairs are ancestors: #176206 (b0f778e76d5e) and #176195 (9f666d5fb605).922d9f922d9fintegration and preceding67bcf11corrective commit are scoped-clean at P0–P2, with complete affected owners supplied. The earlier integration review's accepted privacy finding is fixed; prior cutover reviews retain their original scope.Current runtime commands:
The Linux runs use CI settings with the pinned Bun runtime, two workers, and transform caches disabled. Each run verifies unchanged source hashes and joins its descendants. Only the previously failing Stop/auth selections and the newly touched privacy boundary were rerun; previous build, restart and SDK proof below retain their stated revisions.
CI on
49c06dccompleted with 153 successful jobs, 20 skipped, and the two failed shards plus their aggregate gate described above. The current head has separate CI evidence above.Earlier review and CI follow-up
The final completion-claim repair is committed at
49c06dcd6cf6as three focused follow-ups, with Josh's co-author credit preserved.embedded-agent-runner/runs.tsstill held completion claims in a process-wide session-ID slot: preparing a second Talk consult in another physical store revoked the first consult before it could bind its admitted run. Claims now retain their prepared target and exact controller operation/native attachment. Two stores sharing an ID/key remain independent, while the same operation can refresh its attachment across retries. Two-argument preparation, replacement fencing, normal post-detach one-shot completion, and cancellation/lifecycle revocation remain intact. No additional SDK break, scheduler, storage schema, or configuration is introduced.The independent two-store Talk regression failed on unchanged
4ea7107atbindOperationalRunInstance, then passed with the repair. CI also found 19 missing-target fixture diagnostics in the requester activity mocks; all nine fixture files now supply the prepared physical target. One native replacement fixture had silently switched fromagent:main:testto the keyless helper's different agent/store after completion. It now explicitly retains the same session key, keeping every original false/true-once assertion. This is a fixture correction, not cross-store revocation.Final focused Linux proof: 433 passed. The four Talk/native files passed 52/52 (186.53s test / 194.99s wrapper), native ownership and generation passed 54/54 (the corrected 34-case file: 56.88s / 65.36s), six requester announcement files passed 224/224 (66.04s / 74.59s), and three requester lifecycle E2E files passed 103/103 (155.06s test). The last E2E wrapper took 607.37s including its required fresh runtime build (419.2s) and AI package build (8.9s). Production core types passed in 85.32s; the exact failed CI
agents-sessionstest-type configuration passed in 84.55s; the combined changed-test graph and final fixture graph passed in 65.85s and 65.41s. Lint and format passed for all 16 changed paths; the 15-file lint analysis took 29.6s, plus a separate final one-file check. No assertions, budgets, or guards were weakened.The only change from the 52/224/20-case proof tree
17977d1to final49c06dcis the corrected native test fixture. Those unchanged-source results are retained, and the corrected file plus requester E2Es ran on final source. All 57,583 tracked blobs were reconstructed and matched final treed785de4e6eadfdae49e33f3398c4cf0a3074a561. The committed review of all three follow-ups is scoped-clean at P0–P2. Follow-up delta versus4ea7107: production +106/−44; tests/helpers +249/−39. Earlier build/restart/SDK results below retain their recorded revision and limits; the fresh test runtime build does not reclassify the earlier full-build cap result.Commands for the final owner selections include:
The timeout-abandonment follow-up binds its single native registry to exact controller entries, using session-ID keys only for detached attempts. An ambiguous ID no longer rejects a known native handle, and another physical store cannot overwrite or clear its timeout. Recovery retains the operation and original incarnation; marker restoration remains identity-fenced. A new same-store successor clears the retired entry's marker even after the old controller entry is pruned. Direct subagent delivery uses its already-prepared requester target, while exact-file observations disambiguate shared ID/key aliases. The three ID-keyed abandonment indexes are removed; no public contract or second scheduler is introduced.
The new owner regression fails on the previous published runtime at the intended registration guard (33 existing cases passed). The final repair passes 64 selected cases on Linux: native runs 34, lifecycle-targets 17, timeout-context recovery 8, and timeout-compaction composition 5 (157 unrelated cases unselected). The corrected native file took 54.90s test / 63.23s wrapper; composition took 42.43s / 82.58s. Core types passed in 76.82s, the final test graph in 65.13s, eight-file lint in 17.33s and format in 0.85s. The first positive run exposed a fixture ordering error: it expected controller-entry pruning before awaiting owner settlement. The fixture now awaits that actual receipt with all assertions retained. An initial composition selection used the wrong configuration and ran no cases; its corrected infra-owner selection provides the five-case proof. This correction is +108/−95 production lines and +115/−8 test/helper lines, separate from the complete cutover delta below.
The committed correction review at
4ea7107d6616is scoped-clean at P0–P2 with the full affected owners and lifecycle context supplied.Previous published head
3b350dbddbf6completed CI successfully: 156 successful jobs, 20 skipped, zero failed. That result remains prior-head evidence; the timeout correction requires its own exact-head CI below.Exact native callbacks now validate their captured controller attachment rather than reselecting an ambiguous session ID. Two physical stores may share the same session ID without rejecting steering, question answers, stalled-model recovery, personal-tool participant capture, or run-ID liveness. Retiring one attachment still rejects its retained callbacks while the other owner stays active. ID-only selection continues to refuse ambiguity; current tool and delegated-authority checks remain in place. The production repair is line-neutral (+24/−24); the two repairs add 194 test lines and remove 2.
Independent regressions failed against the preceding production tree at the intended guards: stream input rejected with
active session is finalizing; personal-tool capture rejected with inactive-turn authority. After repair, four full affected files passed 83/83: stream 31, participants 2, native runs/lifecycle 50. Production core types, the changed-test type graph, five-file lint and format passed. Runtime wrappers took 62.03s, 57.05s and 58.59s respectively; types took 74.17s and 54.85s, lint 17.79s and format 0.71s. No SDK export or additional contract break was added.The later CI watchdog failure was a fixture ordering defect: fake time advanced before real lazy placement recovery reached backend cancellation. Its fixture now awaits that observed cancellation before advancing the cleanup clock, retaining every cancellation, blocked-custody, no-dispatch and eventual-delivery assertion. The original candidate failed both queue modes; the corrected file passed 4/4 (49.64s test / 57.59s wrapper), and clean main passed its native 11/11 counterpart. Targeted test types, lint and format passed (55.96s / 62.18s including an artifact-lock wait / 0.74s). No production watchdog behavior or time budget changed.
Commands for those focused runtime checks (Linux, pinned Bun):
The prior
922d9fCI run completed with 152 successful jobs, 20 skipped and four failures (three test shards plus the aggregate gate). Its third failed file was the subagent lifecycle suite: the replaced-owner delivery assertion passed, but the following global timer-count assertion saw one timer. The final candidate passed the full file, 236/236 (51.80s test / 88.05s wrapper). Clean main15ae101a0d854passed that same replaced-owner case but failed a different timer-count assertion in requester database inspection, 238/239 (43.46s / 79.81s). The original timer failure remains unreproduced; neither a fix nor exact inheritance is claimed.The skill-library CI failure had an intact developer prompt and bundled catalog but empty synthetic personal pins. Independently built Linux candidate and clean-main controls both passed the local personal-skill turn and bundle assertions, then failed later waiting for node-worker inventory; both also retained a cleanup resource claim. Vitest durations were 239.55s and 239.72s respectively. The node-inventory failure reproduces on main; the original missing-pin symptom remains unreproduced. The first local attempt stopped before this boundary because a 4 GiB temporary mount could not satisfy the existing worktree disk-reserve guard; the paired controls used a larger isolated temporary mount without changing the guard. Runtime and package paths were verified independently for both trees. These paired controls used Linux amd64 emulation with Node 24.22.0 bootstrap versus CI’s 24.19.0, and the pinned Bun runtime. No assertion, timeout, resource cap or production behavior was changed for these controls.
The final committed review at
3b350dbis scoped-clean at P0–P2 with complete affected owner context. All new production changes are covered by the 83-case native-ownership proof above; these unrelated replay limits remain explicit for final CI.What Problem This Solves
Fixes stranded input and interrupted replacements during Stop/restart. Replaces #165957, preserving Josh Lehman’s cutover and credit and prior maintainer Team findings on ownership, cancellation, settlement and recovery.
Source:
49c06dcd6cf6adb3628a4c473c2b80148cefc7ef, including main28f97f236f882.Journal: line 976005 recorded
queueSize=62 pendingReplies=17 embeddedRuns=31; line 976200,56/15/28; lines 976326–976375, five terminal-write owner refusals. Categories overlap; no single cause established.User Impact
One controller owns each physical session’s admission, queued input, steering, Stop, and settlement. Cancellation targets the captured source and invocation. Stop acknowledges after required persistence, hooks, command/MCP cleanup, queued-input notification, and child cleanup. Raw preparation or the active producer may still drain; replacement work remains fenced until settlement.
Three immediate breaking changes require action from third-party harness and plugin authors:
setActiveEmbeddedRun(...)requires host admission. Move registration into the host-providedrunAttemptcallback. Keep the five public identity arguments, pass the resolved agent ID, and retain the returned cleanup function for that exact registration. Call that function during cleanup, or pass it toclearActiveEmbeddedRun. A session key, agent ID, or plugin-created operation does not grant admission. An unadmitted call throwsAgentHarnessPreflightErrorwith codeSESSION_CONTROLLER_ADMISSION_REQUIRED. Sessionless registration and queueing remain supported. See harness registration and cleanup.chatAbortControllersandchatQueuedTurns. Keepapi.registerGatewayMethod(...). In the plugin manifest, declarecontracts: { gatewayMethodDispatch: ["authenticated-request"] }, then importdispatchGatewayMethodfromopenclaw/plugin-sdk/gateway-method-runtime. Usechat.sendfor input,chat.abortwith{ sessionKey, runId? }orsessions.abortwith{ key, runId?, clearQueued? }for cancellation,agent.waitfor completion, andsessions.listfor activity. Dispatch retains caller authority and the target method’s authorization; the declaration grants no additional scopes. Removed-property access throwsPluginCapabilityRemovedErrorwith codePLUGIN_CAPABILITY_REMOVEDand migration guidance. See Gateway session control.AgentTurnStartOwner.observe()renamesexpiresAtMstostartDeadlineAtMs, with no alias. UpdateonStartOwnerconsumers exposed throughcontext.createAgentTurnFacade. A finite value is the execution-start deadline;nullmeans a live wait without a finite deadline; an absent field means no deadline is available yet. An undefined observation means the captured owner is no longer current. Stop watching onceexecutionStartedis true. The observation grants no authority and does not describe the execution timeout. Reading the removed property throwsPLUGIN_CAPABILITY_REMOVED; otherexpiresAtMsfields are unchanged. See start-observation migration.Bundled consumers migrate; ClawHub usage remains unknown.
Why This Change Was Made
The controller and bundled callers migrate together, replacing reply-run, lifecycle, queued-RPC and native-run ownership. Persistence, recovery, placement and capacity retain their owners. Cleanup cannot detach successors; follow-ups acquire fresh placement; nested work retains scope. Retries preserve prompt bytes/dispatch identity and wait for collected admissions.
Dormant deletion retires notices first; exact-owner retirement handles aliases/metadata. Completion releases only exact unclaimed reservations after durable terminal publication, before failure notices. Claims/requester cohorts retain custody; failed writes release nothing. Restoration rechecks ownership after requester I/O.
Physical identity survives same-ID stores. Admission joins native cleanup and controller settlement. Prepared authority records admitted lineage before tool construction and validates attachments. Message authority captures its operation before delivery; no post-effect reselection. Talk steers/stops that operation; reload captures its owner and checks authority before yielding. Cron drains the registration with captured MCP retirement.
Reload preserves optional
runId: onlyundefinedcan capture a unique current session owner at construction. Ambiguity captures none; supplied unmatched IDs, including empty strings, never fall back. Later replacements/unrelated ambient operations are never adopted. Public options/returns stay unchanged. Cron uses owned physical stores, drains the scheduler before database closure, and surfaces early terminal errors; assertions and time budgets remain unchanged.Incoming cloud-worker Goals retain controller admission, source authority and durable acknowledgment. Worker live-event ownership now selects the complete admitted worker claim, so another physical store sharing its session ID cannot suppress progress/watchdog updates or reject the exact cancelled worker’s finishing acknowledgment. Missing, foreign, duplicate, or session-mismatched claims select no owner; currentness, placement, cancellation, and disposal guards remain unchanged. Placement checks use shared preparation; the old admission owner stays deleted. Work inventory includes scheduled debounce/preparation, excluding dormant queues/dedupe timers.
Worker terminal handoff freezes abort before publishing a successful reply. Move still waits for physical workspace cleanup without cancelling that completed reply. The fixture releases transfer at the earlier interruption checkpoint, retaining recovery, claim-release and cleanup assertions.
Physical-store routing stays with the producer. Plugin steering and mailbox fallback resolve an incognito memory-store owner before the durable default. The runner carries explicit
RunReplyAgentParams.storePathinto initial admission and newly derived retries, so a fresh recovery input enters the mailbox its original operation wakes. Losing that fact previously selected another store that later preparation correctly rejected. Existing captured input is not retargeted; the exact-store guard remains intact.Question handling restores main’s public refusal contract:
QuestionDispatchRefusedErrorproduces the visible error andquestion-response-refused, without steering or queueing another turn. The optional refusal-queueing branch is removed. Unsupported legacy dispatch still falls through; valid answers, accepted/indeterminate custody, source checks, and postcommit no-replay remain unchanged. This restores an existing contract; the three migrations above remain the only approved breaks.Heartbeat fixtures register a real native owner and wait for both operation retirement and native cleanup. The cancelled-predecessor fixture releases its custody before admitting an independent resend. The cron mock retains real module exports while overriding only captured MCP retirement. The owner-generated mock-export baseline removes one obsolete entry (8,646 to 8,645); no exemption or limit is added.
Preserved contracts: question-policy and closed-creator refusals stay visible and do not start another turn. ACP
cancelSessionretainsexpectedRunId,expectedInstanceId,expectedOwnerKey, and exact nested-invocation cancellation. Completion retainsphases, reason values,requireDirectDelivery, and phase-aware durability: a delivered direct result withphases: []remains non-durable.retainFailureUntilComplete()is a documented no-op; failure custody lasts until completion. Sessionless native queueing, opaque generations, exact registration cleanup, recovery-result fields, cancellation notifications, and lifecycle diagnostics remain supported. Uncertain asynchronous steering failures warn without automatic replay.Accepted limits: process-local mailbox; durable queued-input recovery and subagent/cron continuation remain follow-ups. Dispatched wakes without saved prompts retain mismatch refusal; rollback may discard the optional field. V1 injection remains supported inside admitted attempts; source-bound controls require V2 and fail visibly when unsupported. Worker-abandonment repair remains separate. MCP registration stays session-ID-keyed: retirement protects replacements, not preexisting cross-store ambiguity.
Root-cause anchors: physical admission, settlement, heartbeat, message authority, native drain, worker claim.
Evidence
Original 403 files/7,819 cases are historical at
fff40cba, not final-head all-pass proof. Extra 231 files are inventory. The committed Move patch matches final proofb8b2b8824b50; earlier receipts retain their execution identity with source qualification. Times are wrapper durations unless stated otherwise; filtered cases are excluded.queue.debounceMs: 0; followup mode and every assertion remain unchanged. Failed messaging test-type graph passed/10.81s with CI’s--incrementalflag; exact retry regression passed 1/1 in 27.61s (21ms test body, 72 deselected). Targeted lint/8.31s, format/1.08s and diff check/0.58s passed on the patch committed as40e8. Local and committed reviews are scoped-clean at P0–P2.f838comparison, source-qualified to this head, passed/317.15s: 156 entrypoints/3,808 names, 201 affected exports (190 reachable/11 signatures), no additional direct public signature or semantic break. Six extension/SDK static gates retain theirf710execution identity with source qualification.12b08796048a: 6/6 cases in 196.40s, including the #173924 multi-session compound fixture, managed restart, SIGTERM, SIGKILL during recovery, a second restart, explicit cancellation, revoked authority, and all five subagent cases. Source and qualified artifacts remained unchanged; all test processes exited. This proof is reused for40e8through its sole test-fixture edit; no restart test executed at40e8.A footer fixture’s mismatched queue key caused the apparent memory stall. Its correction passed without production memory changes; interrupted runs remain incomplete evidence.
Historical proof: worker ownership had two intended negatives and 52 passes at
3b3; shutdown passed 1/1 at0d3, and five subagent cases retain qualified8f4evidence.Earlier review: 35 clean full-series passes at
0071, plus delta reviews.The runtime refresh executed at
12b08796048apassed/63.05s with strict freshness, provenance and integrity for 40,523 files/1,564 symlinks. Its artifacts and the 6/6 restart proof are reused for40e8through the exact test-only fixture diff. All other tracked paths and original artifact entries were verified unchanged; neither build nor restart was re-executed at40e8. Declarations and API retain source-qualified earlier evidence, including API execution atf838and the six static gates atf710. The unchanged cap remains failed: 5,515,908 > 5,340,536 bytes; main50: 5,491,101. No full build or cap rerun occurred at12bor40e8; the earlier full build remains red.Historical CI and investigation limits
Prior-head CI:
3b3run 39113213463 completed FAILURE: 150 successful, 20 skipped, six failed jobs—five test shards below plus the aggregate gate. It does not certify the later repairs.chat.sendrejects; candidate/main controls pass. Cleanup failures include passing bodies; contamination is unproven. Overlapping confirmations passed.5cb47d1; the exact authority guard and platform equivalence remain unresolved.The cleanup-generation warning predates the queued timeout; this does not locate or explain the awaited-child stall. An earlier main public-flow control also timed out but omitted controller-only inventory assertions; identical cause is unproven. The modified queued-Stop diagnostic passed without locating or repairing the failure. Skill-library
NOT_FOUND, prompt-cache six-versus-five requests, X-publication child-transcript timeout, Linux agentsapi timeout, and historical pending-input unavailability remain unresolved. Passing controls do not establish fixes or inheritance; prompt-cache shard order remains untested. Previous-head12b08796048aCI run 39118146839 completed FAILURE: 150 successful, 20 skipped and five failed jobs. Failures were the test-type fixture error repaired at40e8, unresolved skill-libraryNOT_FOUND, the recurring queued/child/parent/overlapping Stop timeouts, auth removal, and the aggregate gate. Auth removal reproduced on actual CI-base production3c5562b308bbwith the identical regression fixture (one failed case/49.93s); at that point its exact rejecting authority guard and Linux equivalence were unlocalized. The Stop and skill failures were unresolved and were not established as inherited. PostgreSQL conformance passed.Previous-head CI (
40e8): run 39120236641 completed FAILURE on40e8f3057e651d8186be33547d3b2dde2f6a690e: 152 successful, 20 skipped, three failed jobs. The single bounded watcher completed in 29m14s. The repaired test-type check, skill shard, all three PostgreSQL conformance jobs, and overlapping-Stop confirmation case passed. Passing the intermittent skill/overlap cases does not establish a fix for earlier failures.chat.sendrejects withSESSION_MUTATION_AUTHORIZATION_CHANGED. That identifies the shared session target/source/routing freshness error family, but not the rejecting guard. Prior bounded controls did not establish a cause or fix; inheritance is not claimed.UNAVAILABLE/retryable:false. Subsequent macOS and Linux traces on current main identify RPCmodels.authSetApiKey: a model-catalog worker begins credential publication between initial validation and the pre-write updater callback. Root/source identities remain current, with no unknown outcome. The deterministic regression and repair are in #176195; that separate fix is now merged and included in this cutover.The tested merge was
fa30cdd51e10onto main1fba7c8e7db1; the auth control executed main3c5562b308bb, with unchanged relevant sources. Logs were collected once per failed job. No retries, relaxed assertions, longer budgets, or new suppressions were used. Ancillary auto-response/context/dispatch workflows were cancelled; dependency and security-sensitive review statuses succeeded. At that historical head, the unresolved Stop failures were a remaining landing risk. The subsequent integration and final-head evidence above supersede that status.Historical proof commands:
node scripts/run-tsgo.mjs -p tsconfig.core.json --incremental node scripts/run-vitest.mjs src/gateway/worker-environments/worker-turn-run-owner.test.ts src/gateway/worker-environments/live-events.test.ts src/gateway/worker-environments/live-events-settlement.test.ts --maxWorkers=1 --reporter=verbose node scripts/run-vitest.mjs src/agents/embedded-agent-runner/runs.lifecycle-targets.test.ts src/sessions/session-controller.admission.test.ts src/sessions/session-controller.steer.test.ts --maxWorkers=1 --testNamePattern 'duplicate receipts|synchronous backend throws|same backend is attached again|outcome-only duplicate caller|unclaimed source.s cleanup receipt|detached cancellation callback failure|continues detached cleanup' OPENCLAW_VITEST_RUNTIME=node OPENCLAW_E2E_USE_PREBUILT_DIST=1 OPENCLAW_BUILD_PRIVATE_QA=1 OPENCLAW_ENABLE_PRIVATE_QA_CLI=1 node scripts/run-vitest.mjs test/gateway-process-shutdown-recovery.e2e.test.ts test/gateway-subagent-restart.e2e.test.ts --maxWorkers=1 --reporter=verbose OPENCLAW_BUILD_PRIVATE_QA=1 node --import ./scripts/tsx.mjs scripts/build-all.mts OPENCLAW_BUILD_CACHE=0 OPENCLAW_BUILD_PRIVATE_QA=1 OPENCLAW_RUN_NODE_SKIP_DTS_BUILD=1 node --import ./scripts/tsx.mjs scripts/build-all.mts qaRuntimeHistorical composition at
40e8against integrated main50c0467edac6, without rename discounts:All 843 strict-main matches (including the earlier 818), 30 exact incoming paths and 18 reviewed overlap integrations remain. There are 158 category-iii paths, no unclassified/category-v paths, and 55 controller production files/13,588 physical lines.