Commit Graph

6825 Commits

Author SHA1 Message Date
bwjoke
f7422e1fbc fix(failover): detect bare leading 402 assistant errors (#47579)
Merged via squash.

Prepared head SHA: ff336a0d97
Co-authored-by: bwjoke <1284814+bwjoke@users.noreply.github.com>
Co-authored-by: altaywtf <9790196+altaywtf@users.noreply.github.com>
Reviewed-by: @altaywtf
2026-04-17 22:06:55 +03:00
Devin Robison
f61896b03c fix(cron): preserve untrusted awareness event labels (#68210)
* fix(cron): preserve untrusted awareness event labels

Keep isolated cron awareness summaries untrusted when they are promoted into the main session, and forward explicit trust downgrades through the gateway cron wrapper. Add focused regression coverage for both paths.

* changelog: note cron awareness untrusted-label preservation (#68210)
2026-04-17 12:43:48 -06:00
Devin Robison
90979d7c3e fix(feishu): resolve card-action chat type before dispatch (#68201)
* fix(feishu): resolve card-action chat type before dispatch

* changelog: resolve card-action chat type before dispatch (#68201)

* address review: prefer chat_mode over chat_type, add error-path tests

- Swap resolution order to check chat_mode (conversation type) before
  chat_type (privacy classification), since Feishu's chat_type can
  return "private" for private group chats which would be wrongly
  classified as p2p.
- Treat "topic" as group semantics in the normalizer.
- Add comment explaining the field semantics and why "private" maps
  to "p2p" (safe-failure direction).
- Add two error-path tests: API returns non-zero code, and API throws.

* map chat_type=public to group in normalizer

Feishu's chat_type can return "public" for public group chats.
Without this mapping the fallback resolver would miss it and default
to p2p, routing a group card action through DM handling.

* address Aisle: cache chat-type lookups and scrub log output

- Add a 30-minute TTL cache for chatId -> chatType so repeated card
  actions on the same chat skip the Feishu API call.
- Strip chatId, event.token, and raw error strings from log messages;
  use err.message instead of String(err) to avoid leaking stack traces
  or HTTP internals from the Feishu SDK.

* prune expired chat-type cache entries

Add pruneChatTypeCache() called on each lookup so expired entries are
evicted and the cache stays bounded in long-running processes.

* address Aisle: scope cache by account, cap size, sanitize logs

- Key cache by accountId:chatId to prevent cross-account contamination.
- Cap cache at 5000 entries and evict oldest when exceeded.
- Sanitize response.msg and err.message with CR/LF stripping and
  length cap before logging to prevent log injection.
2026-04-17 12:29:04 -06:00
Gustavo Madeira Santana
6184f17c91 Twitch: add bundled setup entry (#68008)
Merged via squash.

Prepared head SHA: 59305356a0
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-17 13:49:08 -04:00
Vincent Koc
628e6cd446 docs(changelog): add codex oauth fixes 2026-04-17 10:39:21 -07:00
Gustavo Madeira Santana
9bcf8f8243 Configure: defer channel status until selection (#68007)
Merged via squash.

Prepared head SHA: 24cafcd5fe
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-17 13:34:13 -04:00
Devin Robison
114b87caf2 fix(macos): require trusted SSH host keys (#68199)
* fix(macos): require trusted SSH host keys

* chore(changelog): add macOS SSH strict host-key entry
2026-04-17 11:11:10 -06:00
Chunyue Wang
0b3d876e74 fix(codex): prevent gateway crash when app-server subprocess terminates abruptly (#67947)
Fixes openclaw#67886. Handles stdin EPIPE in CodexAppServerClient by attaching an error handler, guarding writeMessage against writes after close, and aligning closeWithError cleanup with close.
2026-04-17 23:28:37 +08:00
Tak Hoffman
62703d8430 fix(bootstrap): workspace bootstrap prompt routing (#68000)
* fix(bootstrap): workspace bootstrap prompt routing

* Fix bootstrap routing edge cases

* Refine bootstrap mode routing and reset prompts

* Fix bootstrap workspace routing for embedded runs

* Fix embedded bootstrap compile follow-up

* Align bare reset bootstrap file access

* Honor reset override model for bootstrap gating

* Align chat reset bootstrap topology
2026-04-17 10:18:50 -05:00
Val Alexander
f377db1015 feat: add macOS screen snapshots for monitor preview (#67954) thanks @BunsDev
Co-authored-by: Val Alexander <68980965+BunsDev@users.noreply.github.com>
2026-04-17 02:58:21 -05:00
Val Alexander
0b6c39be18 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev
Co-authored-by: Val Alexander <bunsthedev@gmail.com>
2026-04-17 02:48:30 -05:00
J. Tyler Bittner
00951dc9f9 fix(macOS): enable undo/redo in webchat composer text input (#34962)
* fix(macOS): enable undo/redo in webchat composer text input

Set `allowsUndo = true` on ChatComposerNSTextView in makeNSView().
NSTextView defaults allowsUndo to false, which prevented Cmd+Z and
the Edit menu Undo/Redo items from functioning.

Fixes #34898

* fix(macos): enable webchat composer undo/redo (#34962) (thanks @tylerbittner)

---------

Co-authored-by: Nimrod Gutman <nimrod.gutman@gmail.com>
2026-04-17 10:07:20 +03:00
EE
1ce2596195 matrix: fix sessions_spawn --thread subagent session spawning (#67643)
Merged via squash.

Prepared head SHA: 1e5127e217
Co-authored-by: eejohnso-ops <238848106+eejohnso-ops@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-17 02:17:56 -04:00
Ayaan Zaidi
bec52e5f7e fix: clear compaction replay after visible boundaries (#67993) 2026-04-17 11:18:22 +05:30
Ayaan Zaidi
671579663b fix: preserve post-stream error payloads (#67991)
* fix(reply): preserve post-stream error payloads

* fix: preserve post-stream error payloads (#67991)
2026-04-17 11:11:37 +05:30
Rubén Cuevas
7b0e950e09 fix: dedupe degraded sqlite-vec warnings (#67898) (thanks @rubencu)
* Agents: dedupe bootstrap truncation warnings

* Memory: dedupe sqlite-vec degradation warnings

* Memory: align degraded vector warning

* test(memory-core): remove stale vector warning arg

* fix(memory-core): reset degraded warning on vector reset

* fix(memory-core): preserve warning latch across reindex rollback

* fix: dedupe degraded sqlite-vec warnings (#67898) (thanks @rubencu)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-17 11:09:14 +05:30
Chinar Amrutkar
8205de84a9 fix: clear stale telegram ACP bindings on startup (#67822) (thanks @chinar-amrutkar)
* fix(telegram): clean up thread bindings to stale/failed ACP sessions on startup

When loading persisted thread bindings on manager creation, validate each
ACP session against the session store. Remove bindings where:
- Session entry doesn't exist (deleted externally)
- Session status is failed/killed/timeout
- ACP runtime state is 'error'

This addresses issue #60102 where Telegram DMs remained routed to stale
ACP sessions even after restart, because the binding file persisted
across restarts without validating the target session was still valid.

* fix(telegram): guard against null session entry and transient store read failures

Address review comments on PR #67822:

1. Skip bindings when readAcpSessionEntry returns null or when
   session store is temporarily unreadable (storeReadFailed: true).
   Without this, a transient I/O error would mark all ACP bindings
   as stale and delete them on every startup.

2. Only set needsPersist when bindings were actually removed.
   Previously, stale session keys from OTHER accounts could set
   needsPersist=true even when zero bindings were removed for
   the current account — causing spurious disk writes.

Also clean up redundant optional chaining on entry.status now
that we guard against undefined/nullable sessionEntry.

* perf(telegram): dedupe ACP session reads in startup cleanup

Cache readAcpSessionEntry calls by targetSessionKey. Multiple bindings
to the same ACP session now result in a single session store read instead
of one read per binding.

Addresses chatgpt-codex-connector P2 review comment on PR #67822.

* fix(telegram): skip non-ACP session keys in stale binding cleanup

Address chatgpt-codex-connector P1 review comment on PR #67822:

Plugin-bound Telegram conversations use "plugin-binding:*" keys
with targetKind === "acp", but these are NOT ACP runtime sessions.
readAcpSessionEntry() returns no entry for them, so !sessionEntry.entry
would classify them as stale and delete them on every startup.

Now checks isAcpSessionKey(binding.targetSessionKey) to skip plugin-bound
sessions from the stale session cleanup scan.

Also clarifies the comment to explain why we use targetKind === "acp"
// together with isAcpSessionKey() check.

* fix(telegram): import isAcpSessionKey from sessions/session-key-utils

isAcpSessionKey is not re-exported from openclaw/plugin-sdk/routing.
Fix import to use the correct subpath: openclaw/sessions/session-key-utils.

Addresses chatgpt-codex-connector P1 review comment on PR #67822.

* fix(telegram): import from relative path, remove unused variable

- Import isAcpSessionKey from relative path ../../sessions/session-key-utils.js
  (not openclaw/sessions/session-key-utils which doesn't exist)
- Remove unused 'bindings' variable in for-of loop

Addresses CI failures on PR #67822.

* fix(telegram): export isAcpSessionKey from plugin-sdk/routing

isAcpSessionKey lives in src/routing/session-key.ts, which is already
exported via openclaw/plugin-sdk/routing. Re-export it from routing.ts
so extensions can import via the public plugin-sdk path.

Fixes chatgpt-codex-connector P1: relative path ../../sessions/session-key-utils.js
doesn't exist in the build output, making the Telegram extension fail
module resolution before startup cleanup can run.

* test(telegram): cover startup ACP binding cleanup

* fix: clear stale telegram ACP bindings on startup (#67822) (thanks @chinar-amrutkar)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-17 11:03:36 +05:30
Rubén Cuevas
c65f356ddc fix: keep telegram transient preview across compaction retry (#66939) (thanks @rubencu)
* fix(telegram): keep transient previews across compaction

* test(telegram): cover suppressed approval previews after compaction

* fix(telegram): preserve delayed message-start boundaries

* fix: keep telegram transient preview across compaction retry (#66939) (thanks @rubencu)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-17 10:57:46 +05:30
Ayaan Zaidi
3fe8b24c4e fix: note plugin registration rollback in changelog (#67941) 2026-04-17 10:14:00 +05:30
Ayaan Zaidi
6b45ba88a1 fix: reuse shared plugin discovery cache across workspaces (#67940) 2026-04-17 08:54:58 +05:30
chaoliang yan
35fb3f7e1c fix: preserve models.json baseUrls on regen (#67893) (thanks @lawrence3699)
* models-config: preserve existing models.json baseUrls

* test: distill models-config baseUrl regression test

* fix: preserve models.json baseUrls on regen (#67893) (thanks @lawrence3699)

---------

Co-authored-by: lawrence3699 <lawrence3699@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-17 08:32:35 +05:30
chaoliang yan
a189394590 fix: guard WhatsApp setup prompt values (#67895) (thanks @lawrence3699)
* fix(whatsapp): guard setup prompt values

* fix(whatsapp): preserve allowFrom invalid input details

* fix: guard WhatsApp setup prompt values (#67895) (thanks @lawrence3699)

---------

Co-authored-by: lawrence3699 <lawrence3699@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-17 08:12:55 +05:30
Ayaan Zaidi
685f9903ec fix: unify responses api capability detection (#67918)
* fix: unify responses api capability detection

* fix: unify responses api capability detection (#67918)
2026-04-17 08:03:19 +05:30
Peter Steinberger
992ff81ae1 docs: consolidate 2026.4.15 changelog 2026-04-17 00:17:24 +01:00
B.K.
6878c19449 fix(onboard): preserve existing gateway auth token during re-onboard (#67821)
Merged via squash.

Prepared head SHA: e602f8f4ab
Co-authored-by: BKF-Gitty <263413630+BKF-Gitty@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-04-16 19:11:12 -04:00
Peter Steinberger
041266a669 chore: prepare 2026.4.15 release 2026-04-16 22:45:32 +01:00
Josh Lehman
80e78f7b90 docs: unify duplicated 2026.4.15-beta.1 changelog block (#67827)
* docs: unify duplicated 2026.4.15-beta.1 changelog block

* docs: remove beta.2 duplicates from beta.1 changelog

* docs: restore preserved beta.1 changelog entries
2026-04-16 14:35:54 -07:00
Peter Steinberger
5262757f9a fix: handle Codex HTML challenge errors (#67704) (thanks @chris-yyau) 2026-04-16 12:47:12 -07:00
Peter Steinberger
c635efd233 chore: prepare 2026.4.15-beta.2 release 2026-04-16 19:58:08 +01:00
Josh Lehman
a327b6750d fix: stabilize context engine prompt cache touches (#67767)
* fix: stabilize context engine prompt cache touches

* fix(changelog): document context-engine prompt cache touch stabilization
2026-04-16 11:53:42 -07:00
zqchris
82e349a48a memory: strip inbound metadata envelopes from user messages in session corpus (#66548)
Merged via squash.

Prepared head SHA: 98562b2a84
Co-authored-by: zqchris <4436110+zqchris@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-16 11:15:44 -07:00
Daniel Salmerón Amselem
687ede50a5 fix(agents): add prompt cache compatibility opt-out
Add compat.supportsPromptCacheKey for OpenAI Responses prompt_cache_key handling, update generated config baseline, changelog, and A2UI dependency-layout test compatibility.
2026-04-16 10:48:51 -07:00
Peter Steinberger
b31d243c57 fix: stabilize skills prompt ordering (#64198) (thanks @Bartok9) 2026-04-16 10:28:22 -07:00
Omar Shahine
77d9fd693f fix(bluebubbles): restore inbound image attachments and accept updated-message events (#67510)
* fix(bluebubbles): restore inbound image attachments and accept updated-message events

Four interconnected fixes for BlueBubbles inbound media:

1. Strip bundled-undici dispatcher from non-SSRF fetch path so attachment
   downloads no longer silently fail on Node 22+ (#64105, #61861)

2. Accept updated-message webhook events that carry attachments instead of
   filtering them as non-reaction events (#65430)

3. Include eventType in the persistent GUID dedup key so updated-message
   follow-ups are not rejected as duplicates of the original new-message (#52277)

4. Retry attachment fetch from BB API (2s delay) when the initial webhook
   arrives with an empty attachments array — image-only messages and
   updated-message events only (#67437)

Closes #64105, closes #61861, closes #65430.

* fix(bluebubbles): resolve review findings — SSRF policy, reuse extractAttachments, add tests

- F1 (BLOCKER): pass undefined instead of {} for SSRF policy when
  allowPrivateNetwork is false, so localhost BB servers are not blocked.
- F2 (IMPORTANT): reuse exported extractAttachments() from monitor-normalize
  instead of duplicating field extraction logic.
- F3 (IMPORTANT): simplify asRecord(asRecord(payload)?.data) to
  asRecord(payload.data) since payload is already Record<string, unknown>.
- F4 (NIT): bind retryMessageId before the guard to eliminate non-null assertion.
- F5 (IMPORTANT): add 4 tests for fetchBlueBubblesMessageAttachments covering
  success, non-ok HTTP, empty data, and guid-less entries.
- Add CHANGELOG entry for the user-facing fix.

* fix(ci): update raw-fetch allowlist line number after dispatcher strip

* fix(bluebubbles): resolve PR review findings (#67510)

- monitor-processing: move attachment retry into the !rawBody guard so
  image-only new-message events that arrive with empty attachments and
  empty text are recovered via a BB API refetch before being dropped.
  The existing retry block at the end of processMessageAfterDedupe was
  unreachable for this case because the !rawBody early-return fired
  first. (Greptile)
- monitor: derive isAttachmentUpdate from the normalized message shape
  instead of raw payload.data.attachments so updated-message webhooks
  with attachments under wrapper formats (payload.message, JSON-string
  payloads) are correctly routed through for processing instead of
  silently filtered. (Codex)
- types: use bundled-undici fetch when init.dispatcher is present so
  the SSRF guard's DNS-pinning dispatcher is preserved when this
  function is called as fetchImpl from guarded callers (e.g. the
  attachment download path via fetchRemoteMedia). Falls back to
  globalThis.fetch when no dispatcher is present so tests that stub
  globalThis.fetch keep working. (Codex)
- attachments: blueBubblesPolicy returns undefined for the non-private
  case (matching monitor-processing's helper) so sendBlueBubblesAttachment
  stops routing localhost BB through the SSRF guard. (Greptile)
- scripts/check-no-raw-channel-fetch: bump the types.ts allowlist line
  to match the restructured non-SSRF branch.

* fix(bluebubbles): move attachment retry before rawBody guard, fix stale log

Move the attachment retry block (2s BB API refetch for empty attachments)
before the !rawBody early-return guard. Previously, image-only messages
with text='' and attachments=[] would be dropped by the !rawBody check
before the retry could fire, making fix #4 dead code for its primary
use-case. Now the retry runs first and recomputes the placeholder from
resolved attachments so rawBody becomes non-empty when media is found.

Also fix stale log message that still said 'without reaction' after the
filter was expanded to pass through attachment updates.

* fix(bluebubbles): revert undici import, restore dispatcher-strip approach

Revert the @claude bot's undici import in types.ts — it introduced a
direct 'undici' dependency that is not declared in the BB extension's
package.json and would break isolated plugin installs. Restore the
original dispatcher-strip approach which is correct: the SSRF guard
already completed validation upstream before calling this function as
fetchImpl, so stripping the dispatcher does not weaken security.

* fix(bluebubbles): remove dead empty-body recovery block in !rawBody guard

The empty-body attachment-recovery block added in the earlier PR revision
is now redundant because the main retry block was moved above the rawBody
computation in 0d7d1c4208. Worse, that leftover block reassigned the
(now-const) placeholder variable, throwing `TypeError: Assignment to
constant variable` at runtime for image-only messages — breaking the very
recovery path it was meant to protect (flagged by Codex on 4bfc2777).

Remove the dead block; the up-front retry already handles the image-only
case by recovering attachments before the rawBody computation, so once we
reach the !rawBody guard with an empty body it is genuinely empty and
should drop as before.

* fix(ci): update raw-fetch allowlist line after dispatcher-strip revert

279dba17d2 reverted types.ts back to the dispatcher-strip approach,
which put the `fetch(url, ...)` call at line 189 instead of line 198.
Bump the allowlist entry to match so `lint:tmp:no-raw-channel-fetch`
stops failing check-additional.

* test(pdf-tool): update stale opus-4-6 constant to opus-4-7

`628b454eff feat: default Anthropic to Opus 4.7` bumped the bundled
anthropic image default to `claude-opus-4-7` but missed updating the
`ANTHROPIC_PDF_MODEL` constant in pdf-tool.model-config.test.ts. The
tests now fail on any PR that runs the `checks-node-agentic-agents-plugins`
shard because the resolver returns 4-7 while the test asserts 4-6.

Bump the constant to 4-7 to match the bundled default.

---------

Co-authored-by: Lobster <10343873+omarshahine@users.noreply.github.com>
2026-04-16 10:04:20 -07:00
Peter Steinberger
6429fa0a7f test: keep prompt cache PR gate green 2026-04-16 09:41:26 -07:00
Peter Steinberger
1183832d4f fix: pin codex resume sandbox override 2026-04-16 17:31:41 +01:00
Peter Steinberger
d842ec4179 fix: tighten delivery mirror dedupe (#67185) (thanks @andyylin) 2026-04-16 09:20:01 -07:00
Peter Steinberger
86f108401b fix: share agent harness runtime activation (#67474) 2026-04-16 09:06:45 -07:00
Ayaan Zaidi
16c608e393 fix: harden cron announce NO_REPLY suppression (#65016) (thanks @BKF-Gitty) 2026-04-16 21:36:43 +05:30
Peter Steinberger
99dfc1b616 docs: add changelog for Codex Desktop user agents (#64666) (thanks @cyrusaf) 2026-04-16 08:56:56 -07:00
Gustavo Madeira Santana
d74533c718 Docs: remove QA Matrix changelog entry 2026-04-16 11:42:33 -04:00
Peter Steinberger
461d0050d9 fix: keep codex resume runs non-interactive (#67666) (thanks @plgonzalezrx8) 2026-04-16 08:41:57 -07:00
Peter Steinberger
628b454eff feat: default Anthropic to Opus 4.7 2026-04-16 16:12:06 +01:00
tmimmanuel
29919bb6e4 fix: land node-host approval binding for native binaries (#66731) (thanks @tmimmanuel)
* fix(node-host): allow absolute-path native binaries through approval binder

* test(node-host): cover binary binder edge cases

* test(node-host): use stable native binary fixture

* fix(ci): restore fail-closed race handling

* refactor(node-host): distill approval binding regressions

* fix(node-host): fail closed on unknown shell payload headers

* fix: land node-host approval binding for native binaries (#66731) (thanks @tmimmanuel)

* fix: keep relative shell binary payloads fail-closed (#66731) (thanks @tmimmanuel)

* fix: keep shell binary bypass on stable paths only (#66731) (thanks @tmimmanuel)

* fix: fail closed on symlinked shell binary targets (#66731) (thanks @tmimmanuel)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-16 20:30:09 +05:30
Chunyue Wang
8c11210fe5 fix(gateway): capture config hash after plugin auto-enable to prevent restart loop (#67557)
Merged via squash.

Prepared head SHA: 07250958a7
Co-authored-by: openperf <80630709+openperf@users.noreply.github.com>
Co-authored-by: openperf <80630709+openperf@users.noreply.github.com>
Reviewed-by: @openperf
2026-04-16 21:18:24 +08:00
stain lu
c3c7a9953f fix: repair sanitized replay tool results before send (#67620) (thanks @stainlu)
* fix(agents): preserve native Anthropic tool IDs for hybrid providers

Fixes #66892

MiniMax and other hybrid providers use api.minimaxi.com/anthropic
(modelApi: anthropic-messages), which generates and expects native
Anthropic tool_call_ids in toolu_* format. The hybrid replay policy
(buildHybridAnthropicOrOpenAIReplayPolicy) applied strict
sanitization that stripped underscores from these IDs, causing
MiniMax to reject them with error 2013.

The native Anthropic provider already preserved these IDs via
preserveNativeAnthropicToolUseIds (added in 4613f121ad). This
commit enables the same flag for the hybrid anthropic-messages
branch, so toolu_* IDs pass through unsanitized while other
synthetic IDs still get strict cleanup.

* fix(agents): repair sanitized replay tool results before send

* fix: repair sanitized replay tool results before send (#67620) (thanks @stainlu)

* fix: preserve aborted-span tool results during replay sanitize (#67620) (thanks @stainlu)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-16 18:38:57 +05:30
Xan Torres
b555214c96 Extensions/lmstudio: back off inference preload after consecutive failures 2026-04-16 18:31:56 +05:30
Xan Torres
f44ab20d4d TUI/streaming: add watchdog that resets the activity indicator after delta silence 2026-04-16 18:31:56 +05:30
Xan Torres
36ed36768c Agents/tool-loop: enable unknown-tool stream guard by default 2026-04-16 18:31:56 +05:30
Xan Torres
b23d59a522 Gateway/skills: invalidate session skills snapshot on config write 2026-04-16 18:31:56 +05:30