Skip to content

feat(telegram/acp): Topic Binding, Pin Binding Message, Fix Spawn Param Parsing#36683

Merged
osolmaz merged 11 commits intoopenclaw:mainfrom
huntharo:acp-telegram-value-reapply-main
Mar 6, 2026
Merged

feat(telegram/acp): Topic Binding, Pin Binding Message, Fix Spawn Param Parsing#36683
osolmaz merged 11 commits intoopenclaw:mainfrom
huntharo:acp-telegram-value-reapply-main

Conversation

@huntharo
Copy link
Copy Markdown
Member

@huntharo huntharo commented Mar 5, 2026

Summary

Describe the problem and fix in 2–5 bullets:

  • Problem: Telegram topic-bound ACP flows were unreliable: -- args from Telegram Mac could fail parsing, --thread here could report unavailable on Telegram, approvals could fail due callback/approval-id mismatches, and bound topics did not consistently route follow-ups to ACP sessions.
  • Why it matters: This blocked practical ACP use in Telegram topics, forcing manual /acp steer workarounds and breaking multi-topic workspace isolation.
  • What changed: Added Telegram thread-binding support for ACP/session flows, Unicode-dash tolerant /acp spawn parsing, Telegram exec-approval buttons + approval-id prefix resolution, ACPX permission-denied guidance, and topic bind confirmation pinning for ACP spawns.
  • What did NOT change (scope boundary): No new ACP backend/plugin type was added; this remains ACPX-backed behavior and does not change non-ACP runtime architecture.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

  • /acp spawn now accepts Unicode em/en-dash option prefixes used by Telegram Mac input (auto-converts -- when typed).
  • Telegram topics can be thread-bound ACP targets via /acp spawn ... --thread here|auto when Telegram threadBindings ACP spawn is enabled.
  • In bound Telegram topics, normal follow-up messages route to the bound ACP session without requiring /acp steer.
  • Telegram exec approval prompts include actionable inline approval buttons and callback cleanup.
  • Approval resolution tolerates prefixed approval IDs.
  • ACPX permission-denied failures include explicit guidance for permissionMode profiles.
  • Successful Telegram topic ACP bind messages are pinned in-topic.
  • Docs now explicitly call out Telegram topic support for thread-bound ACP sessions.

Security Impact (required)

  • New permissions/capabilities? (No)
  • Secrets/tokens handling changed? (No)
  • New/changed network calls? (No)
  • Command/tool execution surface changed? (No)
  • Data access scope changed? (No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS: macOS (Telegram Desktop on Mac)
  • Runtime/container: local OpenClaw gateway + ACPX backend
  • Model/provider: ACP Codex harness via ACPX
  • Integration/channel (if any): Telegram groups with forum topics (and topic-bound sessions)
  • Relevant config (redacted): Telegram enabled; topic usage enabled; threadBindings ACP spawn enabled; ACPX backend active

Steps

  1. In a Telegram forum topic, run /acp spawn codex —mode persistent —thread here —cwd <repoA> —label <labelA> using Telegram Mac typed args (Unicode dash input).
  2. Send a normal follow-up message in the same topic without /acp steer, such as Who are you?.
  3. Observe typing indicator and response identity in that topic.
  4. In a second Telegram topic, run /acp spawn codex —mode persistent —thread here —cwd <repoB> —label <labelB>.
  5. In each topic, ask for repo-specific summaries and run /acp cwd <path> in-topic, then send another follow-up.

Expected

  • Spawn succeeds in-topic, binds the topic to ACP, posts a bind confirmation, and pins the bind confirmation message with session id.
  • Follow-ups in bound topics route directly to the bound ACP session.
  • Typing indicator appears in the active topic.
  • Different topics stay isolated and respect their bound CWD/session context.

Actual

  • Observed expected behavior in both topics.
  • Spawn confirmation was pinned in-topic.
  • Follow-ups routed to Codex without /acp steer.
  • Second topic remained isolated and responded from its own CWD/session context.

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Baseline - Almost Nothing Works / Binding Not Supported on Telegram

image

PR - Typing Indicator Works in Topics / Pins Binding Message to Topic / Routes to Codex when Bound

image

PR - Topic: ACP Bound - CWD is jeerreview - Describes package.json from JeerReview

image

PR - Topic: ACP - Bound 2 - CWD is openclaw - Describes package.json from OpenClaw

image

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
    • Baseline failure state (before): Telegram topic ACP had argument parsing/thread-binding/focus/routing failures.
    • Post-fix: /acp spawn ... --thread here succeeded in Telegram topics.
    • Post-fix: topic bind confirmation was pinned.
    • Post-fix: follow-up requests routed to Codex in-topic without /acp steer.
    • Post-fix: typing indicator appeared in Telegram topics.
    • Post-fix: two different topics with different CWDs remained correctly isolated and routed.
  • Edge cases checked:
    • Unicode dash options from Telegram Mac.
    • Multi-topic routing isolation.
    • In-topic runtime option update (/acp cwd) and subsequent routing correctness.
  • What you did not verify:
    • Non-Telegram channel regressions in live environments (I don't have Discord setup - sorry!).
    • DM-topic ACP flows under every dmPolicy combination.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No (existing flags used; no new required fields)
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly:
    • Set channels.telegram.threadBindings.spawnAcpSessions=false to disable thread-bound ACP spawn in Telegram.
    • Use /acp spawn ... --thread off as immediate operational fallback.
    • Reset to backup branch: backup-acp-telegram-topic-checkpoint-2026-03-05.
  • Files/config to restore:
    • Telegram thread-binding behavior and ACP command handling files under src/telegram/* and src/auto-reply/reply/commands-acp/*.
  • Known bad symptoms reviewers should watch for:
    • /acp spawn ... --thread here returning unavailable for Telegram topics.
    • Follow-up topic messages routing to main/non-ACP sessions.
    • Approval prompts appearing without actionable buttons in Telegram.

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk: Telegram thread-binding behavior may vary across forum topics vs DM topics in edge chat states.
    • Mitigation: Adapter-level thread spec handling + tests for topic conversation IDs and fallback behavior.
  • Risk: Approval callback routing regressions could deny valid approvals.
    • Mitigation: Prefix-based approval-id resolution + Telegram approval button tests.
  • Risk: Could have broken Discord since I don't have it setup.
    • Mitigation: If someone could test Discord, that would be fantastic!

@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation channel: telegram Channel integration: telegram extensions: acpx size: XL trusted-contributor labels Mar 5, 2026
@huntharo huntharo force-pushed the acp-telegram-value-reapply-main branch from 36c06b4 to b2727d2 Compare March 5, 2026 20:50
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 5, 2026

Greptile Summary

This PR adds Telegram topic-binding support for ACP/subagent flows, Unicode em/en-dash normalization for /acp spawn parsing, in-topic pin of ACP bind confirmations, ACPX permission-denied guidance, and extends /focus, /unfocus, /session idle|max-age, and /agents to work on Telegram as well as Discord. The changes are well-scoped and include comprehensive tests for the new behaviour.

Key highlights:

  • src/telegram/thread-bindings.ts introduces a full Telegram binding manager (conversation-keyed, persisted to disk, with idle/max-age sweeper) that mirrors the Discord implementation and plugs into the shared session-binding-service adapter interface.
  • src/auto-reply/reply/channel-context.ts (renamed from discord-context.ts) extracts channel-agnostic helpers; backward compat is preserved via re-exports.
  • Unicode dash normalization in shared.ts elegantly handles Telegram Mac auto-substitution.
  • One logic bug found: setTelegramThreadBindingMaxAgeBySessionKey resets boundAt to now on every call, which defeats the purpose of the hard max-age cap — the sweeper uses boundAt + maxAgeMs to decide expiry, so the timer restarts every time /session max-age is invoked.

Confidence Score: 3/5

  • Safe to merge after fixing the boundAt reset in setTelegramThreadBindingMaxAgeBySessionKey; the bug allows repeated /session max-age calls to extend bindings indefinitely past their intended hard cap.
  • One clear logic bug was found (boundAt incorrectly reset in the max-age setter, making the hard max-age cap ineffective). The rest of the changes are well-tested with a broad new test suite and the core functionality (routing, spawn, pin, unicode normalization) is correctly implemented. The bug is isolated to the /session max-age Telegram path and doesn't affect spawning or routing correctness.
  • src/telegram/thread-bindings.ts — specifically setTelegramThreadBindingMaxAgeBySessionKey at line 714.

Last reviewed commit: 7fde11b

Comment on lines 345 to 346
if (currentConversationId && boundConversationId === currentConversationId) {
parts.push(`Bound this thread to ${sessionKey}.`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bound-topic confirmation message hardcodes "thread" for all channels. For Telegram contexts, "conversation" or "topic" would match the Telegram terminology used elsewhere in this PR.

Suggested change
if (currentConversationId && boundConversationId === currentConversationId) {
parts.push(`Bound this thread to ${sessionKey}.`);
parts.push(
binding.conversation.channel === "telegram"
? `Bound this conversation to ${sessionKey}.`
: `Bound this thread to ${sessionKey}.`,
);
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/auto-reply/reply/commands-acp/lifecycle.ts
Line: 345-346

Comment:
The bound-topic confirmation message hardcodes "thread" for all channels. For Telegram contexts, "conversation" or "topic" would match the Telegram terminology used elsewhere in this PR.

```suggestion
      parts.push(
        binding.conversation.channel === "telegram"
          ? `Bound this conversation to ${sessionKey}.`
          : `Bound this thread to ${sessionKey}.`,
      );
```

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c8ba3c2. Telegram bind confirmations now use conversation wording on Telegram surfaces and keep thread wording for Discord.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 36c06b4006

ℹ️ 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".

Comment on lines +279 to +283
route = {
...route,
sessionKey: boundSessionKey,
agentId: resolveAgentIdFromSessionKey(boundSessionKey),
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Mark bound Telegram routes as explicit before account guard

When a Telegram conversation binding is found, buildTelegramMessageContext only updates route.sessionKey/agentId and leaves route.matchedBy unchanged. On named Telegram accounts, the later fail-closed guard (candidate.accountId !== DEFAULT_ACCOUNT_ID && candidate.matchedBy === "default") will still drop the message even though an explicit conversation binding exists, so bound-topic/session routing silently fails for those accounts. Set matchedBy to a binding value (as done in Discord preflight) when applying a Telegram binding override.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c8ba3c2. Bound Telegram conversation overrides now mark matchedBy=binding.channel before the non-default account guard, and there is regression coverage in src/telegram/bot-message-context.thread-binding.test.ts.

@huntharo huntharo force-pushed the acp-telegram-value-reapply-main branch from 300cc7d to 11f9c3d Compare March 5, 2026 21:13
@huntharo huntharo force-pushed the acp-telegram-value-reapply-main branch from 11f9c3d to 7fde11b Compare March 5, 2026 21:18
@huntharo
Copy link
Copy Markdown
Member Author

huntharo commented Mar 5, 2026

@greptile-apps can you recheck the code.

Comment on lines +714 to +715
boundAt: now,
lastActivityAt: now,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

boundAt reset incorrectly extends the max-age window on every /session max-age call

setTelegramThreadBindingMaxAgeBySessionKey resets boundAt: now when updating the max-age setting. The entire point of maxAgeMs is to cap the total lifetime of a binding from when it was first created. The sweeper (shouldExpireByMaxAge) and resolveEffectiveBindingExpiresAt both compute expiry as record.boundAt + maxAgeMs. By writing boundAt: now, calling /session max-age 6h restarts the clock from the time of the command, so a binding can be kept alive indefinitely with repeated calls — defeating the purpose of the hard cap.

Contrast this with setTelegramThreadBindingIdleTimeoutBySessionKey (line 680), which correctly leaves boundAt untouched and only updates lastActivityAt: now.

Suggested change
boundAt: now,
lastActivityAt: now,
const next: TelegramThreadBindingRecord = {
...entry,
maxAgeMs,
lastActivityAt: now,
};
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/telegram/thread-bindings.ts
Line: 714-715

Comment:
**`boundAt` reset incorrectly extends the max-age window on every `/session max-age` call**

`setTelegramThreadBindingMaxAgeBySessionKey` resets `boundAt: now` when updating the max-age setting. The entire point of `maxAgeMs` is to cap the total lifetime of a binding from when it was *first created*. The sweeper (`shouldExpireByMaxAge`) and `resolveEffectiveBindingExpiresAt` both compute expiry as `record.boundAt + maxAgeMs`. By writing `boundAt: now`, calling `/session max-age 6h` restarts the clock from the time of the command, so a binding can be kept alive indefinitely with repeated calls — defeating the purpose of the hard cap.

Contrast this with `setTelegramThreadBindingIdleTimeoutBySessionKey` (line 680), which correctly leaves `boundAt` untouched and only updates `lastActivityAt: now`.

```suggestion
      const next: TelegramThreadBindingRecord = {
        ...entry,
        maxAgeMs,
        lastActivityAt: now,
      };
```

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in c8ba3c2. setTelegramThreadBindingMaxAgeBySessionKey now preserves the original boundAt and only updates maxAgeMs plus lastActivityAt. The regression test in src/telegram/thread-bindings.test.ts asserts that boundAt stays unchanged.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fde11b02b

ℹ️ 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".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: af8eb60dda

ℹ️ 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".

Comment on lines +686 to +689
void persistBindingsToDisk({
accountId: manager.accountId,
persist: true,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Respect disabled persistence for Telegram lifecycle updates

setTelegramThreadBindingIdleTimeoutBySessionKey always persists with persist: true, so /session idle will write binding state even when the manager was intentionally created with persist: false. In in-memory/test deployments this leaks ephemeral bindings to disk and can reload stale conversation focus after restart, changing routing behavior unexpectedly; this update path should use the manager’s configured persistence mode (same pattern as Discord lifecycle updates).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2808e9b.

setTelegramThreadBindingIdleTimeoutBySessionKey() now follows the manager's configured persistence mode instead of forcing persist: true, and src/telegram/thread-bindings.test.ts now covers the persist: false case to ensure lifecycle updates do not write state to disk.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8ba3c24e1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

defaultMaxAgeMs: threadBindings.getMaxAgeMs(),
});
const now = Date.now();
const nextExpiry = durationMs > 0 ? now + durationMs : undefined;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compute max-age expiry from binding age

The confirmation message for /session max-age always uses Date.now() + duration, but max-age expiry is actually anchored to each binding’s original boundAt timestamp. For bindings that were created earlier, this reports a deadline that is later than the real auto-unfocus time, so operators can be told a session is safe for hours even though it may expire almost immediately.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2808e9b.

/session max-age confirmation now derives the displayed expiry from the updated binding state, so Telegram max-age uses boundAt + maxAgeMs instead of Date.now() + duration. Added a regression test in src/auto-reply/reply/commands-session-lifecycle.test.ts for an older binding.

if (updated.length > 0) {
void persistBindingsToDisk({
accountId: manager.accountId,
persist: true,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Respect non-persistent mode when updating max age

setTelegramThreadBindingMaxAgeBySessionKey unconditionally writes with persist: true, so /session max-age will still flush bindings to disk even when the manager was intentionally created with persist: false (for ephemeral/test deployments). That leaks temporary focus state into persisted files and can reapply stale bindings after restart.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2808e9b.

setTelegramThreadBindingMaxAgeBySessionKey() now respects the manager's persistence mode instead of always persisting, and the new persist: false regression test exercises both idle and max-age lifecycle updates.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09d5cfe881

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const currentThreadId = bindingContext.threadId ?? "";

if (threadMode === "here" && !currentThreadId) {
const currentConversationId = bindingContext.conversationId?.trim() || "";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Resolve Telegram DM conversation IDs before spawn binding

Telegram DM /acp spawn ... --thread here can never bind because this flow relies on bindingContext.conversationId, but that value is empty in normal DMs (resolveAcpCommandConversationId falls back to resolveConversationIdFromTargets, which does not parse telegram:<chatId> targets). As a result, users in active Telegram DMs hit the --thread here requires... / Could not resolve... errors even though DM conversation bindings are otherwise supported, so ACP spawn auto-binding is broken for DMs.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5badacd.

ACP command context now reuses the shared Telegram conversation resolver, so Telegram DMs produce the canonical DM conversation id instead of falling through to the generic target parser. Added regressions in src/auto-reply/reply/commands-acp/context.test.ts and src/auto-reply/reply/commands-acp.test.ts covering DM context resolution and /acp spawn ... --thread here in a Telegram DM.

@dutifulbob
Copy link
Copy Markdown
Contributor

Addressed the latest Telegram ACP review in 5badacd63.

What changed:

  • ACP command context now reuses the shared Telegram conversation resolver, so Telegram DMs resolve to the canonical DM conversation id instead of falling through to the generic target parser.
  • /acp spawn ... --thread here now binds correctly in Telegram DMs.

Coverage added:

  • src/auto-reply/reply/commands-acp/context.test.ts
  • src/auto-reply/reply/commands-acp.test.ts

Validated with:

  • pnpm vitest src/auto-reply/reply/commands-acp/context.test.ts src/auto-reply/reply/commands-acp.test.ts
  • pnpm build

@osolmaz osolmaz self-assigned this Mar 6, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5badacd639

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

};
configuredBinding = null;
configuredBindingSessionKey = "";
getSessionBindingService().touch(threadBinding.bindingId);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Move binding touch after Telegram access checks

buildTelegramMessageContext updates the Telegram binding activity timestamp before any allowlist/DM policy checks run, so messages that are later rejected (for example, unauthorized users in a restricted group/topic) still call touch and extend idle timeout. In a busy restricted chat this can keep a binding alive indefinitely even though no authorized traffic is occurring, which defeats /session idle auto-unfocus behavior for that conversation.

Useful? React with 👍 / 👎.

@osolmaz osolmaz force-pushed the acp-telegram-value-reapply-main branch from 5badacd to 78e428d Compare March 6, 2026 01:17
@osolmaz osolmaz merged commit d58dafa into openclaw:main Mar 6, 2026
@osolmaz
Copy link
Copy Markdown
Contributor

osolmaz commented Mar 6, 2026

Landed via temp rebase onto main.

  • Gate: pnpm lint && pnpm build && pnpm test
  • Land commit: 78e428d
  • Merge commit: d58dafa

Thanks @huntharo!

mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Mar 6, 2026
* main:
  fix(tui): prevent stale model indicator after /model
  fix(gateway): preserve streamed prefixes across tool boundaries
  feat(telegram/acp): Topic Binding, Pin Binding Message, Fix Spawn Param Parsing (openclaw#36683)
  fix(auth): harden openai-codex oauth login path
  fix(llm-task): load runEmbeddedPiAgent from dist/extensionAPI in installs
  fix(gateway): honor insecure ws override for remote hostnames
  fix(routing): avoid full binding rescans in resolveAgentRoute (openclaw#36915)
  Diffs: restore system prompt guidance (openclaw#36904)
  fix(browser): close tracked tabs on session cleanup (openclaw#36666)
  Harden Telegram poll gating and schema consistency (openclaw#36547)
  fix(memory): avoid destructive qmd collection rebinds
  plugins: enforce prompt hook policy with runtime validation (openclaw#36567)
  fix: decouple Discord inbound worker timeout from listener timeout (openclaw#36602) (thanks @dutifulbob) (openclaw#36602)
  README: add algal to contributors list (openclaw#2046)
  fix(slack): preserve dedupe while recovering dropped app_mention (openclaw#34937)
  fix(slack): propagate mediaLocalRoots through Slack send path
  fix(config): prevent RangeError in merged schema cache key generation
  fix(auth): grant senderIsOwner for internal channels with operator.admin scope (openclaw#35704)
  feat: append UTC time alongside local time in shared Current time lines (openclaw#32423)
@huntharo huntharo deleted the acp-telegram-value-reapply-main branch March 6, 2026 01:58
@aisle-research-bot
Copy link
Copy Markdown

aisle-research-bot bot commented Mar 6, 2026

🔒 Aisle Security Analysis

We found 1 potential security issue(s) in this PR:

# Severity Title
1 🟠 High Telegram topic conversation binding routes any participant’s messages to bound ACP/session without verifying binder

1. 🟠 Telegram topic conversation binding routes any participant’s messages to bound ACP/session without verifying binder

Property Value
Severity High
CWE CWE-862
Location src/telegram/bot-message-context.ts:265-292

Description

buildTelegramMessageContext() now resolves a Telegram conversation binding (topic/DM) and unconditionally overrides route.sessionKey to the bound target session.

  • Input: any Telegram message in the bound forum topic (or DM) provides chatId/message_thread_id and senderId.
  • Authorization gap: routing to the bound session does not verify the sender is authorized for that binding (e.g., senderId === binding.metadata.boundBy) and does not require an explicit control command.
  • Impact: in a group/supergroup forum topic, any member who can post in the topic can inject instructions into the bound session (including ACP sessions spawned with /acp spawn --thread here), potentially steering tool-enabled behavior or exfiltrating session context.

Vulnerable routing logic:

const threadBinding = getSessionBindingService().resolveByConversation({ ... });
...
route = {
  ...route,
  sessionKey: boundSessionKey,
  agentId: resolveAgentIdFromSessionKey(boundSessionKey),
  matchedBy: "binding.channel",
};

While boundBy is recorded and used to restrict rebinding/unfocusing in command handlers, it is not enforced for message routing, enabling cross-user session steering in shared topics.

Recommendation

Enforce an authorization check before routing via a conversation binding.

At minimum, restrict routing to the binding creator (or an explicitly configured allowlist/admin set), especially for group topics:

const boundBy = typeof threadBinding.metadata?.boundBy === "string"
  ? threadBinding.metadata.boundBy.trim()
  : "";

const isGroupTopic = isGroup && replyThreadId != null;

if (isGroupTopic && boundBy && boundBy !== "system" && senderId && senderId !== boundBy) {// Do not route to bound session; fall back to normal routing or ignore.
} else {// existing route override
}

More flexible options:

  • Add a config flag such as channels.telegram.threadBindings.enforceBoundByForRouting=true (default on for Telegram topics).
  • Store binding-specific allowedSenders and check it on each inbound message.
  • For ACP targets, require an explicit authorized control command (e.g., /acp steer) or require mention + command authorization before allowing bound routing.

Analyzed PR: #36683 at commit 78e428d

Last updated on: 2026-03-06T02:55:39Z

thinstripe pushed a commit to thinstripe/openclaw that referenced this pull request Mar 6, 2026
…am Parsing (openclaw#36683)

* fix(acp): normalize unicode flags and Telegram topic binding

* feat(telegram/acp): restore topic-bound ACP and session bindings

* fix(acpx): clarify permission-denied guidance

* feat(telegram/acp): pin spawn bind notice in topics

* docs(telegram): document ACP topic thread binding behavior

* refactor(reply): share Telegram conversation-id resolver

* fix(telegram/acp): preserve bound session routing semantics

* fix(telegram): respect binding persistence and expiry reporting

* refactor(telegram): simplify binding lifecycle persistence

* fix(telegram): bind acp spawns in direct messages

* fix: document telegram ACP topic binding changelog (openclaw#36683) (thanks @huntharo)

---------

Co-authored-by: Onur <[email protected]>
handsdiff pushed a commit to handsdiff/activeclaw that referenced this pull request Mar 6, 2026
…am Parsing (openclaw#36683)

* fix(acp): normalize unicode flags and Telegram topic binding

* feat(telegram/acp): restore topic-bound ACP and session bindings

* fix(acpx): clarify permission-denied guidance

* feat(telegram/acp): pin spawn bind notice in topics

* docs(telegram): document ACP topic thread binding behavior

* refactor(reply): share Telegram conversation-id resolver

* fix(telegram/acp): preserve bound session routing semantics

* fix(telegram): respect binding persistence and expiry reporting

* refactor(telegram): simplify binding lifecycle persistence

* fix(telegram): bind acp spawns in direct messages

* fix: document telegram ACP topic binding changelog (openclaw#36683) (thanks @huntharo)

---------

Co-authored-by: Onur <[email protected]>
jenawant pushed a commit to jenawant/openclaw that referenced this pull request Mar 10, 2026
…am Parsing (openclaw#36683)

* fix(acp): normalize unicode flags and Telegram topic binding

* feat(telegram/acp): restore topic-bound ACP and session bindings

* fix(acpx): clarify permission-denied guidance

* feat(telegram/acp): pin spawn bind notice in topics

* docs(telegram): document ACP topic thread binding behavior

* refactor(reply): share Telegram conversation-id resolver

* fix(telegram/acp): preserve bound session routing semantics

* fix(telegram): respect binding persistence and expiry reporting

* refactor(telegram): simplify binding lifecycle persistence

* fix(telegram): bind acp spawns in direct messages

* fix: document telegram ACP topic binding changelog (openclaw#36683) (thanks @huntharo)

---------

Co-authored-by: Onur <[email protected]>
V-Gutierrez pushed a commit to V-Gutierrez/openclaw-vendor that referenced this pull request Mar 17, 2026
…am Parsing (openclaw#36683)

* fix(acp): normalize unicode flags and Telegram topic binding

* feat(telegram/acp): restore topic-bound ACP and session bindings

* fix(acpx): clarify permission-denied guidance

* feat(telegram/acp): pin spawn bind notice in topics

* docs(telegram): document ACP topic thread binding behavior

* refactor(reply): share Telegram conversation-id resolver

* fix(telegram/acp): preserve bound session routing semantics

* fix(telegram): respect binding persistence and expiry reporting

* refactor(telegram): simplify binding lifecycle persistence

* fix(telegram): bind acp spawns in direct messages

* fix: document telegram ACP topic binding changelog (openclaw#36683) (thanks @huntharo)

---------

Co-authored-by: Onur <[email protected]>
alexey-pelykh pushed a commit to remoteclaw/remoteclaw that referenced this pull request Mar 20, 2026
…am Parsing (openclaw#36683)

* fix(acp): normalize unicode flags and Telegram topic binding

* feat(telegram/acp): restore topic-bound ACP and session bindings

* fix(acpx): clarify permission-denied guidance

* feat(telegram/acp): pin spawn bind notice in topics

* docs(telegram): document ACP topic thread binding behavior

* refactor(reply): share Telegram conversation-id resolver

* fix(telegram/acp): preserve bound session routing semantics

* fix(telegram): respect binding persistence and expiry reporting

* refactor(telegram): simplify binding lifecycle persistence

* fix(telegram): bind acp spawns in direct messages

* fix: document telegram ACP topic binding changelog (openclaw#36683) (thanks @huntharo)

---------

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

(cherry picked from commit d58dafa)
alexey-pelykh pushed a commit to remoteclaw/remoteclaw that referenced this pull request Mar 20, 2026
…am Parsing (openclaw#36683)

* fix(acp): normalize unicode flags and Telegram topic binding

* feat(telegram/acp): restore topic-bound ACP and session bindings

* fix(acpx): clarify permission-denied guidance

* feat(telegram/acp): pin spawn bind notice in topics

* docs(telegram): document ACP topic thread binding behavior

* refactor(reply): share Telegram conversation-id resolver

* fix(telegram/acp): preserve bound session routing semantics

* fix(telegram): respect binding persistence and expiry reporting

* refactor(telegram): simplify binding lifecycle persistence

* fix(telegram): bind acp spawns in direct messages

* fix: document telegram ACP topic binding changelog (openclaw#36683) (thanks @huntharo)

---------

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

(cherry picked from commit d58dafa)
0x666c6f added a commit to 0x666c6f/openclaw that referenced this pull request Mar 26, 2026
…nclaw#29)

* Plugins/llm-task: migrate to scoped plugin-sdk imports

* Plugins/lobster: migrate to scoped plugin-sdk imports

* Plugins/matrix: migrate to scoped plugin-sdk imports

* Plugins/mattermost: migrate to scoped plugin-sdk imports

* Plugins/memory-core: migrate to scoped plugin-sdk imports

* Plugins/memory-lancedb: migrate to scoped plugin-sdk imports

* Plugins/minimax-portal-auth: migrate to scoped plugin-sdk imports

* Plugins/msteams: migrate to scoped plugin-sdk imports

* Plugins/nextcloud-talk: migrate to scoped plugin-sdk imports

* Plugins/nostr: migrate to scoped plugin-sdk imports

* Plugins/open-prose: migrate to scoped plugin-sdk imports

* Plugins/phone-control: migrate to scoped plugin-sdk imports

* Plugins/qwen-portal-auth: migrate to scoped plugin-sdk imports

* Plugins/synology-chat: migrate to scoped plugin-sdk imports

* Plugins/talk-voice: migrate to scoped plugin-sdk imports

* Plugins/test-utils: migrate to scoped plugin-sdk imports

* Plugins/thread-ownership: migrate to scoped plugin-sdk imports

* Plugins/tlon: migrate to scoped plugin-sdk imports

* Plugins/twitch: migrate to scoped plugin-sdk imports

* Plugins/voice-call: migrate to scoped plugin-sdk imports

* Plugins/whatsapp: migrate to scoped plugin-sdk imports

* Plugins/zalo: migrate to scoped plugin-sdk imports

* Plugins/zalouser: migrate to scoped plugin-sdk imports

* Chore: remove accidental .DS_Store artifact

* chore(docs): add plugins refactor changelog entry

* feat(ios): add Live Activity connection status + stale cleanup (#33591)

* feat(ios): add live activity connection status and cleanup

Add lock-screen/Dynamic Island connection health states and prune duplicate/stale activities before reuse. This intentionally excludes AI/title generation and heavier UX rewrites from #27488.

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

* fix(ios): treat ended live activities as inactive

* chore(changelog): add PR reference and author thanks

---------

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

* fix: kill stuck ACP child processes on startup and harden sessions in discord threads (#33699)

* Gateway: resolve agent.wait for chat.send runs

* Discord: harden ACP thread binding + listener timeout

* ACPX: handle already-exited child wait

* Gateway/Discord: address PR review findings

* Discord: keep ACP error-state thread bindings on startup

* gateway: make agent.wait dedupe bridge event-driven

* discord: harden ACP probe classification and cap startup fan-out

* discord: add cooperative timeout cancellation

* discord: fix startup probe concurrency helper typing

* plugin-sdk: avoid Windows root-alias shard timeout

* plugin-sdk: keep root alias reflection path non-blocking

* discord+gateway: resolve remaining PR review findings

* gateway+discord: fix codex review regressions

* Discord/Gateway: address Codex review findings

* Gateway: keep agent.wait lifecycle active with shared run IDs

* Discord: clean up status reactions on aborted runs

* fix: add changelog note for ACP/Discord startup hardening (#33699) (thanks @dutifulbob)

---------

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

* fix: relay ACP sessions_spawn parent streaming (#34310) (thanks @vincentkoc) (#34310)

Co-authored-by: Onur Solmaz <[email protected]>

* fix(telegram): materialize dm draft final to avoid duplicates

* docs(changelog): credit @Brotherinlaw-13 for #34318

* fix: prevent nodes media base64 context bloat (#34332)

* fix: preserve raw media invoke for HTTP tool clients (#34365)

* fix(slack): route system events to bound agent sessions (#34045)

* fix(slack): route system events via binding-aware session keys

* fix(slack): pass sender to system event session resolver

* fix(slack): include sender context for interaction session routing

* fix(slack): include modal submitter in session routing

* test(slack): cover binding-aware system event routing

* test(slack): update interaction session key assertions

* test(slack): assert reaction session routing carries sender

* docs(changelog): note slack system event routing fix

* Update CHANGELOG.md

* Delete changelog/fragments directory

* fix(memory): serialize local embedding initialization to avoid duplicate model loads (#15639)

Merged via squash.

Prepared head SHA: a085fc21a8ba7163fffdb5de640dd4dc1ff5a88e
Co-authored-by: SubtleSpark <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(model): propagate custom provider headers to model objects (#27490)

Merged via squash.

Prepared head SHA: e4183b398fc7eb4c18b2b691cb0dd882ec993608
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(daemon): handle systemctl is-enabled exit 4 (not-found) on Ubuntu (#33634)

Merged via squash.

Prepared head SHA: 67dffc3ee239cd7b813cb200c3dd5475d9e203a6
Co-authored-by: Yuandiaodiaodiao <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(node-host): sync rawCommand with hardened argv after executable path pinning (#33137)

Merged via squash.

Prepared head SHA: a7987905f7ad6cf5fee286ffa81ceaad8297174f
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* Agents: add generic poll-vote action support

* fix(ollama): pass provider headers to Ollama stream function (#24285)

createOllamaStreamFn() only accepted baseUrl, ignoring custom headers
configured in models.providers.<provider>.headers. This caused 403
errors when Ollama endpoints are behind reverse proxies that require
auth headers (e.g. X-OLLAMA-KEY via HAProxy).

Add optional defaultHeaders parameter to createOllamaStreamFn() and
merge them into every fetch request. Provider headers from config are
now passed through at the call site in the embedded runner.

Fixes #24285

* test(ollama): add default header precedence coverage

* chore(changelog): add PR entry openclaw#24337 thanks @echoVic

* Outbound: allow text-only plugin adapters

* Outbound: avoid empty multi-media fallback sends

* chore(changelog): align outbound adapter entry openclaw#32788 thanks @liuxiaopai-ai

* fix(outbound): fail media-only text-only adapter fallback

* chore(changelog): clarify outbound media-only fallback openclaw#32788 thanks @liuxiaopai-ai

* fix(review): enforce behavioral sweep validation

* Fix gateway restart false timeouts on Debian/systemd (#34874)

* daemon(systemd): target sudo caller user scope

* test(systemd): cover sudo user scope commands

* infra(ports): fall back to ss when lsof missing

* test(ports): verify ss fallback listener detection

* cli(gateway): use probe fallback for restart health

* test(gateway): cover restart-health probe fallback

* Compaction/Safeguard: require structured summary headings (#25555)

Merged via squash.

Prepared head SHA: 0b1df34806a7b788261290be55760fd89220de53
Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* Fix Linux daemon install checks when systemd user bus env is missing (#34884)

* daemon(systemd): fall back to machine user scope when user bus is missing

* test(systemd): cover machine scope fallback for user-bus errors

* test(systemd): reset execFile mock state across cases

* test(systemd): make machine-user fallback assertion portable

* fix(daemon): keep root sudo path on direct user scope

* test(systemd): cover sudo root user-scope behavior

* ci: use resolvable bun version in setup-node-env

* agents: preserve totalTokens on request failure instead of using contextWindow (#34275)

Merged via squash.

Prepared head SHA: f9d111d0a79a07815d476356e98a28df3a0000ba
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix: align AGENTS.md template section names with post-compaction extraction (#25029) (#25098)

Merged via squash.

Prepared head SHA: 8cd6cc8049aab5a94d8a9d5fb08f2e792c4ac5fd
Co-authored-by: echoVic <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* Changelog: add daemon systemd user-bus fallback entry (#34884)

* Changelog: add gateway restart health entry (#34874)

* fix: finalize spanish locale support

* fix: add spanish locale support (#35038) (thanks @DaoPromociones)

* fix(deps): patch hono transitive audit vulnerabilities

* fix(security): avoid prototype-chain account path checks (#34982)

Merged via squash.

Prepared head SHA: f89cc6a649959997fe1dec1e1c1bff9a61b2de98
Co-authored-by: HOYALIM <[email protected]>
Co-authored-by: dvrshil <[email protected]>
Reviewed-by: @dvrshil

* fix(deps): bump tar to 7.5.10

* docs(changelog): document dependency security fixes

* fix: restore auto-reply system events timeline (#34794) (thanks @anisoptera) (#34794)

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

* fix(feishu): comprehensive reply mechanism — outbound replyToId forwarding + topic-aware reply targeting (#33789)

* fix(feishu): comprehensive reply mechanism fix — outbound replyToId forwarding + topic-aware reply targeting

- Forward replyToId from ChannelOutboundContext through sendText/sendMedia
  to sendMessageFeishu/sendMarkdownCardFeishu/sendMediaFeishu, enabling
  reply-to-message via the message tool.

- Fix group reply targeting: use ctx.messageId (triggering message) in
  normal groups to prevent silent topic thread creation (#32980). Preserve
  ctx.rootId targeting for topic-mode groups (group_topic/group_topic_sender)
  and groups with explicit replyInThread config.

- Add regression tests for both fixes.

Fixes #32980
Fixes #32958
Related #19784

* fix: normalize Feishu delivery.to before comparing with messaging tool targets

- Add normalizeDeliveryTarget helper to strip user:/chat: prefixes for Feishu
- Apply normalization in matchesMessagingToolDeliveryTarget before comparison
- This ensures cron duplicate suppression works when session uses prefixed targets
  (user:ou_xxx) but messaging tool extract uses normalized bare IDs (ou_xxx)

Fixes review comment on PR #32755

(cherry picked from commit fc20106f16ccc88a5f02e58922bb7b7999fe9dcd)

* fix(feishu): catch thrown SDK errors for withdrawn reply targets

The Feishu Lark SDK can throw exceptions (SDK errors with .code or
AxiosErrors with .response.data.code) for withdrawn/deleted reply
targets, in addition to returning error codes in the response object.

Wrap reply calls in sendMessageFeishu and sendCardFeishu with
try-catch to handle thrown withdrawn/not-found errors (230011,
231003) and fall back to client.im.message.create, matching the
existing response-level fallback behavior.

Also extract sendFallbackDirect helper to deduplicate the
direct-send fallback block across both functions.

Closes #33496

(cherry picked from commit ad0901aec103a2c52f186686cfaf5f8ba54b4a48)

* feishu: forward outbound reply target context

(cherry picked from commit c129a691fcf552a1cebe1e8a22ea8611ffc3b377)

* feishu extension: tighten reply target fallback semantics

(cherry picked from commit f85ec610f267020b66713c09e648ec004b2e26f1)

* fix(feishu): align synthesized fallback typing and changelog attribution

* test(feishu): cover group_topic_sender reply targeting

---------

Co-authored-by: Xu Zimo <[email protected]>
Co-authored-by: Munem Hashmi <[email protected]>
Co-authored-by: bmendonca3 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(feishu): use msg_type media for mp4 video (fixes #33674) (#33720)

* fix(feishu): use msg_type media for mp4 video (fixes #33674)

* Feishu: harden streaming merge semantics and final reply dedupe

Use explicit streaming update semantics in the Feishu reply dispatcher:
treat onPartialReply payloads as snapshot updates and block fallback payloads
as delta chunks, then merge final text with the shared overlap-aware
mergeStreamingText helper before closing the stream.

Prevent duplicate final text delivery within the same dispatch cycle, and add
regression tests covering overlap snapshot merge, duplicate final suppression,
and block-as-delta behavior to guard against repeated/truncated output.

* fix(feishu): prefer message.reply for streaming cards in topic threads

* fix: reduce Feishu streaming card print_step to avoid duplicate rendering

Fixes openclaw/openclaw#33751

* Feishu: preserve media sends on duplicate finals and add media synthesis changelog

* Feishu: only dedupe exact duplicate final replies

* Feishu: use scoped plugin-sdk import in streaming-card tests

---------

Co-authored-by: 倪汉杰0668001185 <[email protected]>
Co-authored-by: zhengquanliu <[email protected]>
Co-authored-by: nick <[email protected]>
Co-authored-by: linhey <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(agents): bypass pendingDescendantRuns guard for cron announce delivery (#35185)

* fix(agents): bypass pendingDescendantRuns guard for cron announce delivery

Standalone cron job completions were blocked from direct channel delivery
when the cron run had spawned subagents that were still registered as
pending. The pendingDescendantRuns guard exists for live orchestration
coordination and should not apply to fire-and-forget cron announce sends.

Thread the announceType through the delivery chain and skip both the
child-descendant and requester-descendant pending-run guards when the
announce originates from a cron job.

Closes #34966

* fix: ensure outbound session entry for cron announce with named agents (#32432)

Named agents may not have a session entry for their delivery target,
causing the announce flow to silently fail (delivered=false, no error).

Two fixes:
1. Call ensureOutboundSessionEntry when resolving the cron announce
   session key so downstream delivery can find channel metadata.
2. Fall back to direct outbound delivery when announce delivery fails
   to ensure cron output reaches the target channel.

Closes #32432

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: guard announce direct-delivery fallback against suppression leaks (#32432)

The `!delivered` fallback condition was too broad — it caught intentional
suppressions (active subagents, interim messages, SILENT_REPLY_TOKEN) in
addition to actual announce delivery failures.  Add an
`announceDeliveryWasAttempted` flag so the direct-delivery fallback only
fires when `runSubagentAnnounceFlow` was actually called and failed.

Also remove the redundant `if (route)` guard in
`resolveCronAnnounceSessionKey` since `resolved` being truthy guarantees
`route` is non-null.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix(cron): harden announce synthesis follow-ups

---------

Co-authored-by: scoootscooob <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* Feishu: harden streaming merge semantics and final reply dedupe (#33245)

* Feishu: close duplicate final gap and cover routing precedence

* Feishu: resolve reviewer duplicate-final and routing feedback

* Feishu: tighten streaming send-mode option typing

* Feishu: fix reverse-overlap streaming merge ordering

* Feishu: align streaming final dedupe test expectation

* Feishu: allow distinct streaming finals while deduping repeats

---------

Co-authored-by: Tak Hoffman <[email protected]>

* fix: cron backup should preserve pre-edit snapshot (#35195) (#35234)

* fix(cron): avoid overwriting .bak during normalization

Fixes openclaw/openclaw#35195

* test(cron): preserve pre-edit bak snapshot in normalization path

---------

Co-authored-by: 0xsline <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(cron): stabilize restart catch-up replay semantics (#35351)

* Cron: stabilize restart catch-up replay semantics

* Cron: respect backoff in startup missed-run replay

* cron: narrow startup replay backoff guard (#35391)

* cron: unify stale-run recovery and preserve manual-run every anchors (#35363)

* cron: unify stale-run recovery and preserve manual every anchors

* cron: address unresolved review threads on recovery paths

* cron: remove duplicate timestamp helper after rebase

* refactor(telegram): remove unused webhook callback helper (#27816)

* fix(pr): make review claim step required

* fix(skills): deduplicate slash commands by skillName across all interfaces

Move skill-command deduplication by skillName from the Discord-only
`dedupeSkillCommandsForDiscord` into `listSkillCommandsForAgents` so
every interface (TUI, Slack, text) consistently sees a clean command
list without platform-specific workarounds.

When multiple agents share a skill with the same name the old code
emitted `github` + `github_2` and relied on Discord to collapse them.
Now `listSkillCommandsForAgents` returns only the first registration
per skillName, and the Discord-specific wrapper is removed.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* style: fix formatting in skill-commands.test.ts and provider.ts

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* style(skills): align formatting cleanup for dedupe changes

* chore(changelog): add dedupe note openclaw#27521 thanks @shivama205

* fix(agents): detect Venice provider proxying xAI/Grok models for schema cleaning (#35355)

Merged via squash.

Prepared head SHA: 8bfdec257bb6a6025cb69a0a213a433da32b15db
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(agents): decode HTML entities in xAI/Grok tool call arguments (#35276)

Merged via squash.

Prepared head SHA: c4445d2938898ded9c046614f9315dbda65ec573
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(agents): guard promoteThinkingTagsToBlocks against malformed content entries (#35143)

Merged via squash.

Prepared head SHA: 3971122f5fd27c66c8c9c5ce783f00e113b1f47b
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(web-ui): render Accounts schema node properly (#35380)

Co-authored-by: stakeswky <[email protected]>
Co-authored-by: liuxiaopai-ai <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(agents): guard context pruning against malformed thinking blocks (#35146)

Merged via squash.

Prepared head SHA: a196a565b1b8e806ffbf85172bcf1128796b45a2
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(gateway): prevent internal route leakage in chat.send

Synthesis of routing fixes from #35321, #34635, and #35356 for internal-client reply safety.

- Require explicit `deliver: true` before inheriting any external delivery route.
- Keep webchat/TUI/UI-origin traffic on internal routing by default.
- Allow configured-main session inheritance only for non-Webchat/UI clients, and honor `session.mainKey`.
- Add regression tests for UI no-inherit, configured-main CLI inherit, and deliver-flag behavior.

Co-authored-by: alexyyyander <[email protected]>
Co-authored-by: Octane0411 <[email protected]>
Co-authored-by: Linux2010 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(gateway): pass actual version to Control UI client instead of dev (#35230)

* fix(gateway): pass actual version to Control UI client instead of "dev"

The GatewayClient, CLI WS client, and browser Control UI all sent
"dev" as their clientVersion during handshake, making it impossible
to distinguish builds in gateway logs and health snapshots.

- GatewayClient and CLI WS client now use the resolved VERSION constant
- Control UI reads serverVersion from the bootstrap endpoint and
  forwards it when connecting
- Bootstrap contract extended with serverVersion field

Closes #35209

* Gateway: fix control-ui version version-reporting consistency

* Control UI: guard deferred bootstrap connect after disconnect

* fix(ui): accept same-origin http and relative gateway URLs for client version

---------

Co-authored-by: Tak Hoffman <[email protected]>

* chore(pr): enforce changelog placement and reduce merge sync churn

* TTS: add baseUrl support to OpenAI TTS config (#34321)

Merged via squash.

Prepared head SHA: e9a10cf81d2021cf81091dfa81e13ffdbb6a540a
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* ACP: add persistent Discord channel and Telegram topic bindings (#34873)

* docs: add ACP persistent binding experiment plan

* docs: align ACP persistent binding spec to channel-local config

* docs: scope Telegram ACP bindings to forum topics only

* docs: lock bound /new and /reset behavior to in-place ACP reset

* ACP: add persistent discord/telegram conversation bindings

* ACP: fix persistent binding reuse and discord thread parent context

* docs: document channel-specific persistent ACP bindings

* ACP: split persistent bindings and share conversation id helpers

* ACP: defer configured binding init until preflight passes

* ACP: fix discord thread parent fallback and explicit disable inheritance

* ACP: keep bound /new and /reset in-place

* ACP: honor configured bindings in native command flows

* ACP: avoid configured fallback after runtime bind failure

* docs: refine ACP bindings experiment config examples

* acp: cut over to typed top-level persistent bindings

* ACP bindings: harden reset recovery and native command auth

* Docs: add ACP bound command auth proposal

* Tests: normalize i18n registry zh-CN assertion encoding

* ACP bindings: address review findings for reset and fallback routing

* ACP reset: gate hooks on success and preserve /new arguments

* ACP bindings: fix auth and binding-priority review findings

* Telegram ACP: gate ensure on auth and accepted messages

* ACP bindings: fix session-key precedence and unavailable handling

* ACP reset/native commands: honor fallback targets and abort on bootstrap failure

* Config schema: validate ACP binding channel and Telegram topic IDs

* Discord ACP: apply configured DM bindings to native commands

* ACP reset tails: dispatch through ACP after command handling

* ACP tails/native reset auth: fix target dispatch and restore full auth

* ACP reset detection: fallback to active ACP keys for DM contexts

* Tests: type runTurn mock input in ACP dispatch test

* ACP: dedup binding route bootstrap and reset target resolution

* reply: align ACP reset hooks with bound session key

* docs: replace personal discord ids with placeholders

* fix: add changelog entry for ACP persistent bindings (#34873) (thanks @dutifulbob)

---------

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

* docs(telegram): recommend allowlist for single-user DM policy (#34841)

* docs(telegram): recommend allowlist for single-user bots

* docs(telegram): condense single-user allowlist note

---------

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

* fix(feishu): check response.ok before calling response.json() in streaming card (#35628)

Merged via squash.

Prepared head SHA: 62c3fec80d97cea9be344c0bef5358a0a5dc5560
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* Mattermost: honor onmessage mention override and add gating diagnostics tests (#27160)

Merged via squash.

Prepared head SHA: 6cefb1d5bf3d6dfcec36c1cee3f9ea887f10c890
Co-authored-by: turian <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Reviewed-by: @mukhtharcm

* fix(subagents): strip leaked [[reply_to]] tags from completion announces (#34503)

* fix(subagents): strip reply tags from completion delivery text

* test(subagents): cover reply-tag stripping in cron completion sends

* changelog: note iMessage reply-tag stripping in completion announces

* Update CHANGELOG.md

* Apply suggestion from @greptile-apps[bot]

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix(cron): restore direct fallback after announce failure in best-effort mode (openclaw#36177)

Verified:
- pnpm build
- pnpm check (fails on pre-existing origin/main lint debt in extensions/mattermost imports)
- pnpm test:macmini

Co-authored-by: Tak Hoffman <[email protected]>

* test(cron): add cross-channel announce fallback regression coverage (openclaw#36197)

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check (fails on pre-existing origin/main lint debt in extensions/mattermost imports)
- pnpm test:macmini

Co-authored-by: Tak Hoffman <[email protected]>

* feat(mattermost): add interactive buttons support (#19957)

Merged via squash.

Prepared head SHA: 8a25e608729d0b9fd07bb0ee4219d199d9796dbe
Co-authored-by: tonydehnke <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Reviewed-by: @mukhtharcm

* fix(browser): remove deprecated --disable-blink-features=AutomationControlled flag

- Removes OpenClaw's default `--disable-blink-features=AutomationControlled` Chrome launch switch to avoid unsupported-flag warnings in newer Chrome (#35721).
- Preserves compatibility for older Chrome via `browser.extraArgs` override behavior (source analysis: #35770, #35728, #35727, #35885).
- Synthesis attribution: thanks @Sid-Qin, @kevinWangSheng, @ningding97, @Naylenv, @clawbie.

Source PR refs: #35734, #35770, #35728, #35727, #35885

Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: kevinWangSheng <[email protected]>
Co-authored-by: ningding97 <[email protected]>
Co-authored-by: Naylenv <[email protected]>
Co-authored-by: clawbie <[email protected]>
Co-authored-by: Takhoffman <[email protected]>

* fix(feishu): add HTTP timeout to prevent per-chat queue deadlocks (#36430)

When the Feishu API hangs or responds slowly, the sendChain never settles,
causing the per-chat queue to remain in a processing state forever and
blocking all subsequent messages in that thread. This adds a 30-second
default timeout to all Feishu HTTP requests by providing a timeout-aware
httpInstance to the Lark SDK client.

Closes #36412

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

* fix(feishu): use probed botName for mention checks (#36391)

* Feishu: honor bot mentions by ID despite aliases (Fixes #36317) (#36333)

* Mattermost: switch plugin-sdk imports to scoped subpaths (openclaw#36480)

Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(feishu): accept groupPolicy "allowall" as alias for "open" (#36358)

* fix(feishu): accept groupPolicy "allowall" as alias for "open"

When users configure groupPolicy: "allowall" in Feishu channel config,
the Zod schema rejects the value and the runtime policy check falls
through to the allowlist path.  With an empty allowFrom array, all group
messages are silently dropped despite the intended "allow all" semantics.

Accept "allowall" at the schema level (transform to "open") and add a
runtime guard in isFeishuGroupAllowed so the value is handled even if it
bypasses schema validation.

Closes #36312

Made-with: Cursor

* Feishu: tighten allowall alias handling and coverage

---------

Co-authored-by: Tak Hoffman <[email protected]>

* synthesis: fix Feishu group mention slash parsing

## Summary\n\nFeishu group slash command parsing is fixed for mentions and command probes across authorization paths.\n\nThis includes:\n- Normalizing bot mention text in group context for reliable slash detection in message parsing.\n- Adding command-probe normalization for group slash invocations.\n\nCo-authored-by: Sid Qin <[email protected]>\nCo-authored-by: Tak Hoffman <[email protected]>

* Feishu: normalize group slash command probing

- Feishu/group slash command detection: normalize group mention wrappers before command-authorization probing so mention-prefixed commands are recognized in group routing.\n- Source PR: #36011\n- Contributor: @liuxiaopai-ai\n\nCo-authored-by: Tak Hoffman <[email protected]>\nCo-authored-by: liuxiaopai-ai <[email protected]>

* add prependSystemContext and appendSystemContext to before_prompt_build (fixes #35131) (#35177)

Merged via squash.

Prepared head SHA: d9a2869ad69db9449336a2e2846bd9de0e647ac6
Co-authored-by: maweibin <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(feishu): avoid media regressions from global HTTP timeout (#36500)

* fix(feishu): avoid media regressions from global http timeout

* fix(feishu): source HTTP timeout from config

* fix(feishu): apply media timeout override to image uploads

* fix(feishu): invalidate cached client when timeout changes

* fix(feishu): clamp timeout values and cover image download

* Gateway: add SecretRef support for gateway.auth.token with auth-mode guardrails (#35094)

* fix(embedded): classify model_context_window_exceeded as context overflow, trigger compaction (#35934)

Merged via squash.

Prepared head SHA: 20fa77289c80b2807a6779a3df70440242bc18ca
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(agents): skip compaction API call when session has no real messages (#36451)

Merged via squash.

Prepared head SHA: 52dd6317895c7bd10855d2bd7dbbfc2f5279b68e
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(ui): catch marked.js parse errors to prevent Control UI crash (#36445)

- Prevent Control UI session render crashes when `marked.parse()` encounters pathological recursive markdown by safely falling back to escaped `<pre>` output.
- Tighten markdown fallback regression coverage and keep changelog attribution in sync for this crash-hardening path.

Co-authored-by: Bin Deng <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(session): archive old transcript on daily/scheduled reset to prevent orphaned files (#35493)

Merged via squash.

Prepared head SHA: 0d95549d752adecfc0b08d5cd55a8b8c75e264fe
Co-authored-by: byungsker <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(agents): set preserveSignatures to isAnthropic in resolveTranscriptPolicy (#32813)

Merged via squash.

Prepared head SHA: f522d21ca59a42abac554435a0aa646f6a34698d
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix: avoid false global rate-limit classification from generic cooldown text (#32972)

Merged via squash.

Prepared head SHA: 813c16f5afce415da130a917d9ce9f968912b477
Co-authored-by: stakeswky <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* refactor(agents): share failover HTTP status classification (#36615)

* fix(agents): classify transient failover statuses consistently

* fix(agents): preserve legacy failover status mapping

* fix(failover): narrow service-unavailable to require overload indicator (#32828) (#36646)

Merged via squash.

Prepared head SHA: 46fb4306127972d7635f371fd9029fbb9baff236
Co-authored-by: jnMetaCode <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* Compaction/Safeguard: add summary quality audit retries (#25556)

Merged via squash.

Prepared head SHA: be473efd1635616ebbae6e649d542ed50b4a827f
Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* test(agents): add provider-backed failover regressions (#36735)

* test(agents): add provider-backed failover fixtures

* test(agents): cover more provider error docs

* test(agents): tighten provider doc fixtures

* Docs: add Slack typing reaction fallback

* Docs: update gateway config reference for Slack and TTS

* Docs: clarify OpenAI-compatible TTS endpoints

* Docs: document Control UI locale support

* Docs: cover heartbeat, cron, and plugin route updates

* fix(ui): bump dompurify to 3.3.2 (#36781)

* UI: bump dompurify to 3.3.2

* Deps: refresh dompurify lockfile

* UI: hoist lifecycle connect test mocks (#36788)

* fix(agents): classify insufficient_quota 400s as billing (#36783)

* feat: append UTC time alongside local time in shared Current time lines (#32423)

Merged via squash.

Prepared head SHA: 9e8ec13933b5317e7cff3f0bc048de515826c31a
Co-authored-by: jriff <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* fix(auth): grant senderIsOwner for internal channels with operator.admin scope (openclaw#35704)

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Naylenv <[email protected]>
Co-authored-by: Octane0411 <[email protected]>
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(config): prevent RangeError in merged schema cache key generation

Fix merged schema cache key generation for high-cardinality plugin/channel metadata by hashing incrementally instead of serializing one large aggregate string.

Includes changelog entry for the user-visible regression fix.

Co-authored-by: Tak Hoffman <[email protected]>
Co-authored-by: Bill <[email protected]>

* fix(slack): propagate mediaLocalRoots through Slack send path

Restore Slack local file upload parity with CVE-era local media allowlist enforcement by threading `mediaLocalRoots` through the Slack send call chain.

- pass `ctx.mediaLocalRoots` from Slack channel action adapter into `handleSlackAction`
- add and forward `mediaLocalRoots` in Slack action context/send path
- pass `mediaLocalRoots` into `sendMessageSlack` for upload allowlist enforcement
- add changelog entry with attribution for this behavior fix

Co-authored-by: 2233admin <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(slack): preserve dedupe while recovering dropped app_mention (#34937)

This PR fixes Slack mention loss without reintroducing duplicate dispatches.

- Preserve seen-message dedupe at ingress to prevent duplicate processing.
- Allow a one-time app_mention retry only when the paired message event was previously dropped before dispatch.
- Add targeted race tests for both recovery and duplicate-prevention paths.

Co-authored-by: littleben <[email protected]>
Co-authored-by: OpenClaw Agent <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* README: add algal to contributors list (#2046)

* fix: decouple Discord inbound worker timeout from listener timeout (#36602) (thanks @dutifulbob) (#36602)

Co-authored-by: Onur Solmaz <[email protected]>

* plugins: enforce prompt hook policy with runtime validation (#36567)

Merged via squash.

Prepared head SHA: 6b9d883b6ae33628235fb02ce39c0d0f46a065bb
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(memory): avoid destructive qmd collection rebinds

* Harden Telegram poll gating and schema consistency (#36547)

Merged via squash.

Prepared head SHA: f77824419e3d166f727474a9953a063a2b4547f2
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(browser): close tracked tabs on session cleanup (#36666)

* Diffs: restore system prompt guidance (#36904)

Merged via squash.

Prepared head SHA: 1b3be3c87957c068473d5c86b9efba4a1a8503f2
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(routing): avoid full binding rescans in resolveAgentRoute (#36915)

* fix(gateway): honor insecure ws override for remote hostnames

* fix(llm-task): load runEmbeddedPiAgent from dist/extensionAPI in installs

* fix(auth): harden openai-codex oauth login path

* feat(telegram/acp): Topic Binding, Pin Binding Message, Fix Spawn Param Parsing (#36683)

* fix(acp): normalize unicode flags and Telegram topic binding

* feat(telegram/acp): restore topic-bound ACP and session bindings

* fix(acpx): clarify permission-denied guidance

* feat(telegram/acp): pin spawn bind notice in topics

* docs(telegram): document ACP topic thread binding behavior

* refactor(reply): share Telegram conversation-id resolver

* fix(telegram/acp): preserve bound session routing semantics

* fix(telegram): respect binding persistence and expiry reporting

* refactor(telegram): simplify binding lifecycle persistence

* fix(telegram): bind acp spawns in direct messages

* fix: document telegram ACP topic binding changelog (#36683) (thanks @huntharo)

---------

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

* fix(gateway): preserve streamed prefixes across tool boundaries

* fix(tui): prevent stale model indicator after /model

* Memory: handle SecretRef keys in doctor embeddings (#36835)

Merged via squash.

Prepared head SHA: c1a3d0caae60115d886e8bfc9983c9533c773f04
Co-authored-by: joshavant <[email protected]>
Co-authored-by: joshavant <[email protected]>
Reviewed-by: @joshavant

* fix(openai-codex): request required oauth api scopes (#24720)

* fix(memory-flush): ban timestamped variant files in default flush prompt (#34951)

Merged via squash.

Prepared head SHA: efadda4988b460e6da07be72994d4951d64239d0
Co-authored-by: zerone0x <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(tui): render final event error when assistant output is empty (#14687)

* feat(agents): flush reply pipeline before compaction wait (#35489)

Merged via squash.

Prepared head SHA: 7dbbcc510b74b0e8d35eb750d24575e34b5d769a
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(secrets): harden api key normalization for ByteString headers

* fix(slack): remove double mrkdwn conversion in native streaming path

Remove redundant text normalization from Slack native streaming markdown_text flow so Markdown formatting is preserved.

Synthesis context: overlaps reviewed from #34931, #34759, #34716, #34682, #34814.

Co-authored-by: littleben <[email protected]>
Co-authored-by: dunamismax <[email protected]>
Co-authored-by: Octane <[email protected]>
Co-authored-by: Mitsuyuki Osabe <[email protected]>
Co-authored-by: Kai <[email protected]>
Co-authored-by: OpenClaw Agent <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(kimi-coding): normalize anthropic tool payload format

* fix(slack): thread channel ID through inbound context for reactions (#34831)

Slack reaction/thread context routing fixes via canonical synthesis of #34831.

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

* fix(heartbeat): pin HEARTBEAT.md reads to workspace path

* fix(subagents): recover announce cleanup after kill/complete race

* feat(hooks): emit compaction lifecycle hooks (#16788)

* fix(auth): harden openai-codex oauth refresh fallback

* fix(subagents): announce delivery with descendant gating, frozen result refresh, and cron retry (#35080)

Thanks @tyler6204

* fix(agents): avoid synthetic tool-result writes on idle-timeout cleanup

* fix(agent): harden undici stream timeouts for long openai-completions runs

* fix(slack): record app_mention retry key before dedupe check (#37033)

- Prime app_mention retry allowance before dedupe so near-simultaneous message/app_mention races do not drop valid mentions.
- Prevent duplicate dispatch when app_mention wins the race and message prepare later succeeds.
- Prune dispatched mention keys and add regression coverage for both dropped and successful in-flight message outcomes.

Co-authored-by: Tak Hoffman <[email protected]>

* fix(agents): honor explicit rate-limit cooldown probes in fallback runs

* fix(agents): allow configured ollama endpoints without dummy api keys

* fix(memory): recover qmd updates from duplicate document constraints

* Doctor: warn on implicit heartbeat directPolicy (#36789)

* Changelog: note heartbeat directPolicy doctor warning

* Tests: cover heartbeat directPolicy doctor warning

* Doctor: warn on implicit heartbeat directPolicy

* Tests: cover per-agent heartbeat directPolicy warning

* Update CHANGELOG.md

* Plugins: clarify registerHttpHandler migration errors (#36794)

* Changelog: note plugin HTTP route migration diagnostics

* Tests: cover registerHttpHandler migration diagnostics

* Plugins: clarify registerHttpHandler migration errors

* Tests: cover registerHttpHandler diagnostic edge cases

* Plugins: tighten registerHttpHandler migration hint

* fix(memory): repair qmd collection name conflicts during ensure

* fix(memory): handle qmd search results without docid

* Plugins: avoid false integrity drift prompts on unpinned updates (#37179)

* Plugins: skip drift prompts for unpinned updates

* Plugins: cover unpinned integrity update behavior

* Changelog: add #37179 release note

* Delete changelog/fragments directory

* Update CHANGELOG.md

* fix(whatsapp): remove implicit [openclaw] self-chat prefix

* fix: remove config.schema from agent gateway tool (#7382)

Merged via squash.

Prepared head SHA: f34a7780690a941936b31899e2d096b8a07f4afc
Co-authored-by: kakuteki <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* feat(openai): add gpt-5.4 support for API and Codex OAuth (#36590)

* feat(openai): add gpt-5.4 support and priority processing

* feat(openai-codex): add gpt-5.4 oauth support

* fix(openai): preserve provider overrides in gpt-5.4 fallback

* fix(openai-codex): keep xhigh for gpt-5.4 default

* fix(models): preserve configured overrides in list output

* fix(models): close gpt-5.4 integration gaps

* fix(openai): scope service tier to public api

* fix(openai): complete prep followups for gpt-5.4 support (#36590) (thanks @dorukardahan)

---------

Co-authored-by: Tyler Yust <[email protected]>

* fix(tui): preserve credential-like tokens in render sanitization

* CLI: make read-only SecretRef status flows degrade safely (#37023)

* CLI: add read-only SecretRef inspection

* CLI: fix read-only SecretRef status regressions

* CLI: preserve read-only SecretRef status fallbacks

* Docs: document read-only channel inspection hook

* CLI: preserve audit coverage for read-only SecretRefs

* CLI: fix read-only status account selection

* CLI: fix targeted gateway fallback analysis

* CLI: fix Slack HTTP read-only inspection

* CLI: align audit credential status checks

* CLI: restore Telegram read-only fallback semantics

* chore(changelog): update for #37023

Signed-off-by: joshavant <[email protected]>

* fix(agents): disable usage streaming chunks on non-native openai-completions

* feat(nano-banana-pro): add --aspect-ratio flag to generate_image.py (#28159)

* feat(nano-banana-pro): add --aspect-ratio flag to generate_image.py

* Nano Banana: allow all supported aspect ratios

* Docs: expand nano banana aspect ratio options

---------

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

* fix(gateway): support image_url in OpenAI chat completions (#34068)

* fix(gateway): parse image_url in openai chat completions

* test(gateway): cover openai chat completions image_url flows

* docs(changelog): note openai image_url chat completions fix (#17685)

* fix(gateway): harden openai image_url parsing and limits

* test(gateway): add openai image_url regression coverage

* docs(changelog): expand #17685 openai chat completions note

* Gateway: make OpenAI image_url URL fetch opt-in and configurable

* Diagnostics: redact image base64 payload data in trace logs

* Changelog: note OpenAI image_url hardening follow-ups

* Gateway: enforce OpenAI image_url total budget incrementally

* Gateway: scope OpenAI image_url extraction to the active turn

* Update CHANGELOG.md

* fix(agents): avoid xAI web_search tool-name collisions

* fix: clear Telegram DM draft after materialize (#36746) (thanks @joelnishanth)

* Fix Control UI duplicate iMessage replies for internal webchat turns (#36151)

* Auto-reply: avoid routing external replies from internal webchat turns

* Auto-reply tests: cover internal webchat non-routing with external origin metadata

* Changelog: add Control UI iMessage duplicate-reply fix note

* Auto-reply context: track explicit deliver routes

* Gateway chat: mark explicit external deliver routes in context

* Auto-reply: preserve explicit deliver routes for internal webchat turns

* Auto-reply tests: cover explicit deliver routes from internal webchat turns

* Gateway chat tests: assert explicit deliver route context tagging

* fix: enforce 600 perms for cron store and run logs (#36078)

* fix: enforce secure permissions for cron store and run logs

* fix(cron): enforce dir perms and gate posix tests on windows

* Cron store tests: cover existing directory permission hardening

* Cron run-log tests: cover existing directory permission hardening

* Changelog: note cron file permission hardening

---------

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

* fix(tui): accept canonical session-key aliases in chat event routing

* Gateway: normalize OpenAI stream chunk text

* Gateway: coerce chat deliverable route boolean

* fix(web_search): align brave language codes with API

* Respect source channel for agent event surfacing (#36030)

* fix(session): prefer webchat routes for direct ui turns (#37135)

* Gateway: discriminate input sources

* Cron: migrate legacy provider delivery hints

* Cron: stabilize runs-one-shot migration tests

* fix(memory): retry mcporter after Windows EINVAL spawn

* fix(onboarding): guard daemon status probe on headless linux

* Gateway: add path-scoped config schema lookup (#37266)

Merged via squash.

Prepared head SHA: 0c4d187f6fb66f2799d4047585d6368e433c883a
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* docs(changelog): add pr entry

* fix(ci): restore protocol and schema checks (#37470)

* Fix failover for zhipuai 1310 Weekly/Monthly Limit Exhausted (#33813)

Merged via squash.

Prepared head SHA: 3dc441e58de48913720cf7b6137fa761758d8344
Co-authored-by: zhouhe-xydt <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* fix(openai-codex-oauth): stop mutating authorize url scopes

* Update CHANGELOG.md

* fix(auth): remove bogus codex oauth responses probe

* docs(changelog): fold codex oauth fix notes

* docs(changelog): add codex oauth pr reference (#37558)

* fix(security:PLA-697): block local secret scratch files from commits

* feat: add dev EKS deployment for openclaw SRE container

* fix: stabilize slack socket mode in dev eks runtime

* fix(eks): reuse monitoring incident auth for openclaw-sre

* feat(deploy): add grafana env guards and prod deploy wrapper

* fix(security): redact tool outputs and enforce secret-safe runtime defaults

* feat(sre): harden heartbeat routing and enrich triage signals

* docs: add SRE hybrid intelligence design

Three-layer architecture to improve bot reasoning quality:
- Layer 1: Service knowledge (auto-discovery + overlays + incident memory)
- Layer 2: Multi-stage reasoning chain (triage → hypothesize → causal chain → action plan → cross-review)
- Layer 3: Incident learning loop (structured cards, overlay suggestions, feedback signals)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat(sandbox): add boundary cli to common runtime image

* docs(sre): finalize hybrid intelligence design v19 after 18 Codex review rounds

Iteratively hardened the design through 18 adversarial Codex review rounds,
resolving 60+ findings (15+ CRITICAL, 45+ HIGH). Key fixes include:
- Decoupled incident_id (pre-Step11 immutable) from card_id (LLM-derived)
- Unified evidence/memory sanitization via shared _strip_instruction_tokens
- Fixed rerun interval default (3600s > heartbeat 1800s) to prevent every-cycle re-runs
- Added Phase 2 cross-review gap note and dual-column depth table
- Overlay suggestion idempotency via deterministic suggestion_key + upsert
- Decoupled chain timeout from legacy budget check
- Added predicate alignment docs for L3 pre-check vs L3 gate
- Adopted dynamic evidence_completeness denominator matching existing code
- Added scope note clarifying design vs current implementation

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat(sre): complete hybrid intelligence rollout and bot hardening

* fix(sre): harden slack reasoning, dual chain, and deploy auth/runtime

* ci: add ecr release pipeline and infra-helm image update trigger

* ci: switch workflows to github-hosted runners

* ci: allow manual ecr env target and use updater v4

* ci: remove windows jobs from workflow

* chore(pla-678): update fallback auth fixture and plan docs

* fix(pla-678): preserve control-ui host-header fallback in dev config

* refactor(pla-678): remove local sre chart and require infra-helm

* refactor(pla-678): remove direct eks deploy scripts

* ci(pla-678): remove labeler workflow

* ci(pla-678): refresh checks after disabling labeler

* build: install boundary CLI in SRE runtime image

* fix(slack:PLA-678): keep one thread lane across users

* fix(sre-skill): enforce live db-query runbook in dev seed

* fix(slack): ignore bot thread history when seeding new sessions

* fix(slack): force retry on repeated thread questions

* fix(sre-skill): require retry on repeated db requests

* docs(sre-skill): make retry policy generic across repeated asks

* fix(sre:PLA-678): enforce live linear ticket updates

* fix(sre:PLA-678): use [PLATFORM] Backlog linear project

* fix(sre:PLA-678): label linked linear tickets as openclaw-sre

* fix(sre:PLA-678): auto-label linked linear tickets for auto-pr

* test(sre:PLA-678): make tracking label test executable

* fix(slack:PLA-678): remove status-final completion banner (#16)

* fix(slack:PLA-678): enable direct file attachments from agent replies (#17)

* fix(slack:PLA-678): remove status-final completion banner

* fix(slack): enable direct file attachments from agent replies

* refactor(sre:PLA-678): remove local deploy config mirror (#18)

* fix: compact oversized auto-generated pr bodies

* fix(sre): add built-in linear incident memory provider

* feat(sre): add erpc helper with flo secret query

* fix(sre): enforce canonical rpc.morpho.dev erpc endpoint

* refactor(sre): remove local deploy config mirror

* fix(slack:PLA-678): force DM replies into per-message threads (#19)

* fix: compact oversized auto-generated pr bodies

* fix(sre): add built-in linear incident memory provider

* feat(sre): add erpc helper with flo secret query

* fix(sre): enforce canonical rpc.morpho.dev erpc endpoint

* refactor(sre): remove local deploy config mirror

* fix(slack): force threaded replies for direct messages

* feat(cron:PLA-678): use conversation history in self-improve runs (#20)

* fix(slack:PLA-678): improve progress update readability (#21)

* fix(ci:PLA-678): restore main release pipeline health (#22)

* fix(ci:PLA-678): restore main release pipeline health

* fix(ci:PLA-678): harden auto-response token fallback

* fix(ci:PLA-678): pin setup-bun to published release

* test(ci:PLA-678): align slack thread session expectations

* fix(sre:PLA-678): harden Slack reply delivery and image release flow (#23)

* fix(slack:PLA-678): harden thread-scoped reply delivery

* fix(slack:PLA-678): satisfy lint after rebase

* ci(release:PLA-678): move image release to cached ecr flow

* ci(release:PLA-678): use official docker build actions

* fix(slack:PLA-722): preserve progress updates during final-answer gating (#24)

* fix(sre:PLA-724): restore ECR runtime image toolchain (#25)

* fix(failover): classify HTTP 402 as rate_limit when payload indicates usage limit (#30484) (#36802)

* fix(failover): classify HTTP 402 as rate_limit when payload indicates usage limit (#30484)

Some providers (notably Anthropic Claude Max plan) surface temporary
usage/rate-limit failures as HTTP 402 instead of 429. Before this change,
all 402s were unconditionally mapped to 'billing', which produced a
misleading 'run out of credits' warning for Max plan users who simply
hit their usage window.

This follows the same pattern introduced for HTTP 400 in #36783: check
the error message for an explicit rate-limit signal before falling back
to the default status-code classification.

- classifyFailoverReasonFromHttpStatus now returns 'rate_limit' for 402
  when isRateLimitErrorMessage matches the payload text
- Added regression tests covering both the rate-limit and billing paths
  on 402

* fix: narrow 402 rate-limit matcher to prevent billing misclassification

The original implementation used isRateLimitErrorMessage(), which matches
phrases like 'quota exceeded' that legitimately appear in billing errors.

This commit replaces it with a narrow, 402-specific matcher that requires
BOTH retry language (try again/retry/temporary/cooldown) AND limit
terminology (usage limit/rate limit/organization usage).

Prevents misclassification of errors like:
'HTTP 402: exceeded quota, please add credits' -> billing (not rate_limit)

Added regression test for the ambiguous case.

---------

Co-authored-by: Val Alexander <[email protected]>

* fix(mattermost): allow reachable interaction callback URLs (#37543)

Merged via squash.

Prepared head SHA: 4d593731be5a5dcbf3106d596b38acfeb8cf0aa8
Co-authored-by: mukhtharcm <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Reviewed-by: @mukhtharcm

---------

Signed-off-by: joshavant <[email protected]>
Co-authored-by: Gustavo Madeira Santana <[email protected]>
Co-authored-by: Mariano <[email protected]>
Co-authored-by: leepokai <[email protected]>
Co-authored-by: Bob <[email protected]>
Co-authored-by: Onur <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: huangcj <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: Sid <[email protected]>
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Co-authored-by: a <[email protected]>
Co-authored-by: echoVic <[email protected]>
Co-authored-by: Shakker <[email protected]>
Co-authored-by: liuxiaopai-ai <[email protected]>
Co-authored-by: Rodrigo Uroz <[email protected]>
Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: jalehman <[email protected]>
Co-authored-by: Kai <[email protected]>
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: 青雲 <[email protected]>
Co-authored-by: echoVic <[email protected]>
Co-authored-by: Darshil <[email protected]>
Co-authored-by: Ho Lim <[email protected]>
Co-authored-by: dvrshil <[email protected]>
Co-authored-by: Isis Anisoptera <[email protected]>
Co-authored-by: Madoka <[email protected]>
Co-authored-by: Xu Zimo <[email protected]>
Co-authored-by: Munem Hashmi <[email protected]>
Co-authored-by: bmendonca3 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Co-authored-by: Nhj <[email protected]>
Co-authored-by: 倪汉杰0668001185 <[email protected]>
Co-authored-by: zhengquanliu <[email protected]>
Co-authored-by: nick <[email protected]>
Co-authored-by: linhey <[email protected]>
Co-authored-by: scoootscooob <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: rexl2018 <[email protected]>
Co-authored-by: sline <[email protected]>
Co-authored-by: 0xsline <[email protected]>
Co-authored-by: Harold Hunt <[email protected]>
Co-authored-by: Shivam <[email protected]>
Co-authored-by: 不做了睡大觉 <[email protected]>
Co-authored-by: alexyyyander <[email protected]>
Co-authored-by: alexyyyander <[email protected]>
Co-authored-by: Octane0411 <[email protected]>
Co-authored-by: Linux2010 <[email protected]>
Co-authored-by: echoVic <[email protected]>
Co-authored-by: Joseph Turian <[email protected]>
Co-authored-by: turian <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Tony Dehnke <[email protected]>
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: kevinWangSheng <[email protected]>
Co-authored-by: ningding97 <[email protected]>
Co-authored-by: Naylenv <[email protected]>
Co-authored-by: clawbie <[email protected]>
Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Ayane <[email protected]>
Co-authored-by: Ayane <[email protected]>
Co-authored-by: StingNing <[email protected]>
Co-authored-by: maweibin <[email protected]>
Co-authored-by: maweibin <[email protected]>
Co-authored-by: Josh Avant <[email protected]>
Co-authored-by: Bin Deng <[email protected]>
Co-authored-by: Byungsker <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Co-authored-by: Altay <[email protected]>
Co-authored-by: jiangnan <[email protected]>
Co-authored-by: jnMetaCode <[email protected]>
Co-authored-by: Jacob Riff <[email protected]>
Co-authored-by: jriff <[email protected]>
Co-authored-by: Naylenv <[email protected]>
Co-authored-by: Bill <[email protected]>
Co-authored-by: 2233admin <[email protected]>
Co-authored-by: 2233admin <[email protected]>
Co-authored-by: littleben <[email protected]>
Co-authored-by: littleben <[email protected]>
Co-authored-by: OpenClaw Agent <[email protected]>
Co-authored-by: Vignesh Natarajan <[email protected]>
Co-authored-by: zerone0x <[email protected]>
Co-authored-by: zerone0x <[email protected]>
Co-authored-by: dunamismax <[email protected]>
Co-authored-by: Octane <[email protected]>
Co-authored-by: Mitsuyuki Osabe <[email protected]>
Co-authored-by: Tak <[email protected]>
Co-authored-by: Tyler Yust <[email protected]>
Co-authored-by: Hinata Kaga (samon) <[email protected]>
Co-authored-by: dorukardahan <[email protected]>
Co-authored-by: Tyler Yust <[email protected]>
Co-authored-by: Brenner Spear <[email protected]>
Co-authored-by: aerelune <[email protected]>
Co-authored-by: Frank Yang <[email protected]>
Co-authored-by: zhouhe-xydt <[email protected]>
Co-authored-by: zhouhe-xydt <[email protected]>
Co-authored-by: Vignesh <[email protected]>
Co-authored-by: OpenClaw SRE Bot <[email protected]>
Co-authored-by: Xinhua Gu <[email protected]>
Co-authored-by: Val Alexander <[email protected]>
0x666c6f added a commit to 0x666c6f/openclaw that referenced this pull request Mar 26, 2026
)

* Plugins/matrix: migrate to scoped plugin-sdk imports

* Plugins/mattermost: migrate to scoped plugin-sdk imports

* Plugins/memory-core: migrate to scoped plugin-sdk imports

* Plugins/memory-lancedb: migrate to scoped plugin-sdk imports

* Plugins/minimax-portal-auth: migrate to scoped plugin-sdk imports

* Plugins/msteams: migrate to scoped plugin-sdk imports

* Plugins/nextcloud-talk: migrate to scoped plugin-sdk imports

* Plugins/nostr: migrate to scoped plugin-sdk imports

* Plugins/open-prose: migrate to scoped plugin-sdk imports

* Plugins/phone-control: migrate to scoped plugin-sdk imports

* Plugins/qwen-portal-auth: migrate to scoped plugin-sdk imports

* Plugins/synology-chat: migrate to scoped plugin-sdk imports

* Plugins/talk-voice: migrate to scoped plugin-sdk imports

* Plugins/test-utils: migrate to scoped plugin-sdk imports

* Plugins/thread-ownership: migrate to scoped plugin-sdk imports

* Plugins/tlon: migrate to scoped plugin-sdk imports

* Plugins/twitch: migrate to scoped plugin-sdk imports

* Plugins/voice-call: migrate to scoped plugin-sdk imports

* Plugins/whatsapp: migrate to scoped plugin-sdk imports

* Plugins/zalo: migrate to scoped plugin-sdk imports

* Plugins/zalouser: migrate to scoped plugin-sdk imports

* Chore: remove accidental .DS_Store artifact

* chore(docs): add plugins refactor changelog entry

* feat(ios): add Live Activity connection status + stale cleanup (#33591)

* feat(ios): add live activity connection status and cleanup

Add lock-screen/Dynamic Island connection health states and prune duplicate/stale activities before reuse. This intentionally excludes AI/title generation and heavier UX rewrites from #27488.

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

* fix(ios): treat ended live activities as inactive

* chore(changelog): add PR reference and author thanks

---------

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

* fix: kill stuck ACP child processes on startup and harden sessions in discord threads (#33699)

* Gateway: resolve agent.wait for chat.send runs

* Discord: harden ACP thread binding + listener timeout

* ACPX: handle already-exited child wait

* Gateway/Discord: address PR review findings

* Discord: keep ACP error-state thread bindings on startup

* gateway: make agent.wait dedupe bridge event-driven

* discord: harden ACP probe classification and cap startup fan-out

* discord: add cooperative timeout cancellation

* discord: fix startup probe concurrency helper typing

* plugin-sdk: avoid Windows root-alias shard timeout

* plugin-sdk: keep root alias reflection path non-blocking

* discord+gateway: resolve remaining PR review findings

* gateway+discord: fix codex review regressions

* Discord/Gateway: address Codex review findings

* Gateway: keep agent.wait lifecycle active with shared run IDs

* Discord: clean up status reactions on aborted runs

* fix: add changelog note for ACP/Discord startup hardening (#33699) (thanks @dutifulbob)

---------

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

* fix: relay ACP sessions_spawn parent streaming (#34310) (thanks @vincentkoc) (#34310)

Co-authored-by: Onur Solmaz <[email protected]>

* fix(telegram): materialize dm draft final to avoid duplicates

* docs(changelog): credit @Brotherinlaw-13 for #34318

* fix: prevent nodes media base64 context bloat (#34332)

* fix: preserve raw media invoke for HTTP tool clients (#34365)

* fix(slack): route system events to bound agent sessions (#34045)

* fix(slack): route system events via binding-aware session keys

* fix(slack): pass sender to system event session resolver

* fix(slack): include sender context for interaction session routing

* fix(slack): include modal submitter in session routing

* test(slack): cover binding-aware system event routing

* test(slack): update interaction session key assertions

* test(slack): assert reaction session routing carries sender

* docs(changelog): note slack system event routing fix

* Update CHANGELOG.md

* Delete changelog/fragments directory

* fix(memory): serialize local embedding initialization to avoid duplicate model loads (#15639)

Merged via squash.

Prepared head SHA: a085fc21a8ba7163fffdb5de640dd4dc1ff5a88e
Co-authored-by: SubtleSpark <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(model): propagate custom provider headers to model objects (#27490)

Merged via squash.

Prepared head SHA: e4183b398fc7eb4c18b2b691cb0dd882ec993608
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(daemon): handle systemctl is-enabled exit 4 (not-found) on Ubuntu (#33634)

Merged via squash.

Prepared head SHA: 67dffc3ee239cd7b813cb200c3dd5475d9e203a6
Co-authored-by: Yuandiaodiaodiao <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(node-host): sync rawCommand with hardened argv after executable path pinning (#33137)

Merged via squash.

Prepared head SHA: a7987905f7ad6cf5fee286ffa81ceaad8297174f
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* Agents: add generic poll-vote action support

* fix(ollama): pass provider headers to Ollama stream function (#24285)

createOllamaStreamFn() only accepted baseUrl, ignoring custom headers
configured in models.providers.<provider>.headers. This caused 403
errors when Ollama endpoints are behind reverse proxies that require
auth headers (e.g. X-OLLAMA-KEY via HAProxy).

Add optional defaultHeaders parameter to createOllamaStreamFn() and
merge them into every fetch request. Provider headers from config are
now passed through at the call site in the embedded runner.

Fixes #24285

* test(ollama): add default header precedence coverage

* chore(changelog): add PR entry openclaw#24337 thanks @echoVic

* Outbound: allow text-only plugin adapters

* Outbound: avoid empty multi-media fallback sends

* chore(changelog): align outbound adapter entry openclaw#32788 thanks @liuxiaopai-ai

* fix(outbound): fail media-only text-only adapter fallback

* chore(changelog): clarify outbound media-only fallback openclaw#32788 thanks @liuxiaopai-ai

* fix(review): enforce behavioral sweep validation

* Fix gateway restart false timeouts on Debian/systemd (#34874)

* daemon(systemd): target sudo caller user scope

* test(systemd): cover sudo user scope commands

* infra(ports): fall back to ss when lsof missing

* test(ports): verify ss fallback listener detection

* cli(gateway): use probe fallback for restart health

* test(gateway): cover restart-health probe fallback

* Compaction/Safeguard: require structured summary headings (#25555)

Merged via squash.

Prepared head SHA: 0b1df34806a7b788261290be55760fd89220de53
Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* Fix Linux daemon install checks when systemd user bus env is missing (#34884)

* daemon(systemd): fall back to machine user scope when user bus is missing

* test(systemd): cover machine scope fallback for user-bus errors

* test(systemd): reset execFile mock state across cases

* test(systemd): make machine-user fallback assertion portable

* fix(daemon): keep root sudo path on direct user scope

* test(systemd): cover sudo root user-scope behavior

* ci: use resolvable bun version in setup-node-env

* agents: preserve totalTokens on request failure instead of using contextWindow (#34275)

Merged via squash.

Prepared head SHA: f9d111d0a79a07815d476356e98a28df3a0000ba
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix: align AGENTS.md template section names with post-compaction extraction (#25029) (#25098)

Merged via squash.

Prepared head SHA: 8cd6cc8049aab5a94d8a9d5fb08f2e792c4ac5fd
Co-authored-by: echoVic <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* Changelog: add daemon systemd user-bus fallback entry (#34884)

* Changelog: add gateway restart health entry (#34874)

* fix: finalize spanish locale support

* fix: add spanish locale support (#35038) (thanks @DaoPromociones)

* fix(deps): patch hono transitive audit vulnerabilities

* fix(security): avoid prototype-chain account path checks (#34982)

Merged via squash.

Prepared head SHA: f89cc6a649959997fe1dec1e1c1bff9a61b2de98
Co-authored-by: HOYALIM <[email protected]>
Co-authored-by: dvrshil <[email protected]>
Reviewed-by: @dvrshil

* fix(deps): bump tar to 7.5.10

* docs(changelog): document dependency security fixes

* fix: restore auto-reply system events timeline (#34794) (thanks @anisoptera) (#34794)

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

* fix(feishu): comprehensive reply mechanism — outbound replyToId forwarding + topic-aware reply targeting (#33789)

* fix(feishu): comprehensive reply mechanism fix — outbound replyToId forwarding + topic-aware reply targeting

- Forward replyToId from ChannelOutboundContext through sendText/sendMedia
  to sendMessageFeishu/sendMarkdownCardFeishu/sendMediaFeishu, enabling
  reply-to-message via the message tool.

- Fix group reply targeting: use ctx.messageId (triggering message) in
  normal groups to prevent silent topic thread creation (#32980). Preserve
  ctx.rootId targeting for topic-mode groups (group_topic/group_topic_sender)
  and groups with explicit replyInThread config.

- Add regression tests for both fixes.

Fixes #32980
Fixes #32958
Related #19784

* fix: normalize Feishu delivery.to before comparing with messaging tool targets

- Add normalizeDeliveryTarget helper to strip user:/chat: prefixes for Feishu
- Apply normalization in matchesMessagingToolDeliveryTarget before comparison
- This ensures cron duplicate suppression works when session uses prefixed targets
  (user:ou_xxx) but messaging tool extract uses normalized bare IDs (ou_xxx)

Fixes review comment on PR #32755

(cherry picked from commit fc20106f16ccc88a5f02e58922bb7b7999fe9dcd)

* fix(feishu): catch thrown SDK errors for withdrawn reply targets

The Feishu Lark SDK can throw exceptions (SDK errors with .code or
AxiosErrors with .response.data.code) for withdrawn/deleted reply
targets, in addition to returning error codes in the response object.

Wrap reply calls in sendMessageFeishu and sendCardFeishu with
try-catch to handle thrown withdrawn/not-found errors (230011,
231003) and fall back to client.im.message.create, matching the
existing response-level fallback behavior.

Also extract sendFallbackDirect helper to deduplicate the
direct-send fallback block across both functions.

Closes #33496

(cherry picked from commit ad0901aec103a2c52f186686cfaf5f8ba54b4a48)

* feishu: forward outbound reply target context

(cherry picked from commit c129a691fcf552a1cebe1e8a22ea8611ffc3b377)

* feishu extension: tighten reply target fallback semantics

(cherry picked from commit f85ec610f267020b66713c09e648ec004b2e26f1)

* fix(feishu): align synthesized fallback typing and changelog attribution

* test(feishu): cover group_topic_sender reply targeting

---------

Co-authored-by: Xu Zimo <[email protected]>
Co-authored-by: Munem Hashmi <[email protected]>
Co-authored-by: bmendonca3 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(feishu): use msg_type media for mp4 video (fixes #33674) (#33720)

* fix(feishu): use msg_type media for mp4 video (fixes #33674)

* Feishu: harden streaming merge semantics and final reply dedupe

Use explicit streaming update semantics in the Feishu reply dispatcher:
treat onPartialReply payloads as snapshot updates and block fallback payloads
as delta chunks, then merge final text with the shared overlap-aware
mergeStreamingText helper before closing the stream.

Prevent duplicate final text delivery within the same dispatch cycle, and add
regression tests covering overlap snapshot merge, duplicate final suppression,
and block-as-delta behavior to guard against repeated/truncated output.

* fix(feishu): prefer message.reply for streaming cards in topic threads

* fix: reduce Feishu streaming card print_step to avoid duplicate rendering

Fixes openclaw/openclaw#33751

* Feishu: preserve media sends on duplicate finals and add media synthesis changelog

* Feishu: only dedupe exact duplicate final replies

* Feishu: use scoped plugin-sdk import in streaming-card tests

---------

Co-authored-by: 倪汉杰0668001185 <[email protected]>
Co-authored-by: zhengquanliu <[email protected]>
Co-authored-by: nick <[email protected]>
Co-authored-by: linhey <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(agents): bypass pendingDescendantRuns guard for cron announce delivery (#35185)

* fix(agents): bypass pendingDescendantRuns guard for cron announce delivery

Standalone cron job completions were blocked from direct channel delivery
when the cron run had spawned subagents that were still registered as
pending. The pendingDescendantRuns guard exists for live orchestration
coordination and should not apply to fire-and-forget cron announce sends.

Thread the announceType through the delivery chain and skip both the
child-descendant and requester-descendant pending-run guards when the
announce originates from a cron job.

Closes #34966

* fix: ensure outbound session entry for cron announce with named agents (#32432)

Named agents may not have a session entry for their delivery target,
causing the announce flow to silently fail (delivered=false, no error).

Two fixes:
1. Call ensureOutboundSessionEntry when resolving the cron announce
   session key so downstream delivery can find channel metadata.
2. Fall back to direct outbound delivery when announce delivery fails
   to ensure cron output reaches the target channel.

Closes #32432

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: guard announce direct-delivery fallback against suppression leaks (#32432)

The `!delivered` fallback condition was too broad — it caught intentional
suppressions (active subagents, interim messages, SILENT_REPLY_TOKEN) in
addition to actual announce delivery failures.  Add an
`announceDeliveryWasAttempted` flag so the direct-delivery fallback only
fires when `runSubagentAnnounceFlow` was actually called and failed.

Also remove the redundant `if (route)` guard in
`resolveCronAnnounceSessionKey` since `resolved` being truthy guarantees
`route` is non-null.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix(cron): harden announce synthesis follow-ups

---------

Co-authored-by: scoootscooob <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* Feishu: harden streaming merge semantics and final reply dedupe (#33245)

* Feishu: close duplicate final gap and cover routing precedence

* Feishu: resolve reviewer duplicate-final and routing feedback

* Feishu: tighten streaming send-mode option typing

* Feishu: fix reverse-overlap streaming merge ordering

* Feishu: align streaming final dedupe test expectation

* Feishu: allow distinct streaming finals while deduping repeats

---------

Co-authored-by: Tak Hoffman <[email protected]>

* fix: cron backup should preserve pre-edit snapshot (#35195) (#35234)

* fix(cron): avoid overwriting .bak during normalization

Fixes openclaw/openclaw#35195

* test(cron): preserve pre-edit bak snapshot in normalization path

---------

Co-authored-by: 0xsline <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(cron): stabilize restart catch-up replay semantics (#35351)

* Cron: stabilize restart catch-up replay semantics

* Cron: respect backoff in startup missed-run replay

* cron: narrow startup replay backoff guard (#35391)

* cron: unify stale-run recovery and preserve manual-run every anchors (#35363)

* cron: unify stale-run recovery and preserve manual every anchors

* cron: address unresolved review threads on recovery paths

* cron: remove duplicate timestamp helper after rebase

* refactor(telegram): remove unused webhook callback helper (#27816)

* fix(pr): make review claim step required

* fix(skills): deduplicate slash commands by skillName across all interfaces

Move skill-command deduplication by skillName from the Discord-only
`dedupeSkillCommandsForDiscord` into `listSkillCommandsForAgents` so
every interface (TUI, Slack, text) consistently sees a clean command
list without platform-specific workarounds.

When multiple agents share a skill with the same name the old code
emitted `github` + `github_2` and relied on Discord to collapse them.
Now `listSkillCommandsForAgents` returns only the first registration
per skillName, and the Discord-specific wrapper is removed.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* style: fix formatting in skill-commands.test.ts and provider.ts

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* style(skills): align formatting cleanup for dedupe changes

* chore(changelog): add dedupe note openclaw#27521 thanks @shivama205

* fix(agents): detect Venice provider proxying xAI/Grok models for schema cleaning (#35355)

Merged via squash.

Prepared head SHA: 8bfdec257bb6a6025cb69a0a213a433da32b15db
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(agents): decode HTML entities in xAI/Grok tool call arguments (#35276)

Merged via squash.

Prepared head SHA: c4445d2938898ded9c046614f9315dbda65ec573
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(agents): guard promoteThinkingTagsToBlocks against malformed content entries (#35143)

Merged via squash.

Prepared head SHA: 3971122f5fd27c66c8c9c5ce783f00e113b1f47b
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(web-ui): render Accounts schema node properly (#35380)

Co-authored-by: stakeswky <[email protected]>
Co-authored-by: liuxiaopai-ai <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(agents): guard context pruning against malformed thinking blocks (#35146)

Merged via squash.

Prepared head SHA: a196a565b1b8e806ffbf85172bcf1128796b45a2
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(gateway): prevent internal route leakage in chat.send

Synthesis of routing fixes from #35321, #34635, and #35356 for internal-client reply safety.

- Require explicit `deliver: true` before inheriting any external delivery route.
- Keep webchat/TUI/UI-origin traffic on internal routing by default.
- Allow configured-main session inheritance only for non-Webchat/UI clients, and honor `session.mainKey`.
- Add regression tests for UI no-inherit, configured-main CLI inherit, and deliver-flag behavior.

Co-authored-by: alexyyyander <[email protected]>
Co-authored-by: Octane0411 <[email protected]>
Co-authored-by: Linux2010 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(gateway): pass actual version to Control UI client instead of dev (#35230)

* fix(gateway): pass actual version to Control UI client instead of "dev"

The GatewayClient, CLI WS client, and browser Control UI all sent
"dev" as their clientVersion during handshake, making it impossible
to distinguish builds in gateway logs and health snapshots.

- GatewayClient and CLI WS client now use the resolved VERSION constant
- Control UI reads serverVersion from the bootstrap endpoint and
  forwards it when connecting
- Bootstrap contract extended with serverVersion field

Closes #35209

* Gateway: fix control-ui version version-reporting consistency

* Control UI: guard deferred bootstrap connect after disconnect

* fix(ui): accept same-origin http and relative gateway URLs for client version

---------

Co-authored-by: Tak Hoffman <[email protected]>

* chore(pr): enforce changelog placement and reduce merge sync churn

* TTS: add baseUrl support to OpenAI TTS config (#34321)

Merged via squash.

Prepared head SHA: e9a10cf81d2021cf81091dfa81e13ffdbb6a540a
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* ACP: add persistent Discord channel and Telegram topic bindings (#34873)

* docs: add ACP persistent binding experiment plan

* docs: align ACP persistent binding spec to channel-local config

* docs: scope Telegram ACP bindings to forum topics only

* docs: lock bound /new and /reset behavior to in-place ACP reset

* ACP: add persistent discord/telegram conversation bindings

* ACP: fix persistent binding reuse and discord thread parent context

* docs: document channel-specific persistent ACP bindings

* ACP: split persistent bindings and share conversation id helpers

* ACP: defer configured binding init until preflight passes

* ACP: fix discord thread parent fallback and explicit disable inheritance

* ACP: keep bound /new and /reset in-place

* ACP: honor configured bindings in native command flows

* ACP: avoid configured fallback after runtime bind failure

* docs: refine ACP bindings experiment config examples

* acp: cut over to typed top-level persistent bindings

* ACP bindings: harden reset recovery and native command auth

* Docs: add ACP bound command auth proposal

* Tests: normalize i18n registry zh-CN assertion encoding

* ACP bindings: address review findings for reset and fallback routing

* ACP reset: gate hooks on success and preserve /new arguments

* ACP bindings: fix auth and binding-priority review findings

* Telegram ACP: gate ensure on auth and accepted messages

* ACP bindings: fix session-key precedence and unavailable handling

* ACP reset/native commands: honor fallback targets and abort on bootstrap failure

* Config schema: validate ACP binding channel and Telegram topic IDs

* Discord ACP: apply configured DM bindings to native commands

* ACP reset tails: dispatch through ACP after command handling

* ACP tails/native reset auth: fix target dispatch and restore full auth

* ACP reset detection: fallback to active ACP keys for DM contexts

* Tests: type runTurn mock input in ACP dispatch test

* ACP: dedup binding route bootstrap and reset target resolution

* reply: align ACP reset hooks with bound session key

* docs: replace personal discord ids with placeholders

* fix: add changelog entry for ACP persistent bindings (#34873) (thanks @dutifulbob)

---------

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

* docs(telegram): recommend allowlist for single-user DM policy (#34841)

* docs(telegram): recommend allowlist for single-user bots

* docs(telegram): condense single-user allowlist note

---------

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

* fix(feishu): check response.ok before calling response.json() in streaming card (#35628)

Merged via squash.

Prepared head SHA: 62c3fec80d97cea9be344c0bef5358a0a5dc5560
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* Mattermost: honor onmessage mention override and add gating diagnostics tests (#27160)

Merged via squash.

Prepared head SHA: 6cefb1d5bf3d6dfcec36c1cee3f9ea887f10c890
Co-authored-by: turian <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Reviewed-by: @mukhtharcm

* fix(subagents): strip leaked [[reply_to]] tags from completion announces (#34503)

* fix(subagents): strip reply tags from completion delivery text

* test(subagents): cover reply-tag stripping in cron completion sends

* changelog: note iMessage reply-tag stripping in completion announces

* Update CHANGELOG.md

* Apply suggestion from @greptile-apps[bot]

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix(cron): restore direct fallback after announce failure in best-effort mode (openclaw#36177)

Verified:
- pnpm build
- pnpm check (fails on pre-existing origin/main lint debt in extensions/mattermost imports)
- pnpm test:macmini

Co-authored-by: Tak Hoffman <[email protected]>

* test(cron): add cross-channel announce fallback regression coverage (openclaw#36197)

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check (fails on pre-existing origin/main lint debt in extensions/mattermost imports)
- pnpm test:macmini

Co-authored-by: Tak Hoffman <[email protected]>

* feat(mattermost): add interactive buttons support (#19957)

Merged via squash.

Prepared head SHA: 8a25e608729d0b9fd07bb0ee4219d199d9796dbe
Co-authored-by: tonydehnke <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Reviewed-by: @mukhtharcm

* fix(browser): remove deprecated --disable-blink-features=AutomationControlled flag

- Removes OpenClaw's default `--disable-blink-features=AutomationControlled` Chrome launch switch to avoid unsupported-flag warnings in newer Chrome (#35721).
- Preserves compatibility for older Chrome via `browser.extraArgs` override behavior (source analysis: #35770, #35728, #35727, #35885).
- Synthesis attribution: thanks @Sid-Qin, @kevinWangSheng, @ningding97, @Naylenv, @clawbie.

Source PR refs: #35734, #35770, #35728, #35727, #35885

Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: kevinWangSheng <[email protected]>
Co-authored-by: ningding97 <[email protected]>
Co-authored-by: Naylenv <[email protected]>
Co-authored-by: clawbie <[email protected]>
Co-authored-by: Takhoffman <[email protected]>

* fix(feishu): add HTTP timeout to prevent per-chat queue deadlocks (#36430)

When the Feishu API hangs or responds slowly, the sendChain never settles,
causing the per-chat queue to remain in a processing state forever and
blocking all subsequent messages in that thread. This adds a 30-second
default timeout to all Feishu HTTP requests by providing a timeout-aware
httpInstance to the Lark SDK client.

Closes #36412

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

* fix(feishu): use probed botName for mention checks (#36391)

* Feishu: honor bot mentions by ID despite aliases (Fixes #36317) (#36333)

* Mattermost: switch plugin-sdk imports to scoped subpaths (openclaw#36480)

Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(feishu): accept groupPolicy "allowall" as alias for "open" (#36358)

* fix(feishu): accept groupPolicy "allowall" as alias for "open"

When users configure groupPolicy: "allowall" in Feishu channel config,
the Zod schema rejects the value and the runtime policy check falls
through to the allowlist path.  With an empty allowFrom array, all group
messages are silently dropped despite the intended "allow all" semantics.

Accept "allowall" at the schema level (transform to "open") and add a
runtime guard in isFeishuGroupAllowed so the value is handled even if it
bypasses schema validation.

Closes #36312

Made-with: Cursor

* Feishu: tighten allowall alias handling and coverage

---------

Co-authored-by: Tak Hoffman <[email protected]>

* synthesis: fix Feishu group mention slash parsing

## Summary\n\nFeishu group slash command parsing is fixed for mentions and command probes across authorization paths.\n\nThis includes:\n- Normalizing bot mention text in group context for reliable slash detection in message parsing.\n- Adding command-probe normalization for group slash invocations.\n\nCo-authored-by: Sid Qin <[email protected]>\nCo-authored-by: Tak Hoffman <[email protected]>

* Feishu: normalize group slash command probing

- Feishu/group slash command detection: normalize group mention wrappers before command-authorization probing so mention-prefixed commands are recognized in group routing.\n- Source PR: #36011\n- Contributor: @liuxiaopai-ai\n\nCo-authored-by: Tak Hoffman <[email protected]>\nCo-authored-by: liuxiaopai-ai <[email protected]>

* add prependSystemContext and appendSystemContext to before_prompt_build (fixes #35131) (#35177)

Merged via squash.

Prepared head SHA: d9a2869ad69db9449336a2e2846bd9de0e647ac6
Co-authored-by: maweibin <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(feishu): avoid media regressions from global HTTP timeout (#36500)

* fix(feishu): avoid media regressions from global http timeout

* fix(feishu): source HTTP timeout from config

* fix(feishu): apply media timeout override to image uploads

* fix(feishu): invalidate cached client when timeout changes

* fix(feishu): clamp timeout values and cover image download

* Gateway: add SecretRef support for gateway.auth.token with auth-mode guardrails (#35094)

* fix(embedded): classify model_context_window_exceeded as context overflow, trigger compaction (#35934)

Merged via squash.

Prepared head SHA: 20fa77289c80b2807a6779a3df70440242bc18ca
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(agents): skip compaction API call when session has no real messages (#36451)

Merged via squash.

Prepared head SHA: 52dd6317895c7bd10855d2bd7dbbfc2f5279b68e
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(ui): catch marked.js parse errors to prevent Control UI crash (#36445)

- Prevent Control UI session render crashes when `marked.parse()` encounters pathological recursive markdown by safely falling back to escaped `<pre>` output.
- Tighten markdown fallback regression coverage and keep changelog attribution in sync for this crash-hardening path.

Co-authored-by: Bin Deng <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(session): archive old transcript on daily/scheduled reset to prevent orphaned files (#35493)

Merged via squash.

Prepared head SHA: 0d95549d752adecfc0b08d5cd55a8b8c75e264fe
Co-authored-by: byungsker <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(agents): set preserveSignatures to isAnthropic in resolveTranscriptPolicy (#32813)

Merged via squash.

Prepared head SHA: f522d21ca59a42abac554435a0aa646f6a34698d
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix: avoid false global rate-limit classification from generic cooldown text (#32972)

Merged via squash.

Prepared head SHA: 813c16f5afce415da130a917d9ce9f968912b477
Co-authored-by: stakeswky <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* refactor(agents): share failover HTTP status classification (#36615)

* fix(agents): classify transient failover statuses consistently

* fix(agents): preserve legacy failover status mapping

* fix(failover): narrow service-unavailable to require overload indicator (#32828) (#36646)

Merged via squash.

Prepared head SHA: 46fb4306127972d7635f371fd9029fbb9baff236
Co-authored-by: jnMetaCode <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* Compaction/Safeguard: add summary quality audit retries (#25556)

Merged via squash.

Prepared head SHA: be473efd1635616ebbae6e649d542ed50b4a827f
Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* test(agents): add provider-backed failover regressions (#36735)

* test(agents): add provider-backed failover fixtures

* test(agents): cover more provider error docs

* test(agents): tighten provider doc fixtures

* Docs: add Slack typing reaction fallback

* Docs: update gateway config reference for Slack and TTS

* Docs: clarify OpenAI-compatible TTS endpoints

* Docs: document Control UI locale support

* Docs: cover heartbeat, cron, and plugin route updates

* fix(ui): bump dompurify to 3.3.2 (#36781)

* UI: bump dompurify to 3.3.2

* Deps: refresh dompurify lockfile

* UI: hoist lifecycle connect test mocks (#36788)

* fix(agents): classify insufficient_quota 400s as billing (#36783)

* feat: append UTC time alongside local time in shared Current time lines (#32423)

Merged via squash.

Prepared head SHA: 9e8ec13933b5317e7cff3f0bc048de515826c31a
Co-authored-by: jriff <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* fix(auth): grant senderIsOwner for internal channels with operator.admin scope (openclaw#35704)

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Naylenv <[email protected]>
Co-authored-by: Octane0411 <[email protected]>
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(config): prevent RangeError in merged schema cache key generation

Fix merged schema cache key generation for high-cardinality plugin/channel metadata by hashing incrementally instead of serializing one large aggregate string.

Includes changelog entry for the user-visible regression fix.

Co-authored-by: Tak Hoffman <[email protected]>
Co-authored-by: Bill <[email protected]>

* fix(slack): propagate mediaLocalRoots through Slack send path

Restore Slack local file upload parity with CVE-era local media allowlist enforcement by threading `mediaLocalRoots` through the Slack send call chain.

- pass `ctx.mediaLocalRoots` from Slack channel action adapter into `handleSlackAction`
- add and forward `mediaLocalRoots` in Slack action context/send path
- pass `mediaLocalRoots` into `sendMessageSlack` for upload allowlist enforcement
- add changelog entry with attribution for this behavior fix

Co-authored-by: 2233admin <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(slack): preserve dedupe while recovering dropped app_mention (#34937)

This PR fixes Slack mention loss without reintroducing duplicate dispatches.

- Preserve seen-message dedupe at ingress to prevent duplicate processing.
- Allow a one-time app_mention retry only when the paired message event was previously dropped before dispatch.
- Add targeted race tests for both recovery and duplicate-prevention paths.

Co-authored-by: littleben <[email protected]>
Co-authored-by: OpenClaw Agent <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* README: add algal to contributors list (#2046)

* fix: decouple Discord inbound worker timeout from listener timeout (#36602) (thanks @dutifulbob) (#36602)

Co-authored-by: Onur Solmaz <[email protected]>

* plugins: enforce prompt hook policy with runtime validation (#36567)

Merged via squash.

Prepared head SHA: 6b9d883b6ae33628235fb02ce39c0d0f46a065bb
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(memory): avoid destructive qmd collection rebinds

* Harden Telegram poll gating and schema consistency (#36547)

Merged via squash.

Prepared head SHA: f77824419e3d166f727474a9953a063a2b4547f2
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(browser): close tracked tabs on session cleanup (#36666)

* Diffs: restore system prompt guidance (#36904)

Merged via squash.

Prepared head SHA: 1b3be3c87957c068473d5c86b9efba4a1a8503f2
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(routing): avoid full binding rescans in resolveAgentRoute (#36915)

* fix(gateway): honor insecure ws override for remote hostnames

* fix(llm-task): load runEmbeddedPiAgent from dist/extensionAPI in installs

* fix(auth): harden openai-codex oauth login path

* feat(telegram/acp): Topic Binding, Pin Binding Message, Fix Spawn Param Parsing (#36683)

* fix(acp): normalize unicode flags and Telegram topic binding

* feat(telegram/acp): restore topic-bound ACP and session bindings

* fix(acpx): clarify permission-denied guidance

* feat(telegram/acp): pin spawn bind notice in topics

* docs(telegram): document ACP topic thread binding behavior

* refactor(reply): share Telegram conversation-id resolver

* fix(telegram/acp): preserve bound session routing semantics

* fix(telegram): respect binding persistence and expiry reporting

* refactor(telegram): simplify binding lifecycle persistence

* fix(telegram): bind acp spawns in direct messages

* fix: document telegram ACP topic binding changelog (#36683) (thanks @huntharo)

---------

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

* fix(gateway): preserve streamed prefixes across tool boundaries

* fix(tui): prevent stale model indicator after /model

* Memory: handle SecretRef keys in doctor embeddings (#36835)

Merged via squash.

Prepared head SHA: c1a3d0caae60115d886e8bfc9983c9533c773f04
Co-authored-by: joshavant <[email protected]>
Co-authored-by: joshavant <[email protected]>
Reviewed-by: @joshavant

* fix(openai-codex): request required oauth api scopes (#24720)

* fix(memory-flush): ban timestamped variant files in default flush prompt (#34951)

Merged via squash.

Prepared head SHA: efadda4988b460e6da07be72994d4951d64239d0
Co-authored-by: zerone0x <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(tui): render final event error when assistant output is empty (#14687)

* feat(agents): flush reply pipeline before compaction wait (#35489)

Merged via squash.

Prepared head SHA: 7dbbcc510b74b0e8d35eb750d24575e34b5d769a
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(secrets): harden api key normalization for ByteString headers

* fix(slack): remove double mrkdwn conversion in native streaming path

Remove redundant text normalization from Slack native streaming markdown_text flow so Markdown formatting is preserved.

Synthesis context: overlaps reviewed from #34931, #34759, #34716, #34682, #34814.

Co-authored-by: littleben <[email protected]>
Co-authored-by: dunamismax <[email protected]>
Co-authored-by: Octane <[email protected]>
Co-authored-by: Mitsuyuki Osabe <[email protected]>
Co-authored-by: Kai <[email protected]>
Co-authored-by: OpenClaw Agent <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(kimi-coding): normalize anthropic tool payload format

* fix(slack): thread channel ID through inbound context for reactions (#34831)

Slack reaction/thread context routing fixes via canonical synthesis of #34831.

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

* fix(heartbeat): pin HEARTBEAT.md reads to workspace path

* fix(subagents): recover announce cleanup after kill/complete race

* feat(hooks): emit compaction lifecycle hooks (#16788)

* fix(auth): harden openai-codex oauth refresh fallback

* fix(subagents): announce delivery with descendant gating, frozen result refresh, and cron retry (#35080)

Thanks @tyler6204

* fix(agents): avoid synthetic tool-result writes on idle-timeout cleanup

* fix(agent): harden undici stream timeouts for long openai-completions runs

* fix(slack): record app_mention retry key before dedupe check (#37033)

- Prime app_mention retry allowance before dedupe so near-simultaneous message/app_mention races do not drop valid mentions.
- Prevent duplicate dispatch when app_mention wins the race and message prepare later succeeds.
- Prune dispatched mention keys and add regression coverage for both dropped and successful in-flight message outcomes.

Co-authored-by: Tak Hoffman <[email protected]>

* fix(agents): honor explicit rate-limit cooldown probes in fallback runs

* fix(agents): allow configured ollama endpoints without dummy api keys

* fix(memory): recover qmd updates from duplicate document constraints

* Doctor: warn on implicit heartbeat directPolicy (#36789)

* Changelog: note heartbeat directPolicy doctor warning

* Tests: cover heartbeat directPolicy doctor warning

* Doctor: warn on implicit heartbeat directPolicy

* Tests: cover per-agent heartbeat directPolicy warning

* Update CHANGELOG.md

* Plugins: clarify registerHttpHandler migration errors (#36794)

* Changelog: note plugin HTTP route migration diagnostics

* Tests: cover registerHttpHandler migration diagnostics

* Plugins: clarify registerHttpHandler migration errors

* Tests: cover registerHttpHandler diagnostic edge cases

* Plugins: tighten registerHttpHandler migration hint

* fix(memory): repair qmd collection name conflicts during ensure

* fix(memory): handle qmd search results without docid

* Plugins: avoid false integrity drift prompts on unpinned updates (#37179)

* Plugins: skip drift prompts for unpinned updates

* Plugins: cover unpinned integrity update behavior

* Changelog: add #37179 release note

* Delete changelog/fragments directory

* Update CHANGELOG.md

* fix(whatsapp): remove implicit [openclaw] self-chat prefix

* fix: remove config.schema from agent gateway tool (#7382)

Merged via squash.

Prepared head SHA: f34a7780690a941936b31899e2d096b8a07f4afc
Co-authored-by: kakuteki <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* feat(openai): add gpt-5.4 support for API and Codex OAuth (#36590)

* feat(openai): add gpt-5.4 support and priority processing

* feat(openai-codex): add gpt-5.4 oauth support

* fix(openai): preserve provider overrides in gpt-5.4 fallback

* fix(openai-codex): keep xhigh for gpt-5.4 default

* fix(models): preserve configured overrides in list output

* fix(models): close gpt-5.4 integration gaps

* fix(openai): scope service tier to public api

* fix(openai): complete prep followups for gpt-5.4 support (#36590) (thanks @dorukardahan)

---------

Co-authored-by: Tyler Yust <[email protected]>

* fix(tui): preserve credential-like tokens in render sanitization

* CLI: make read-only SecretRef status flows degrade safely (#37023)

* CLI: add read-only SecretRef inspection

* CLI: fix read-only SecretRef status regressions

* CLI: preserve read-only SecretRef status fallbacks

* Docs: document read-only channel inspection hook

* CLI: preserve audit coverage for read-only SecretRefs

* CLI: fix read-only status account selection

* CLI: fix targeted gateway fallback analysis

* CLI: fix Slack HTTP read-only inspection

* CLI: align audit credential status checks

* CLI: restore Telegram read-only fallback semantics

* chore(changelog): update for #37023

Signed-off-by: joshavant <[email protected]>

* fix(agents): disable usage streaming chunks on non-native openai-completions

* feat(nano-banana-pro): add --aspect-ratio flag to generate_image.py (#28159)

* feat(nano-banana-pro): add --aspect-ratio flag to generate_image.py

* Nano Banana: allow all supported aspect ratios

* Docs: expand nano banana aspect ratio options

---------

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

* fix(gateway): support image_url in OpenAI chat completions (#34068)

* fix(gateway): parse image_url in openai chat completions

* test(gateway): cover openai chat completions image_url flows

* docs(changelog): note openai image_url chat completions fix (#17685)

* fix(gateway): harden openai image_url parsing and limits

* test(gateway): add openai image_url regression coverage

* docs(changelog): expand #17685 openai chat completions note

* Gateway: make OpenAI image_url URL fetch opt-in and configurable

* Diagnostics: redact image base64 payload data in trace logs

* Changelog: note OpenAI image_url hardening follow-ups

* Gateway: enforce OpenAI image_url total budget incrementally

* Gateway: scope OpenAI image_url extraction to the active turn

* Update CHANGELOG.md

* fix(agents): avoid xAI web_search tool-name collisions

* fix: clear Telegram DM draft after materialize (#36746) (thanks @joelnishanth)

* Fix Control UI duplicate iMessage replies for internal webchat turns (#36151)

* Auto-reply: avoid routing external replies from internal webchat turns

* Auto-reply tests: cover internal webchat non-routing with external origin metadata

* Changelog: add Control UI iMessage duplicate-reply fix note

* Auto-reply context: track explicit deliver routes

* Gateway chat: mark explicit external deliver routes in context

* Auto-reply: preserve explicit deliver routes for internal webchat turns

* Auto-reply tests: cover explicit deliver routes from internal webchat turns

* Gateway chat tests: assert explicit deliver route context tagging

* fix: enforce 600 perms for cron store and run logs (#36078)

* fix: enforce secure permissions for cron store and run logs

* fix(cron): enforce dir perms and gate posix tests on windows

* Cron store tests: cover existing directory permission hardening

* Cron run-log tests: cover existing directory permission hardening

* Changelog: note cron file permission hardening

---------

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

* fix(tui): accept canonical session-key aliases in chat event routing

* Gateway: normalize OpenAI stream chunk text

* Gateway: coerce chat deliverable route boolean

* fix(web_search): align brave language codes with API

* Respect source channel for agent event surfacing (#36030)

* fix(session): prefer webchat routes for direct ui turns (#37135)

* Gateway: discriminate input sources

* Cron: migrate legacy provider delivery hints

* Cron: stabilize runs-one-shot migration tests

* fix(memory): retry mcporter after Windows EINVAL spawn

* fix(onboarding): guard daemon status probe on headless linux

* Gateway: add path-scoped config schema lookup (#37266)

Merged via squash.

Prepared head SHA: 0c4d187f6fb66f2799d4047585d6368e433c883a
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* docs(changelog): add pr entry

* fix(ci): restore protocol and schema checks (#37470)

* Fix failover for zhipuai 1310 Weekly/Monthly Limit Exhausted (#33813)

Merged via squash.

Prepared head SHA: 3dc441e58de48913720cf7b6137fa761758d8344
Co-authored-by: zhouhe-xydt <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* fix(openai-codex-oauth): stop mutating authorize url scopes

* Update CHANGELOG.md

* fix(auth): remove bogus codex oauth responses probe

* docs(changelog): fold codex oauth fix notes

* docs(changelog): add codex oauth pr reference (#37558)

* fix(security:PLA-697): block local secret scratch files from commits

* feat: add dev EKS deployment for openclaw SRE container

* fix: stabilize slack socket mode in dev eks runtime

* fix(eks): reuse monitoring incident auth for openclaw-sre

* feat(deploy): add grafana env guards and prod deploy wrapper

* fix(security): redact tool outputs and enforce secret-safe runtime defaults

* feat(sre): harden heartbeat routing and enrich triage signals

* docs: add SRE hybrid intelligence design

Three-layer architecture to improve bot reasoning quality:
- Layer 1: Service knowledge (auto-discovery + overlays + incident memory)
- Layer 2: Multi-stage reasoning chain (triage → hypothesize → causal chain → action plan → cross-review)
- Layer 3: Incident learning loop (structured cards, overlay suggestions, feedback signals)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat(sandbox): add boundary cli to common runtime image

* docs(sre): finalize hybrid intelligence design v19 after 18 Codex review rounds

Iteratively hardened the design through 18 adversarial Codex review rounds,
resolving 60+ findings (15+ CRITICAL, 45+ HIGH). Key fixes include:
- Decoupled incident_id (pre-Step11 immutable) from card_id (LLM-derived)
- Unified evidence/memory sanitization via shared _strip_instruction_tokens
- Fixed rerun interval default (3600s > heartbeat 1800s) to prevent every-cycle re-runs
- Added Phase 2 cross-review gap note and dual-column depth table
- Overlay suggestion idempotency via deterministic suggestion_key + upsert
- Decoupled chain timeout from legacy budget check
- Added predicate alignment docs for L3 pre-check vs L3 gate
- Adopted dynamic evidence_completeness denominator matching existing code
- Added scope note clarifying design vs current implementation

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat(sre): complete hybrid intelligence rollout and bot hardening

* fix(sre): harden slack reasoning, dual chain, and deploy auth/runtime

* ci: add ecr release pipeline and infra-helm image update trigger

* ci: switch workflows to github-hosted runners

* ci: allow manual ecr env target and use updater v4

* ci: remove windows jobs from workflow

* chore(pla-678): update fallback auth fixture and plan docs

* fix(pla-678): preserve control-ui host-header fallback in dev config

* refactor(pla-678): remove local sre chart and require infra-helm

* refactor(pla-678): remove direct eks deploy scripts

* ci(pla-678): remove labeler workflow

* ci(pla-678): refresh checks after disabling labeler

* build: install boundary CLI in SRE runtime image

* fix(slack:PLA-678): keep one thread lane across users

* fix(sre-skill): enforce live db-query runbook in dev seed

* fix(slack): ignore bot thread history when seeding new sessions

* fix(slack): force retry on repeated thread questions

* fix(sre-skill): require retry on repeated db requests

* docs(sre-skill): make retry policy generic across repeated asks

* fix(sre:PLA-678): enforce live linear ticket updates

* fix(sre:PLA-678): use [PLATFORM] Backlog linear project

* fix(sre:PLA-678): label linked linear tickets as openclaw-sre

* fix(sre:PLA-678): auto-label linked linear tickets for auto-pr

* test(sre:PLA-678): make tracking label test executable

* fix(slack:PLA-678): remove status-final completion banner (#16)

* fix(slack:PLA-678): enable direct file attachments from agent replies (#17)

* fix(slack:PLA-678): remove status-final completion banner

* fix(slack): enable direct file attachments from agent replies

* refactor(sre:PLA-678): remove local deploy config mirror (#18)

* fix: compact oversized auto-generated pr bodies

* fix(sre): add built-in linear incident memory provider

* feat(sre): add erpc helper with flo secret query

* fix(sre): enforce canonical rpc.morpho.dev erpc endpoint

* refactor(sre): remove local deploy config mirror

* fix(slack:PLA-678): force DM replies into per-message threads (#19)

* fix: compact oversized auto-generated pr bodies

* fix(sre): add built-in linear incident memory provider

* feat(sre): add erpc helper with flo secret query

* fix(sre): enforce canonical rpc.morpho.dev erpc endpoint

* refactor(sre): remove local deploy config mirror

* fix(slack): force threaded replies for direct messages

* feat(cron:PLA-678): use conversation history in self-improve runs (#20)

* fix(slack:PLA-678): improve progress update readability (#21)

* fix(ci:PLA-678): restore main release pipeline health (#22)

* fix(ci:PLA-678): restore main release pipeline health

* fix(ci:PLA-678): harden auto-response token fallback

* fix(ci:PLA-678): pin setup-bun to published release

* test(ci:PLA-678): align slack thread session expectations

* fix(sre:PLA-678): harden Slack reply delivery and image release flow (#23)

* fix(slack:PLA-678): harden thread-scoped reply delivery

* fix(slack:PLA-678): satisfy lint after rebase

* ci(release:PLA-678): move image release to cached ecr flow

* ci(release:PLA-678): use official docker build actions

* fix(slack:PLA-722): preserve progress updates during final-answer gating (#24)

* fix(sre:PLA-724): restore ECR runtime image toolchain (#25)

* fix(failover): classify HTTP 402 as rate_limit when payload indicates usage limit (#30484) (#36802)

* fix(failover): classify HTTP 402 as rate_limit when payload indicates usage limit (#30484)

Some providers (notably Anthropic Claude Max plan) surface temporary
usage/rate-limit failures as HTTP 402 instead of 429. Before this change,
all 402s were unconditionally mapped to 'billing', which produced a
misleading 'run out of credits' warning for Max plan users who simply
hit their usage window.

This follows the same pattern introduced for HTTP 400 in #36783: check
the error message for an explicit rate-limit signal before falling back
to the default status-code classification.

- classifyFailoverReasonFromHttpStatus now returns 'rate_limit' for 402
  when isRateLimitErrorMessage matches the payload text
- Added regression tests covering both the rate-limit and billing paths
  on 402

* fix: narrow 402 rate-limit matcher to prevent billing misclassification

The original implementation used isRateLimitErrorMessage(), which matches
phrases like 'quota exceeded' that legitimately appear in billing errors.

This commit replaces it with a narrow, 402-specific matcher that requires
BOTH retry language (try again/retry/temporary/cooldown) AND limit
terminology (usage limit/rate limit/organization usage).

Prevents misclassification of errors like:
'HTTP 402: exceeded quota, please add credits' -> billing (not rate_limit)

Added regression test for the ambiguous case.

---------

Co-authored-by: Val Alexander <[email protected]>

* fix(mattermost): allow reachable interaction callback URLs (#37543)

Merged via squash.

Prepared head SHA: 4d593731be5a5dcbf3106d596b38acfeb8cf0aa8
Co-authored-by: mukhtharcm <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Reviewed-by: @mukhtharcm

* fix(cron:PLA-740): audit previous-day self-improve sessions

---------

Signed-off-by: joshavant <[email protected]>
Co-authored-by: Gustavo Madeira Santana <[email protected]>
Co-authored-by: Mariano <[email protected]>
Co-authored-by: leepokai <[email protected]>
Co-authored-by: Bob <[email protected]>
Co-authored-by: Onur <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: huangcj <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: Sid <[email protected]>
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Co-authored-by: a <[email protected]>
Co-authored-by: echoVic <[email protected]>
Co-authored-by: Shakker <[email protected]>
Co-authored-by: liuxiaopai-ai <[email protected]>
Co-authored-by: Rodrigo Uroz <[email protected]>
Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: jalehman <[email protected]>
Co-authored-by: Kai <[email protected]>
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: 青雲 <[email protected]>
Co-authored-by: echoVic <[email protected]>
Co-authored-by: Darshil <[email protected]>
Co-authored-by: Ho Lim <[email protected]>
Co-authored-by: dvrshil <[email protected]>
Co-authored-by: Isis Anisoptera <[email protected]>
Co-authored-by: Madoka <[email protected]>
Co-authored-by: Xu Zimo <[email protected]>
Co-authored-by: Munem Hashmi <[email protected]>
Co-authored-by: bmendonca3 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Co-authored-by: Nhj <[email protected]>
Co-authored-by: 倪汉杰0668001185 <[email protected]>
Co-authored-by: zhengquanliu <[email protected]>
Co-authored-by: nick <[email protected]>
Co-authored-by: linhey <[email protected]>
Co-authored-by: scoootscooob <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: rexl2018 <[email protected]>
Co-authored-by: sline <[email protected]>
Co-authored-by: 0xsline <[email protected]>
Co-authored-by: Harold Hunt <[email protected]>
Co-authored-by: Shivam <[email protected]>
Co-authored-by: 不做了睡大觉 <[email protected]>
Co-authored-by: alexyyyander <[email protected]>
Co-authored-by: alexyyyander <[email protected]>
Co-authored-by: Octane0411 <[email protected]>
Co-authored-by: Linux2010 <[email protected]>
Co-authored-by: echoVic <[email protected]>
Co-authored-by: Joseph Turian <[email protected]>
Co-authored-by: turian <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Tony Dehnke <[email protected]>
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: kevinWangSheng <[email protected]>
Co-authored-by: ningding97 <[email protected]>
Co-authored-by: Naylenv <[email protected]>
Co-authored-by: clawbie <[email protected]>
Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Ayane <[email protected]>
Co-authored-by: Ayane <[email protected]>
Co-authored-by: StingNing <[email protected]>
Co-authored-by: maweibin <[email protected]>
Co-authored-by: maweibin <[email protected]>
Co-authored-by: Josh Avant <[email protected]>
Co-authored-by: Bin Deng <[email protected]>
Co-authored-by: Byungsker <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Co-authored-by: Altay <[email protected]>
Co-authored-by: jiangnan <[email protected]>
Co-authored-by: jnMetaCode <[email protected]>
Co-authored-by: Jacob Riff <[email protected]>
Co-authored-by: jriff <[email protected]>
Co-authored-by: Naylenv <[email protected]>
Co-authored-by: Bill <[email protected]>
Co-authored-by: 2233admin <[email protected]>
Co-authored-by: 2233admin <[email protected]>
Co-authored-by: littleben <[email protected]>
Co-authored-by: littleben <[email protected]>
Co-authored-by: OpenClaw Agent <[email protected]>
Co-authored-by: Vignesh Natarajan <[email protected]>
Co-authored-by: zerone0x <[email protected]>
Co-authored-by: zerone0x <[email protected]>
Co-authored-by: dunamismax <[email protected]>
Co-authored-by: Octane <[email protected]>
Co-authored-by: Mitsuyuki Osabe <[email protected]>
Co-authored-by: Tak <[email protected]>
Co-authored-by: Tyler Yust <[email protected]>
Co-authored-by: Hinata Kaga (samon) <[email protected]>
Co-authored-by: dorukardahan <[email protected]>
Co-authored-by: Tyler Yust <[email protected]>
Co-authored-by: Brenner Spear <[email protected]>
Co-authored-by: aerelune <[email protected]>
Co-authored-by: Frank Yang <[email protected]>
Co-authored-by: zhouhe-xydt <[email protected]>
Co-authored-by: zhouhe-xydt <[email protected]>
Co-authored-by: Vignesh <[email protected]>
Co-authored-by: OpenClaw SRE Bot <[email protected]>
Co-authored-by: Xinhua Gu <[email protected]>
Co-authored-by: Val Alexander <[email protected]>
0x666c6f added a commit to 0x666c6f/openclaw that referenced this pull request Mar 26, 2026
…openclaw#31)

* Plugins/memory-lancedb: migrate to scoped plugin-sdk imports

* Plugins/minimax-portal-auth: migrate to scoped plugin-sdk imports

* Plugins/msteams: migrate to scoped plugin-sdk imports

* Plugins/nextcloud-talk: migrate to scoped plugin-sdk imports

* Plugins/nostr: migrate to scoped plugin-sdk imports

* Plugins/open-prose: migrate to scoped plugin-sdk imports

* Plugins/phone-control: migrate to scoped plugin-sdk imports

* Plugins/qwen-portal-auth: migrate to scoped plugin-sdk imports

* Plugins/synology-chat: migrate to scoped plugin-sdk imports

* Plugins/talk-voice: migrate to scoped plugin-sdk imports

* Plugins/test-utils: migrate to scoped plugin-sdk imports

* Plugins/thread-ownership: migrate to scoped plugin-sdk imports

* Plugins/tlon: migrate to scoped plugin-sdk imports

* Plugins/twitch: migrate to scoped plugin-sdk imports

* Plugins/voice-call: migrate to scoped plugin-sdk imports

* Plugins/whatsapp: migrate to scoped plugin-sdk imports

* Plugins/zalo: migrate to scoped plugin-sdk imports

* Plugins/zalouser: migrate to scoped plugin-sdk imports

* Chore: remove accidental .DS_Store artifact

* chore(docs): add plugins refactor changelog entry

* feat(ios): add Live Activity connection status + stale cleanup (#33591)

* feat(ios): add live activity connection status and cleanup

Add lock-screen/Dynamic Island connection health states and prune duplicate/stale activities before reuse. This intentionally excludes AI/title generation and heavier UX rewrites from #27488.

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

* fix(ios): treat ended live activities as inactive

* chore(changelog): add PR reference and author thanks

---------

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

* fix: kill stuck ACP child processes on startup and harden sessions in discord threads (#33699)

* Gateway: resolve agent.wait for chat.send runs

* Discord: harden ACP thread binding + listener timeout

* ACPX: handle already-exited child wait

* Gateway/Discord: address PR review findings

* Discord: keep ACP error-state thread bindings on startup

* gateway: make agent.wait dedupe bridge event-driven

* discord: harden ACP probe classification and cap startup fan-out

* discord: add cooperative timeout cancellation

* discord: fix startup probe concurrency helper typing

* plugin-sdk: avoid Windows root-alias shard timeout

* plugin-sdk: keep root alias reflection path non-blocking

* discord+gateway: resolve remaining PR review findings

* gateway+discord: fix codex review regressions

* Discord/Gateway: address Codex review findings

* Gateway: keep agent.wait lifecycle active with shared run IDs

* Discord: clean up status reactions on aborted runs

* fix: add changelog note for ACP/Discord startup hardening (#33699) (thanks @dutifulbob)

---------

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

* fix: relay ACP sessions_spawn parent streaming (#34310) (thanks @vincentkoc) (#34310)

Co-authored-by: Onur Solmaz <[email protected]>

* fix(telegram): materialize dm draft final to avoid duplicates

* docs(changelog): credit @Brotherinlaw-13 for #34318

* fix: prevent nodes media base64 context bloat (#34332)

* fix: preserve raw media invoke for HTTP tool clients (#34365)

* fix(slack): route system events to bound agent sessions (#34045)

* fix(slack): route system events via binding-aware session keys

* fix(slack): pass sender to system event session resolver

* fix(slack): include sender context for interaction session routing

* fix(slack): include modal submitter in session routing

* test(slack): cover binding-aware system event routing

* test(slack): update interaction session key assertions

* test(slack): assert reaction session routing carries sender

* docs(changelog): note slack system event routing fix

* Update CHANGELOG.md

* Delete changelog/fragments directory

* fix(memory): serialize local embedding initialization to avoid duplicate model loads (#15639)

Merged via squash.

Prepared head SHA: a085fc21a8ba7163fffdb5de640dd4dc1ff5a88e
Co-authored-by: SubtleSpark <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(model): propagate custom provider headers to model objects (#27490)

Merged via squash.

Prepared head SHA: e4183b398fc7eb4c18b2b691cb0dd882ec993608
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(daemon): handle systemctl is-enabled exit 4 (not-found) on Ubuntu (#33634)

Merged via squash.

Prepared head SHA: 67dffc3ee239cd7b813cb200c3dd5475d9e203a6
Co-authored-by: Yuandiaodiaodiao <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(node-host): sync rawCommand with hardened argv after executable path pinning (#33137)

Merged via squash.

Prepared head SHA: a7987905f7ad6cf5fee286ffa81ceaad8297174f
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* Agents: add generic poll-vote action support

* fix(ollama): pass provider headers to Ollama stream function (#24285)

createOllamaStreamFn() only accepted baseUrl, ignoring custom headers
configured in models.providers.<provider>.headers. This caused 403
errors when Ollama endpoints are behind reverse proxies that require
auth headers (e.g. X-OLLAMA-KEY via HAProxy).

Add optional defaultHeaders parameter to createOllamaStreamFn() and
merge them into every fetch request. Provider headers from config are
now passed through at the call site in the embedded runner.

Fixes #24285

* test(ollama): add default header precedence coverage

* chore(changelog): add PR entry openclaw#24337 thanks @echoVic

* Outbound: allow text-only plugin adapters

* Outbound: avoid empty multi-media fallback sends

* chore(changelog): align outbound adapter entry openclaw#32788 thanks @liuxiaopai-ai

* fix(outbound): fail media-only text-only adapter fallback

* chore(changelog): clarify outbound media-only fallback openclaw#32788 thanks @liuxiaopai-ai

* fix(review): enforce behavioral sweep validation

* Fix gateway restart false timeouts on Debian/systemd (#34874)

* daemon(systemd): target sudo caller user scope

* test(systemd): cover sudo user scope commands

* infra(ports): fall back to ss when lsof missing

* test(ports): verify ss fallback listener detection

* cli(gateway): use probe fallback for restart health

* test(gateway): cover restart-health probe fallback

* Compaction/Safeguard: require structured summary headings (#25555)

Merged via squash.

Prepared head SHA: 0b1df34806a7b788261290be55760fd89220de53
Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* Fix Linux daemon install checks when systemd user bus env is missing (#34884)

* daemon(systemd): fall back to machine user scope when user bus is missing

* test(systemd): cover machine scope fallback for user-bus errors

* test(systemd): reset execFile mock state across cases

* test(systemd): make machine-user fallback assertion portable

* fix(daemon): keep root sudo path on direct user scope

* test(systemd): cover sudo root user-scope behavior

* ci: use resolvable bun version in setup-node-env

* agents: preserve totalTokens on request failure instead of using contextWindow (#34275)

Merged via squash.

Prepared head SHA: f9d111d0a79a07815d476356e98a28df3a0000ba
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix: align AGENTS.md template section names with post-compaction extraction (#25029) (#25098)

Merged via squash.

Prepared head SHA: 8cd6cc8049aab5a94d8a9d5fb08f2e792c4ac5fd
Co-authored-by: echoVic <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* Changelog: add daemon systemd user-bus fallback entry (#34884)

* Changelog: add gateway restart health entry (#34874)

* fix: finalize spanish locale support

* fix: add spanish locale support (#35038) (thanks @DaoPromociones)

* fix(deps): patch hono transitive audit vulnerabilities

* fix(security): avoid prototype-chain account path checks (#34982)

Merged via squash.

Prepared head SHA: f89cc6a649959997fe1dec1e1c1bff9a61b2de98
Co-authored-by: HOYALIM <[email protected]>
Co-authored-by: dvrshil <[email protected]>
Reviewed-by: @dvrshil

* fix(deps): bump tar to 7.5.10

* docs(changelog): document dependency security fixes

* fix: restore auto-reply system events timeline (#34794) (thanks @anisoptera) (#34794)

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

* fix(feishu): comprehensive reply mechanism — outbound replyToId forwarding + topic-aware reply targeting (#33789)

* fix(feishu): comprehensive reply mechanism fix — outbound replyToId forwarding + topic-aware reply targeting

- Forward replyToId from ChannelOutboundContext through sendText/sendMedia
  to sendMessageFeishu/sendMarkdownCardFeishu/sendMediaFeishu, enabling
  reply-to-message via the message tool.

- Fix group reply targeting: use ctx.messageId (triggering message) in
  normal groups to prevent silent topic thread creation (#32980). Preserve
  ctx.rootId targeting for topic-mode groups (group_topic/group_topic_sender)
  and groups with explicit replyInThread config.

- Add regression tests for both fixes.

Fixes #32980
Fixes #32958
Related #19784

* fix: normalize Feishu delivery.to before comparing with messaging tool targets

- Add normalizeDeliveryTarget helper to strip user:/chat: prefixes for Feishu
- Apply normalization in matchesMessagingToolDeliveryTarget before comparison
- This ensures cron duplicate suppression works when session uses prefixed targets
  (user:ou_xxx) but messaging tool extract uses normalized bare IDs (ou_xxx)

Fixes review comment on PR #32755

(cherry picked from commit fc20106f16ccc88a5f02e58922bb7b7999fe9dcd)

* fix(feishu): catch thrown SDK errors for withdrawn reply targets

The Feishu Lark SDK can throw exceptions (SDK errors with .code or
AxiosErrors with .response.data.code) for withdrawn/deleted reply
targets, in addition to returning error codes in the response object.

Wrap reply calls in sendMessageFeishu and sendCardFeishu with
try-catch to handle thrown withdrawn/not-found errors (230011,
231003) and fall back to client.im.message.create, matching the
existing response-level fallback behavior.

Also extract sendFallbackDirect helper to deduplicate the
direct-send fallback block across both functions.

Closes #33496

(cherry picked from commit ad0901aec103a2c52f186686cfaf5f8ba54b4a48)

* feishu: forward outbound reply target context

(cherry picked from commit c129a691fcf552a1cebe1e8a22ea8611ffc3b377)

* feishu extension: tighten reply target fallback semantics

(cherry picked from commit f85ec610f267020b66713c09e648ec004b2e26f1)

* fix(feishu): align synthesized fallback typing and changelog attribution

* test(feishu): cover group_topic_sender reply targeting

---------

Co-authored-by: Xu Zimo <[email protected]>
Co-authored-by: Munem Hashmi <[email protected]>
Co-authored-by: bmendonca3 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(feishu): use msg_type media for mp4 video (fixes #33674) (#33720)

* fix(feishu): use msg_type media for mp4 video (fixes #33674)

* Feishu: harden streaming merge semantics and final reply dedupe

Use explicit streaming update semantics in the Feishu reply dispatcher:
treat onPartialReply payloads as snapshot updates and block fallback payloads
as delta chunks, then merge final text with the shared overlap-aware
mergeStreamingText helper before closing the stream.

Prevent duplicate final text delivery within the same dispatch cycle, and add
regression tests covering overlap snapshot merge, duplicate final suppression,
and block-as-delta behavior to guard against repeated/truncated output.

* fix(feishu): prefer message.reply for streaming cards in topic threads

* fix: reduce Feishu streaming card print_step to avoid duplicate rendering

Fixes openclaw/openclaw#33751

* Feishu: preserve media sends on duplicate finals and add media synthesis changelog

* Feishu: only dedupe exact duplicate final replies

* Feishu: use scoped plugin-sdk import in streaming-card tests

---------

Co-authored-by: 倪汉杰0668001185 <[email protected]>
Co-authored-by: zhengquanliu <[email protected]>
Co-authored-by: nick <[email protected]>
Co-authored-by: linhey <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(agents): bypass pendingDescendantRuns guard for cron announce delivery (#35185)

* fix(agents): bypass pendingDescendantRuns guard for cron announce delivery

Standalone cron job completions were blocked from direct channel delivery
when the cron run had spawned subagents that were still registered as
pending. The pendingDescendantRuns guard exists for live orchestration
coordination and should not apply to fire-and-forget cron announce sends.

Thread the announceType through the delivery chain and skip both the
child-descendant and requester-descendant pending-run guards when the
announce originates from a cron job.

Closes #34966

* fix: ensure outbound session entry for cron announce with named agents (#32432)

Named agents may not have a session entry for their delivery target,
causing the announce flow to silently fail (delivered=false, no error).

Two fixes:
1. Call ensureOutboundSessionEntry when resolving the cron announce
   session key so downstream delivery can find channel metadata.
2. Fall back to direct outbound delivery when announce delivery fails
   to ensure cron output reaches the target channel.

Closes #32432

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: guard announce direct-delivery fallback against suppression leaks (#32432)

The `!delivered` fallback condition was too broad — it caught intentional
suppressions (active subagents, interim messages, SILENT_REPLY_TOKEN) in
addition to actual announce delivery failures.  Add an
`announceDeliveryWasAttempted` flag so the direct-delivery fallback only
fires when `runSubagentAnnounceFlow` was actually called and failed.

Also remove the redundant `if (route)` guard in
`resolveCronAnnounceSessionKey` since `resolved` being truthy guarantees
`route` is non-null.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix(cron): harden announce synthesis follow-ups

---------

Co-authored-by: scoootscooob <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* Feishu: harden streaming merge semantics and final reply dedupe (#33245)

* Feishu: close duplicate final gap and cover routing precedence

* Feishu: resolve reviewer duplicate-final and routing feedback

* Feishu: tighten streaming send-mode option typing

* Feishu: fix reverse-overlap streaming merge ordering

* Feishu: align streaming final dedupe test expectation

* Feishu: allow distinct streaming finals while deduping repeats

---------

Co-authored-by: Tak Hoffman <[email protected]>

* fix: cron backup should preserve pre-edit snapshot (#35195) (#35234)

* fix(cron): avoid overwriting .bak during normalization

Fixes openclaw/openclaw#35195

* test(cron): preserve pre-edit bak snapshot in normalization path

---------

Co-authored-by: 0xsline <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(cron): stabilize restart catch-up replay semantics (#35351)

* Cron: stabilize restart catch-up replay semantics

* Cron: respect backoff in startup missed-run replay

* cron: narrow startup replay backoff guard (#35391)

* cron: unify stale-run recovery and preserve manual-run every anchors (#35363)

* cron: unify stale-run recovery and preserve manual every anchors

* cron: address unresolved review threads on recovery paths

* cron: remove duplicate timestamp helper after rebase

* refactor(telegram): remove unused webhook callback helper (#27816)

* fix(pr): make review claim step required

* fix(skills): deduplicate slash commands by skillName across all interfaces

Move skill-command deduplication by skillName from the Discord-only
`dedupeSkillCommandsForDiscord` into `listSkillCommandsForAgents` so
every interface (TUI, Slack, text) consistently sees a clean command
list without platform-specific workarounds.

When multiple agents share a skill with the same name the old code
emitted `github` + `github_2` and relied on Discord to collapse them.
Now `listSkillCommandsForAgents` returns only the first registration
per skillName, and the Discord-specific wrapper is removed.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* style: fix formatting in skill-commands.test.ts and provider.ts

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

* style(skills): align formatting cleanup for dedupe changes

* chore(changelog): add dedupe note openclaw#27521 thanks @shivama205

* fix(agents): detect Venice provider proxying xAI/Grok models for schema cleaning (#35355)

Merged via squash.

Prepared head SHA: 8bfdec257bb6a6025cb69a0a213a433da32b15db
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(agents): decode HTML entities in xAI/Grok tool call arguments (#35276)

Merged via squash.

Prepared head SHA: c4445d2938898ded9c046614f9315dbda65ec573
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(agents): guard promoteThinkingTagsToBlocks against malformed content entries (#35143)

Merged via squash.

Prepared head SHA: 3971122f5fd27c66c8c9c5ce783f00e113b1f47b
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(web-ui): render Accounts schema node properly (#35380)

Co-authored-by: stakeswky <[email protected]>
Co-authored-by: liuxiaopai-ai <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(agents): guard context pruning against malformed thinking blocks (#35146)

Merged via squash.

Prepared head SHA: a196a565b1b8e806ffbf85172bcf1128796b45a2
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* fix(gateway): prevent internal route leakage in chat.send

Synthesis of routing fixes from #35321, #34635, and #35356 for internal-client reply safety.

- Require explicit `deliver: true` before inheriting any external delivery route.
- Keep webchat/TUI/UI-origin traffic on internal routing by default.
- Allow configured-main session inheritance only for non-Webchat/UI clients, and honor `session.mainKey`.
- Add regression tests for UI no-inherit, configured-main CLI inherit, and deliver-flag behavior.

Co-authored-by: alexyyyander <[email protected]>
Co-authored-by: Octane0411 <[email protected]>
Co-authored-by: Linux2010 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(gateway): pass actual version to Control UI client instead of dev (#35230)

* fix(gateway): pass actual version to Control UI client instead of "dev"

The GatewayClient, CLI WS client, and browser Control UI all sent
"dev" as their clientVersion during handshake, making it impossible
to distinguish builds in gateway logs and health snapshots.

- GatewayClient and CLI WS client now use the resolved VERSION constant
- Control UI reads serverVersion from the bootstrap endpoint and
  forwards it when connecting
- Bootstrap contract extended with serverVersion field

Closes #35209

* Gateway: fix control-ui version version-reporting consistency

* Control UI: guard deferred bootstrap connect after disconnect

* fix(ui): accept same-origin http and relative gateway URLs for client version

---------

Co-authored-by: Tak Hoffman <[email protected]>

* chore(pr): enforce changelog placement and reduce merge sync churn

* TTS: add baseUrl support to OpenAI TTS config (#34321)

Merged via squash.

Prepared head SHA: e9a10cf81d2021cf81091dfa81e13ffdbb6a540a
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Reviewed-by: @shakkernerd

* ACP: add persistent Discord channel and Telegram topic bindings (#34873)

* docs: add ACP persistent binding experiment plan

* docs: align ACP persistent binding spec to channel-local config

* docs: scope Telegram ACP bindings to forum topics only

* docs: lock bound /new and /reset behavior to in-place ACP reset

* ACP: add persistent discord/telegram conversation bindings

* ACP: fix persistent binding reuse and discord thread parent context

* docs: document channel-specific persistent ACP bindings

* ACP: split persistent bindings and share conversation id helpers

* ACP: defer configured binding init until preflight passes

* ACP: fix discord thread parent fallback and explicit disable inheritance

* ACP: keep bound /new and /reset in-place

* ACP: honor configured bindings in native command flows

* ACP: avoid configured fallback after runtime bind failure

* docs: refine ACP bindings experiment config examples

* acp: cut over to typed top-level persistent bindings

* ACP bindings: harden reset recovery and native command auth

* Docs: add ACP bound command auth proposal

* Tests: normalize i18n registry zh-CN assertion encoding

* ACP bindings: address review findings for reset and fallback routing

* ACP reset: gate hooks on success and preserve /new arguments

* ACP bindings: fix auth and binding-priority review findings

* Telegram ACP: gate ensure on auth and accepted messages

* ACP bindings: fix session-key precedence and unavailable handling

* ACP reset/native commands: honor fallback targets and abort on bootstrap failure

* Config schema: validate ACP binding channel and Telegram topic IDs

* Discord ACP: apply configured DM bindings to native commands

* ACP reset tails: dispatch through ACP after command handling

* ACP tails/native reset auth: fix target dispatch and restore full auth

* ACP reset detection: fallback to active ACP keys for DM contexts

* Tests: type runTurn mock input in ACP dispatch test

* ACP: dedup binding route bootstrap and reset target resolution

* reply: align ACP reset hooks with bound session key

* docs: replace personal discord ids with placeholders

* fix: add changelog entry for ACP persistent bindings (#34873) (thanks @dutifulbob)

---------

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

* docs(telegram): recommend allowlist for single-user DM policy (#34841)

* docs(telegram): recommend allowlist for single-user bots

* docs(telegram): condense single-user allowlist note

---------

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

* fix(feishu): check response.ok before calling response.json() in streaming card (#35628)

Merged via squash.

Prepared head SHA: 62c3fec80d97cea9be344c0bef5358a0a5dc5560
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* Mattermost: honor onmessage mention override and add gating diagnostics tests (#27160)

Merged via squash.

Prepared head SHA: 6cefb1d5bf3d6dfcec36c1cee3f9ea887f10c890
Co-authored-by: turian <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Reviewed-by: @mukhtharcm

* fix(subagents): strip leaked [[reply_to]] tags from completion announces (#34503)

* fix(subagents): strip reply tags from completion delivery text

* test(subagents): cover reply-tag stripping in cron completion sends

* changelog: note iMessage reply-tag stripping in completion announces

* Update CHANGELOG.md

* Apply suggestion from @greptile-apps[bot]

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* fix(cron): restore direct fallback after announce failure in best-effort mode (openclaw#36177)

Verified:
- pnpm build
- pnpm check (fails on pre-existing origin/main lint debt in extensions/mattermost imports)
- pnpm test:macmini

Co-authored-by: Tak Hoffman <[email protected]>

* test(cron): add cross-channel announce fallback regression coverage (openclaw#36197)

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check (fails on pre-existing origin/main lint debt in extensions/mattermost imports)
- pnpm test:macmini

Co-authored-by: Tak Hoffman <[email protected]>

* feat(mattermost): add interactive buttons support (#19957)

Merged via squash.

Prepared head SHA: 8a25e608729d0b9fd07bb0ee4219d199d9796dbe
Co-authored-by: tonydehnke <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Reviewed-by: @mukhtharcm

* fix(browser): remove deprecated --disable-blink-features=AutomationControlled flag

- Removes OpenClaw's default `--disable-blink-features=AutomationControlled` Chrome launch switch to avoid unsupported-flag warnings in newer Chrome (#35721).
- Preserves compatibility for older Chrome via `browser.extraArgs` override behavior (source analysis: #35770, #35728, #35727, #35885).
- Synthesis attribution: thanks @Sid-Qin, @kevinWangSheng, @ningding97, @Naylenv, @clawbie.

Source PR refs: #35734, #35770, #35728, #35727, #35885

Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: kevinWangSheng <[email protected]>
Co-authored-by: ningding97 <[email protected]>
Co-authored-by: Naylenv <[email protected]>
Co-authored-by: clawbie <[email protected]>
Co-authored-by: Takhoffman <[email protected]>

* fix(feishu): add HTTP timeout to prevent per-chat queue deadlocks (#36430)

When the Feishu API hangs or responds slowly, the sendChain never settles,
causing the per-chat queue to remain in a processing state forever and
blocking all subsequent messages in that thread. This adds a 30-second
default timeout to all Feishu HTTP requests by providing a timeout-aware
httpInstance to the Lark SDK client.

Closes #36412

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

* fix(feishu): use probed botName for mention checks (#36391)

* Feishu: honor bot mentions by ID despite aliases (Fixes #36317) (#36333)

* Mattermost: switch plugin-sdk imports to scoped subpaths (openclaw#36480)

Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(feishu): accept groupPolicy "allowall" as alias for "open" (#36358)

* fix(feishu): accept groupPolicy "allowall" as alias for "open"

When users configure groupPolicy: "allowall" in Feishu channel config,
the Zod schema rejects the value and the runtime policy check falls
through to the allowlist path.  With an empty allowFrom array, all group
messages are silently dropped despite the intended "allow all" semantics.

Accept "allowall" at the schema level (transform to "open") and add a
runtime guard in isFeishuGroupAllowed so the value is handled even if it
bypasses schema validation.

Closes #36312

Made-with: Cursor

* Feishu: tighten allowall alias handling and coverage

---------

Co-authored-by: Tak Hoffman <[email protected]>

* synthesis: fix Feishu group mention slash parsing

## Summary\n\nFeishu group slash command parsing is fixed for mentions and command probes across authorization paths.\n\nThis includes:\n- Normalizing bot mention text in group context for reliable slash detection in message parsing.\n- Adding command-probe normalization for group slash invocations.\n\nCo-authored-by: Sid Qin <[email protected]>\nCo-authored-by: Tak Hoffman <[email protected]>

* Feishu: normalize group slash command probing

- Feishu/group slash command detection: normalize group mention wrappers before command-authorization probing so mention-prefixed commands are recognized in group routing.\n- Source PR: #36011\n- Contributor: @liuxiaopai-ai\n\nCo-authored-by: Tak Hoffman <[email protected]>\nCo-authored-by: liuxiaopai-ai <[email protected]>

* add prependSystemContext and appendSystemContext to before_prompt_build (fixes #35131) (#35177)

Merged via squash.

Prepared head SHA: d9a2869ad69db9449336a2e2846bd9de0e647ac6
Co-authored-by: maweibin <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(feishu): avoid media regressions from global HTTP timeout (#36500)

* fix(feishu): avoid media regressions from global http timeout

* fix(feishu): source HTTP timeout from config

* fix(feishu): apply media timeout override to image uploads

* fix(feishu): invalidate cached client when timeout changes

* fix(feishu): clamp timeout values and cover image download

* Gateway: add SecretRef support for gateway.auth.token with auth-mode guardrails (#35094)

* fix(embedded): classify model_context_window_exceeded as context overflow, trigger compaction (#35934)

Merged via squash.

Prepared head SHA: 20fa77289c80b2807a6779a3df70440242bc18ca
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(agents): skip compaction API call when session has no real messages (#36451)

Merged via squash.

Prepared head SHA: 52dd6317895c7bd10855d2bd7dbbfc2f5279b68e
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(ui): catch marked.js parse errors to prevent Control UI crash (#36445)

- Prevent Control UI session render crashes when `marked.parse()` encounters pathological recursive markdown by safely falling back to escaped `<pre>` output.
- Tighten markdown fallback regression coverage and keep changelog attribution in sync for this crash-hardening path.

Co-authored-by: Bin Deng <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(session): archive old transcript on daily/scheduled reset to prevent orphaned files (#35493)

Merged via squash.

Prepared head SHA: 0d95549d752adecfc0b08d5cd55a8b8c75e264fe
Co-authored-by: byungsker <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(agents): set preserveSignatures to isAnthropic in resolveTranscriptPolicy (#32813)

Merged via squash.

Prepared head SHA: f522d21ca59a42abac554435a0aa646f6a34698d
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix: avoid false global rate-limit classification from generic cooldown text (#32972)

Merged via squash.

Prepared head SHA: 813c16f5afce415da130a917d9ce9f968912b477
Co-authored-by: stakeswky <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* refactor(agents): share failover HTTP status classification (#36615)

* fix(agents): classify transient failover statuses consistently

* fix(agents): preserve legacy failover status mapping

* fix(failover): narrow service-unavailable to require overload indicator (#32828) (#36646)

Merged via squash.

Prepared head SHA: 46fb4306127972d7635f371fd9029fbb9baff236
Co-authored-by: jnMetaCode <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* Compaction/Safeguard: add summary quality audit retries (#25556)

Merged via squash.

Prepared head SHA: be473efd1635616ebbae6e649d542ed50b4a827f
Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* test(agents): add provider-backed failover regressions (#36735)

* test(agents): add provider-backed failover fixtures

* test(agents): cover more provider error docs

* test(agents): tighten provider doc fixtures

* Docs: add Slack typing reaction fallback

* Docs: update gateway config reference for Slack and TTS

* Docs: clarify OpenAI-compatible TTS endpoints

* Docs: document Control UI locale support

* Docs: cover heartbeat, cron, and plugin route updates

* fix(ui): bump dompurify to 3.3.2 (#36781)

* UI: bump dompurify to 3.3.2

* Deps: refresh dompurify lockfile

* UI: hoist lifecycle connect test mocks (#36788)

* fix(agents): classify insufficient_quota 400s as billing (#36783)

* feat: append UTC time alongside local time in shared Current time lines (#32423)

Merged via squash.

Prepared head SHA: 9e8ec13933b5317e7cff3f0bc048de515826c31a
Co-authored-by: jriff <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* fix(auth): grant senderIsOwner for internal channels with operator.admin scope (openclaw#35704)

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Naylenv <[email protected]>
Co-authored-by: Octane0411 <[email protected]>
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(config): prevent RangeError in merged schema cache key generation

Fix merged schema cache key generation for high-cardinality plugin/channel metadata by hashing incrementally instead of serializing one large aggregate string.

Includes changelog entry for the user-visible regression fix.

Co-authored-by: Tak Hoffman <[email protected]>
Co-authored-by: Bill <[email protected]>

* fix(slack): propagate mediaLocalRoots through Slack send path

Restore Slack local file upload parity with CVE-era local media allowlist enforcement by threading `mediaLocalRoots` through the Slack send call chain.

- pass `ctx.mediaLocalRoots` from Slack channel action adapter into `handleSlackAction`
- add and forward `mediaLocalRoots` in Slack action context/send path
- pass `mediaLocalRoots` into `sendMessageSlack` for upload allowlist enforcement
- add changelog entry with attribution for this behavior fix

Co-authored-by: 2233admin <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(slack): preserve dedupe while recovering dropped app_mention (#34937)

This PR fixes Slack mention loss without reintroducing duplicate dispatches.

- Preserve seen-message dedupe at ingress to prevent duplicate processing.
- Allow a one-time app_mention retry only when the paired message event was previously dropped before dispatch.
- Add targeted race tests for both recovery and duplicate-prevention paths.

Co-authored-by: littleben <[email protected]>
Co-authored-by: OpenClaw Agent <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* README: add algal to contributors list (#2046)

* fix: decouple Discord inbound worker timeout from listener timeout (#36602) (thanks @dutifulbob) (#36602)

Co-authored-by: Onur Solmaz <[email protected]>

* plugins: enforce prompt hook policy with runtime validation (#36567)

Merged via squash.

Prepared head SHA: 6b9d883b6ae33628235fb02ce39c0d0f46a065bb
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(memory): avoid destructive qmd collection rebinds

* Harden Telegram poll gating and schema consistency (#36547)

Merged via squash.

Prepared head SHA: f77824419e3d166f727474a9953a063a2b4547f2
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(browser): close tracked tabs on session cleanup (#36666)

* Diffs: restore system prompt guidance (#36904)

Merged via squash.

Prepared head SHA: 1b3be3c87957c068473d5c86b9efba4a1a8503f2
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* fix(routing): avoid full binding rescans in resolveAgentRoute (#36915)

* fix(gateway): honor insecure ws override for remote hostnames

* fix(llm-task): load runEmbeddedPiAgent from dist/extensionAPI in installs

* fix(auth): harden openai-codex oauth login path

* feat(telegram/acp): Topic Binding, Pin Binding Message, Fix Spawn Param Parsing (#36683)

* fix(acp): normalize unicode flags and Telegram topic binding

* feat(telegram/acp): restore topic-bound ACP and session bindings

* fix(acpx): clarify permission-denied guidance

* feat(telegram/acp): pin spawn bind notice in topics

* docs(telegram): document ACP topic thread binding behavior

* refactor(reply): share Telegram conversation-id resolver

* fix(telegram/acp): preserve bound session routing semantics

* fix(telegram): respect binding persistence and expiry reporting

* refactor(telegram): simplify binding lifecycle persistence

* fix(telegram): bind acp spawns in direct messages

* fix: document telegram ACP topic binding changelog (#36683) (thanks @huntharo)

---------

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

* fix(gateway): preserve streamed prefixes across tool boundaries

* fix(tui): prevent stale model indicator after /model

* Memory: handle SecretRef keys in doctor embeddings (#36835)

Merged via squash.

Prepared head SHA: c1a3d0caae60115d886e8bfc9983c9533c773f04
Co-authored-by: joshavant <[email protected]>
Co-authored-by: joshavant <[email protected]>
Reviewed-by: @joshavant

* fix(openai-codex): request required oauth api scopes (#24720)

* fix(memory-flush): ban timestamped variant files in default flush prompt (#34951)

Merged via squash.

Prepared head SHA: efadda4988b460e6da07be72994d4951d64239d0
Co-authored-by: zerone0x <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(tui): render final event error when assistant output is empty (#14687)

* feat(agents): flush reply pipeline before compaction wait (#35489)

Merged via squash.

Prepared head SHA: 7dbbcc510b74b0e8d35eb750d24575e34b5d769a
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: jalehman <[email protected]>
Reviewed-by: @jalehman

* fix(secrets): harden api key normalization for ByteString headers

* fix(slack): remove double mrkdwn conversion in native streaming path

Remove redundant text normalization from Slack native streaming markdown_text flow so Markdown formatting is preserved.

Synthesis context: overlaps reviewed from #34931, #34759, #34716, #34682, #34814.

Co-authored-by: littleben <[email protected]>
Co-authored-by: dunamismax <[email protected]>
Co-authored-by: Octane <[email protected]>
Co-authored-by: Mitsuyuki Osabe <[email protected]>
Co-authored-by: Kai <[email protected]>
Co-authored-by: OpenClaw Agent <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>

* fix(kimi-coding): normalize anthropic tool payload format

* fix(slack): thread channel ID through inbound context for reactions (#34831)

Slack reaction/thread context routing fixes via canonical synthesis of #34831.

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

* fix(heartbeat): pin HEARTBEAT.md reads to workspace path

* fix(subagents): recover announce cleanup after kill/complete race

* feat(hooks): emit compaction lifecycle hooks (#16788)

* fix(auth): harden openai-codex oauth refresh fallback

* fix(subagents): announce delivery with descendant gating, frozen result refresh, and cron retry (#35080)

Thanks @tyler6204

* fix(agents): avoid synthetic tool-result writes on idle-timeout cleanup

* fix(agent): harden undici stream timeouts for long openai-completions runs

* fix(slack): record app_mention retry key before dedupe check (#37033)

- Prime app_mention retry allowance before dedupe so near-simultaneous message/app_mention races do not drop valid mentions.
- Prevent duplicate dispatch when app_mention wins the race and message prepare later succeeds.
- Prune dispatched mention keys and add regression coverage for both dropped and successful in-flight message outcomes.

Co-authored-by: Tak Hoffman <[email protected]>

* fix(agents): honor explicit rate-limit cooldown probes in fallback runs

* fix(agents): allow configured ollama endpoints without dummy api keys

* fix(memory): recover qmd updates from duplicate document constraints

* Doctor: warn on implicit heartbeat directPolicy (#36789)

* Changelog: note heartbeat directPolicy doctor warning

* Tests: cover heartbeat directPolicy doctor warning

* Doctor: warn on implicit heartbeat directPolicy

* Tests: cover per-agent heartbeat directPolicy warning

* Update CHANGELOG.md

* Plugins: clarify registerHttpHandler migration errors (#36794)

* Changelog: note plugin HTTP route migration diagnostics

* Tests: cover registerHttpHandler migration diagnostics

* Plugins: clarify registerHttpHandler migration errors

* Tests: cover registerHttpHandler diagnostic edge cases

* Plugins: tighten registerHttpHandler migration hint

* fix(memory): repair qmd collection name conflicts during ensure

* fix(memory): handle qmd search results without docid

* Plugins: avoid false integrity drift prompts on unpinned updates (#37179)

* Plugins: skip drift prompts for unpinned updates

* Plugins: cover unpinned integrity update behavior

* Changelog: add #37179 release note

* Delete changelog/fragments directory

* Update CHANGELOG.md

* fix(whatsapp): remove implicit [openclaw] self-chat prefix

* fix: remove config.schema from agent gateway tool (#7382)

Merged via squash.

Prepared head SHA: f34a7780690a941936b31899e2d096b8a07f4afc
Co-authored-by: kakuteki <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* feat(openai): add gpt-5.4 support for API and Codex OAuth (#36590)

* feat(openai): add gpt-5.4 support and priority processing

* feat(openai-codex): add gpt-5.4 oauth support

* fix(openai): preserve provider overrides in gpt-5.4 fallback

* fix(openai-codex): keep xhigh for gpt-5.4 default

* fix(models): preserve configured overrides in list output

* fix(models): close gpt-5.4 integration gaps

* fix(openai): scope service tier to public api

* fix(openai): complete prep followups for gpt-5.4 support (#36590) (thanks @dorukardahan)

---------

Co-authored-by: Tyler Yust <[email protected]>

* fix(tui): preserve credential-like tokens in render sanitization

* CLI: make read-only SecretRef status flows degrade safely (#37023)

* CLI: add read-only SecretRef inspection

* CLI: fix read-only SecretRef status regressions

* CLI: preserve read-only SecretRef status fallbacks

* Docs: document read-only channel inspection hook

* CLI: preserve audit coverage for read-only SecretRefs

* CLI: fix read-only status account selection

* CLI: fix targeted gateway fallback analysis

* CLI: fix Slack HTTP read-only inspection

* CLI: align audit credential status checks

* CLI: restore Telegram read-only fallback semantics

* chore(changelog): update for #37023

Signed-off-by: joshavant <[email protected]>

* fix(agents): disable usage streaming chunks on non-native openai-completions

* feat(nano-banana-pro): add --aspect-ratio flag to generate_image.py (#28159)

* feat(nano-banana-pro): add --aspect-ratio flag to generate_image.py

* Nano Banana: allow all supported aspect ratios

* Docs: expand nano banana aspect ratio options

---------

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

* fix(gateway): support image_url in OpenAI chat completions (#34068)

* fix(gateway): parse image_url in openai chat completions

* test(gateway): cover openai chat completions image_url flows

* docs(changelog): note openai image_url chat completions fix (#17685)

* fix(gateway): harden openai image_url parsing and limits

* test(gateway): add openai image_url regression coverage

* docs(changelog): expand #17685 openai chat completions note

* Gateway: make OpenAI image_url URL fetch opt-in and configurable

* Diagnostics: redact image base64 payload data in trace logs

* Changelog: note OpenAI image_url hardening follow-ups

* Gateway: enforce OpenAI image_url total budget incrementally

* Gateway: scope OpenAI image_url extraction to the active turn

* Update CHANGELOG.md

* fix(agents): avoid xAI web_search tool-name collisions

* fix: clear Telegram DM draft after materialize (#36746) (thanks @joelnishanth)

* Fix Control UI duplicate iMessage replies for internal webchat turns (#36151)

* Auto-reply: avoid routing external replies from internal webchat turns

* Auto-reply tests: cover internal webchat non-routing with external origin metadata

* Changelog: add Control UI iMessage duplicate-reply fix note

* Auto-reply context: track explicit deliver routes

* Gateway chat: mark explicit external deliver routes in context

* Auto-reply: preserve explicit deliver routes for internal webchat turns

* Auto-reply tests: cover explicit deliver routes from internal webchat turns

* Gateway chat tests: assert explicit deliver route context tagging

* fix: enforce 600 perms for cron store and run logs (#36078)

* fix: enforce secure permissions for cron store and run logs

* fix(cron): enforce dir perms and gate posix tests on windows

* Cron store tests: cover existing directory permission hardening

* Cron run-log tests: cover existing directory permission hardening

* Changelog: note cron file permission hardening

---------

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

* fix(tui): accept canonical session-key aliases in chat event routing

* Gateway: normalize OpenAI stream chunk text

* Gateway: coerce chat deliverable route boolean

* fix(web_search): align brave language codes with API

* Respect source channel for agent event surfacing (#36030)

* fix(session): prefer webchat routes for direct ui turns (#37135)

* Gateway: discriminate input sources

* Cron: migrate legacy provider delivery hints

* Cron: stabilize runs-one-shot migration tests

* fix(memory): retry mcporter after Windows EINVAL spawn

* fix(onboarding): guard daemon status probe on headless linux

* Gateway: add path-scoped config schema lookup (#37266)

Merged via squash.

Prepared head SHA: 0c4d187f6fb66f2799d4047585d6368e433c883a
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras

* docs(changelog): add pr entry

* fix(ci): restore protocol and schema checks (#37470)

* Fix failover for zhipuai 1310 Weekly/Monthly Limit Exhausted (#33813)

Merged via squash.

Prepared head SHA: 3dc441e58de48913720cf7b6137fa761758d8344
Co-authored-by: zhouhe-xydt <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Reviewed-by: @altaywtf

* fix(openai-codex-oauth): stop mutating authorize url scopes

* Update CHANGELOG.md

* fix(auth): remove bogus codex oauth responses probe

* docs(changelog): fold codex oauth fix notes

* docs(changelog): add codex oauth pr reference (#37558)

* fix(security:PLA-697): block local secret scratch files from commits

* feat: add dev EKS deployment for openclaw SRE container

* fix: stabilize slack socket mode in dev eks runtime

* fix(eks): reuse monitoring incident auth for openclaw-sre

* feat(deploy): add grafana env guards and prod deploy wrapper

* fix(security): redact tool outputs and enforce secret-safe runtime defaults

* feat(sre): harden heartbeat routing and enrich triage signals

* docs: add SRE hybrid intelligence design

Three-layer architecture to improve bot reasoning quality:
- Layer 1: Service knowledge (auto-discovery + overlays + incident memory)
- Layer 2: Multi-stage reasoning chain (triage → hypothesize → causal chain → action plan → cross-review)
- Layer 3: Incident learning loop (structured cards, overlay suggestions, feedback signals)

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat(sandbox): add boundary cli to common runtime image

* docs(sre): finalize hybrid intelligence design v19 after 18 Codex review rounds

Iteratively hardened the design through 18 adversarial Codex review rounds,
resolving 60+ findings (15+ CRITICAL, 45+ HIGH). Key fixes include:
- Decoupled incident_id (pre-Step11 immutable) from card_id (LLM-derived)
- Unified evidence/memory sanitization via shared _strip_instruction_tokens
- Fixed rerun interval default (3600s > heartbeat 1800s) to prevent every-cycle re-runs
- Added Phase 2 cross-review gap note and dual-column depth table
- Overlay suggestion idempotency via deterministic suggestion_key + upsert
- Decoupled chain timeout from legacy budget check
- Added predicate alignment docs for L3 pre-check vs L3 gate
- Adopted dynamic evidence_completeness denominator matching existing code
- Added scope note clarifying design vs current implementation

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* feat(sre): complete hybrid intelligence rollout and bot hardening

* fix(sre): harden slack reasoning, dual chain, and deploy auth/runtime

* ci: add ecr release pipeline and infra-helm image update trigger

* ci: switch workflows to github-hosted runners

* ci: allow manual ecr env target and use updater v4

* ci: remove windows jobs from workflow

* chore(pla-678): update fallback auth fixture and plan docs

* fix(pla-678): preserve control-ui host-header fallback in dev config

* refactor(pla-678): remove local sre chart and require infra-helm

* refactor(pla-678): remove direct eks deploy scripts

* ci(pla-678): remove labeler workflow

* ci(pla-678): refresh checks after disabling labeler

* build: install boundary CLI in SRE runtime image

* fix(slack:PLA-678): keep one thread lane across users

* fix(sre-skill): enforce live db-query runbook in dev seed

* fix(slack): ignore bot thread history when seeding new sessions

* fix(slack): force retry on repeated thread questions

* fix(sre-skill): require retry on repeated db requests

* docs(sre-skill): make retry policy generic across repeated asks

* fix(sre:PLA-678): enforce live linear ticket updates

* fix(sre:PLA-678): use [PLATFORM] Backlog linear project

* fix(sre:PLA-678): label linked linear tickets as openclaw-sre

* fix(sre:PLA-678): auto-label linked linear tickets for auto-pr

* test(sre:PLA-678): make tracking label test executable

* fix(slack:PLA-678): remove status-final completion banner (#16)

* fix(slack:PLA-678): enable direct file attachments from agent replies (#17)

* fix(slack:PLA-678): remove status-final completion banner

* fix(slack): enable direct file attachments from agent replies

* refactor(sre:PLA-678): remove local deploy config mirror (#18)

* fix: compact oversized auto-generated pr bodies

* fix(sre): add built-in linear incident memory provider

* feat(sre): add erpc helper with flo secret query

* fix(sre): enforce canonical rpc.morpho.dev erpc endpoint

* refactor(sre): remove local deploy config mirror

* fix(slack:PLA-678): force DM replies into per-message threads (#19)

* fix: compact oversized auto-generated pr bodies

* fix(sre): add built-in linear incident memory provider

* feat(sre): add erpc helper with flo secret query

* fix(sre): enforce canonical rpc.morpho.dev erpc endpoint

* refactor(sre): remove local deploy config mirror

* fix(slack): force threaded replies for direct messages

* feat(cron:PLA-678): use conversation history in self-improve runs (#20)

* fix(slack:PLA-678): improve progress update readability (#21)

* fix(ci:PLA-678): restore main release pipeline health (#22)

* fix(ci:PLA-678): restore main release pipeline health

* fix(ci:PLA-678): harden auto-response token fallback

* fix(ci:PLA-678): pin setup-bun to published release

* test(ci:PLA-678): align slack thread session expectations

* fix(sre:PLA-678): harden Slack reply delivery and image release flow (#23)

* fix(slack:PLA-678): harden thread-scoped reply delivery

* fix(slack:PLA-678): satisfy lint after rebase

* ci(release:PLA-678): move image release to cached ecr flow

* ci(release:PLA-678): use official docker build actions

* fix(slack:PLA-722): preserve progress updates during final-answer gating (#24)

* fix(sre:PLA-724): restore ECR runtime image toolchain (#25)

* fix(failover): classify HTTP 402 as rate_limit when payload indicates usage limit (#30484) (#36802)

* fix(failover): classify HTTP 402 as rate_limit when payload indicates usage limit (#30484)

Some providers (notably Anthropic Claude Max plan) surface temporary
usage/rate-limit failures as HTTP 402 instead of 429. Before this change,
all 402s were unconditionally mapped to 'billing', which produced a
misleading 'run out of credits' warning for Max plan users who simply
hit their usage window.

This follows the same pattern introduced for HTTP 400 in #36783: check
the error message for an explicit rate-limit signal before falling back
to the default status-code classification.

- classifyFailoverReasonFromHttpStatus now returns 'rate_limit' for 402
  when isRateLimitErrorMessage matches the payload text
- Added regression tests covering both the rate-limit and billing paths
  on 402

* fix: narrow 402 rate-limit matcher to prevent billing misclassification

The original implementation used isRateLimitErrorMessage(), which matches
phrases like 'quota exceeded' that legitimately appear in billing errors.

This commit replaces it with a narrow, 402-specific matcher that requires
BOTH retry language (try again/retry/temporary/cooldown) AND limit
terminology (usage limit/rate limit/organization usage).

Prevents misclassification of errors like:
'HTTP 402: exceeded quota, please add credits' -> billing (not rate_limit)

Added regression test for the ambiguous case.

---------

Co-authored-by: Val Alexander <[email protected]>

* fix(mattermost): allow reachable interaction callback URLs (#37543)

Merged via squash.

Prepared head SHA: 4d593731be5a5dcbf3106d596b38acfeb8cf0aa8
Co-authored-by: mukhtharcm <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Reviewed-by: @mukhtharcm

* fix(auth): prefer Anthropic API key over stale OAuth profiles

* fix(runtime): raise default agent timeout to one hour

* feat(runtime): support direct env fallback for agent timeout

---------

Signed-off-by: joshavant <[email protected]>
Co-authored-by: Gustavo Madeira Santana <[email protected]>
Co-authored-by: Mariano <[email protected]>
Co-authored-by: leepokai <[email protected]>
Co-authored-by: Bob <[email protected]>
Co-authored-by: Onur <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: huangcj <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Co-authored-by: Sid <[email protected]>
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: shakkernerd <[email protected]>
Co-authored-by: a <[email protected]>
Co-authored-by: echoVic <[email protected]>
Co-authored-by: Shakker <[email protected]>
Co-authored-by: liuxiaopai-ai <[email protected]>
Co-authored-by: Rodrigo Uroz <[email protected]>
Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: jalehman <[email protected]>
Co-authored-by: Kai <[email protected]>
Co-authored-by: RealKai42 <[email protected]>
Co-authored-by: 青雲 <[email protected]>
Co-authored-by: echoVic <[email protected]>
Co-authored-by: Darshil <[email protected]>
Co-authored-by: Ho Lim <[email protected]>
Co-authored-by: dvrshil <[email protected]>
Co-authored-by: Isis Anisoptera <[email protected]>
Co-authored-by: Madoka <[email protected]>
Co-authored-by: Xu Zimo <[email protected]>
Co-authored-by: Munem Hashmi <[email protected]>
Co-authored-by: bmendonca3 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Co-authored-by: Nhj <[email protected]>
Co-authored-by: 倪汉杰0668001185 <[email protected]>
Co-authored-by: zhengquanliu <[email protected]>
Co-authored-by: nick <[email protected]>
Co-authored-by: linhey <[email protected]>
Co-authored-by: scoootscooob <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: rexl2018 <[email protected]>
Co-authored-by: sline <[email protected]>
Co-authored-by: 0xsline <[email protected]>
Co-authored-by: Harold Hunt <[email protected]>
Co-authored-by: Shivam <[email protected]>
Co-authored-by: 不做了睡大觉 <[email protected]>
Co-authored-by: alexyyyander <[email protected]>
Co-authored-by: alexyyyander <[email protected]>
Co-authored-by: Octane0411 <[email protected]>
Co-authored-by: Linux2010 <[email protected]>
Co-authored-by: echoVic <[email protected]>
Co-authored-by: Joseph Turian <[email protected]>
Co-authored-by: turian <[email protected]>
Co-authored-by: mukhtharcm <[email protected]>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Tony Dehnke <[email protected]>
Co-authored-by: Sid-Qin <[email protected]>
Co-authored-by: kevinWangSheng <[email protected]>
Co-authored-by: ningding97 <[email protected]>
Co-authored-by: Naylenv <[email protected]>
Co-authored-by: clawbie <[email protected]>
Co-authored-by: Takhoffman <[email protected]>
Co-authored-by: Ayane <[email protected]>
Co-authored-by: Ayane <[email protected]>
Co-authored-by: StingNing <[email protected]>
Co-authored-by: maweibin <[email protected]>
Co-authored-by: maweibin <[email protected]>
Co-authored-by: Josh Avant <[email protected]>
Co-authored-by: Bin Deng <[email protected]>
Co-authored-by: Byungsker <[email protected]>
Co-authored-by: altaywtf <[email protected]>
Co-authored-by: Altay <[email protected]>
Co-authored-by: jiangnan <[email protected]>
Co-authored-by: jnMetaCode <[email protected]>
Co-authored-by: Jacob Riff <[email protected]>
Co-authored-by: jriff <[email protected]>
Co-authored-by: Naylenv <[email protected]>
Co-authored-by: Bill <[email protected]>
Co-authored-by: 2233admin <[email protected]>
Co-authored-by: 2233admin <[email protected]>
Co-authored-by: littleben <[email protected]>
Co-authored-by: littleben <[email protected]>
Co-authored-by: OpenClaw Agent <[email protected]>
Co-authored-by: Vignesh Natarajan <[email protected]>
Co-authored-by: zerone0x <[email protected]>
Co-authored-by: zerone0x <[email protected]>
Co-authored-by: dunamismax <[email protected]>
Co-authored-by: Octane <[email protected]>
Co-authored-by: Mitsuyuki Osabe <[email protected]>
Co-authored-by: Tak <[email protected]>
Co-authored-by: Tyler Yust <[email protected]>
Co-authored-by: Hinata Kaga (samon) <[email protected]>
Co-authored-by: dorukardahan <[email protected]>
Co-authored-by: Tyler Yust <[email protected]>
Co-authored-by: Brenner Spear <[email protected]>
Co-authored-by: aerelune <[email protected]>
Co-authored-by: Frank Yang <[email protected]>
Co-authored-by: zhouhe-xydt <[email protected]>
Co-authored-by: zhouhe-xydt <[email protected]>
Co-authored-by: Vignesh <[email protected]>
Co-authored-by: OpenClaw SRE Bot <[email protected]>
Co-authored-by: Xinhua Gu <[email protected]>
Co-authored-by: Val Alexander <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram docs Improvements or additions to documentation extensions: acpx size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants