Commit Graph

8694 Commits

Author SHA1 Message Date
Alex Knight
8a060b2904 Release embedded session write lock before model I/O (#82891)
Summary:
- The PR narrows embedded PI session transcript write-lock scope, adds stale/max-hold config plumbing, and updates affected transcript, doctor, gateway, SDK, Codex mirroring, docs, and regression-test surfaces.
- Reproducibility: yes. Current main source still holds the embedded session write lock from early attempt set ... cksmith Testbox contention proof on unmodified main; I did not rerun the live repro in this read-only pass.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(agents): narrow context engine session lock
- PR branch already contained follow-up commit before automerge: fix session lock runner build types
- PR branch already contained follow-up commit before automerge: Release embedded session write lock before model I/O
- PR branch already contained follow-up commit before automerge: fix(clawsweeper): address review for automerge-openclaw-openclaw-8289…

Validation:
- ClawSweeper review passed for head 4c6dd7ed6e.
- Required merge gates passed before the squash merge.

Prepared head SHA: 4c6dd7ed6e
Review: https://github.com/openclaw/openclaw/pull/82891#issuecomment-4469282923

Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-17 11:54:03 +00:00
Jerry-Xin
3e9e1d6321 fix: route subagent announce to originating parent session instead of channel-bound peer session (#80242)
* fix: route subagent announce to originating parent session instead of channel-bound peer session

When a subagent is spawned from agent:main:main while a Telegram DM is active,
the completion announce was delivered to the parallel Telegram channel session
instead of the originating parent.

Two interacting bugs:

1. The spawn tool received the sandbox/policy session key (Telegram peer key)
   as the requester, instead of the real run session key. Fixed by passing
   runSessionKey to createSessionsSpawnTool so the registered requester
   points to the actual parent session.

2. resolveSubagentCompletionOrigin checked child session bindings before
   requester bindings. When both share the same channel+accountId (common
   for Telegram DMs), the child binding hijacked the delivery target.
   Fixed by checking requester binding first, with child as fallback.

Fixes #80201

* fix: drop subagent_announce from mediated completion set

The subagent_announce addition to AGENT_MEDIATED_COMPLETION_TOOLS was
unrelated to the routing fix and could cause group/channel completions
to fail silently when the subagent does not use the message tool.

This should be addressed separately with proper message-tool-only
guidance (tracked in #80223).

* fix: separate sandbox policy from completion owner in sessions_spawn

PR #80242 passed runSessionKey as agentSessionKey to createSessionsSpawnTool,
which caused spawnSubagentDirect to use the run session key for sandbox policy
checks (resolveSandboxRuntimeStatus). This could make a sandboxed channel run
appear unsandboxed.

Introduce completionOwnerKey as a separate field that is only used for
registerSubagentRun routing (requesterSessionKey), keeping agentSessionKey
for sandbox enforcement, callerDepth, activeChildren, and all other policy
checks.

* fix(agents): preserve subagent ownership routing

---------

Co-authored-by: 忻役 <xinyi@mininglamp.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-17 12:17:51 +01:00
Kaspre
69a0c925b8 fix(codex): cover side-question native hooks (#82559)
* fix(codex): cover side-question native hooks

* fix(codex): enforce native approvals for app-server requests

* fix(codex): preserve approval fallback after native relay noop

* fix(codex): satisfy approval relay json typing

* fix(codex): run approval relay in report mode

* fix(codex): keep relay pre-tool decisions deny-only

* fix(codex): remove dead relay approval branch

* fix(codex): dedupe app-server relay approvals

* fix(codex): fail closed on native relay rewrites

* fix(codex): preserve side-question provider context

* fix(codex): route side-question replies to origin

* fix(codex): preserve native hook channel context

* test(codex): align native relay rewrite assertion

* fix(codex): align side-question hook config

* fix(codex): route side-question approvals safely

* test(codex): fix side-question hook typing

* fix(codex): preserve side-question hook policy context

* fix(codex): close native hook relay review gaps

* fix(codex): keep dynamic tool hook channel context

* fix(codex): preserve native finalize hook channel context

* fix(codex): scope dynamic tool result hooks by channel

* fix(codex): drop stale deadcode allowlist entry

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-17 12:02:17 +01:00
Peter Steinberger
ee492092a7 fix: yield responses streams to abort timers 2026-05-17 11:53:48 +01:00
Peter Steinberger
9feca3e11e fix: stabilize release validation gates 2026-05-17 11:24:01 +01:00
Josh Avant
903d9c13f3 Fix subagent completion announce delivery timing (#83039)
* fix subagent announce transcript delivery

* chore changelog for subagent announce delivery

* test align subagent retry suspension expectation
2026-05-17 04:59:58 -05:00
Peter Steinberger
0177a4b6c9 fix(gateway): speed up secrets startup
Summary:
- Split the lightweight secrets runtime state and auth-store cache from the full secrets runtime.
- Use the startup fast path whenever gateway startup has no SecretRef values, while preserving cleanup and refresh semantics.
- Add regression coverage for startup-only empty auth-store snapshots and update affected gateway/tool tests.

Verification:
- pnpm test src/secrets/runtime.fast-path.test.ts src/secrets/runtime-state.test.ts src/gateway/server-startup-config.secrets.test.ts src/gateway/server-import-boundary.test.ts src/gateway/server-aux-handlers.test.ts src/gateway/server-methods/config.shared-auth.test.ts src/agents/tools/web-tools.enabled-defaults.test.ts src/agents/tools/web-tool-runtime-context.test.ts -- --reporter=verbose
- pnpm build
- pnpm format:check -- src/agents/tools/web-tools.enabled-defaults.test.ts src/secrets/runtime-command-secrets.ts src/secrets/runtime-fast-path.ts src/secrets/runtime.fast-path.test.ts src/agents/auth-profiles/store.ts src/agents/auth-profiles/store-cache.ts src/secrets/runtime-state.ts src/secrets/runtime-state.test.ts src/gateway/server-startup-config.ts
- codex-review --mode branch
- isolated gateway token-auth smoke: openclaw gateway run + openclaw gateway health returned ok: true
- GitHub CI on PR #83031 green; newer Real behavior proof run passed on current SHA f27ed3f7ce.

Co-authored-by: samzong <samzong.lu@gmail.com>
2026-05-17 10:55:41 +01:00
Josh Avant
f29bcff4da fix(models): reuse plugin metadata snapshot (#83033)
* fix(models): reuse plugin metadata snapshot

* docs: add models performance changelog

* test: satisfy models metadata fixture types
2026-05-17 04:51:59 -05:00
Peter Steinberger
2df393886a test: align cron schema description assertions 2026-05-17 10:34:20 +01:00
Peter Steinberger
9b698ce0d6 refactor: shorten agent tool descriptions 2026-05-17 10:34:20 +01:00
Vincent Koc
a4bea46a35 fix(codex): preserve nested tool-result middleware output 2026-05-17 17:30:58 +08:00
Vincent Koc
37dcf385e5 fix(qa): expose codex tools for runtime parity 2026-05-17 17:20:12 +08:00
Josh Avant
8ba2dfa76a Fix message tool session-key route drift (#83004)
* fix message tool session-key route drift

* docs changelog for message tool session-key route
2026-05-17 03:36:14 -05:00
Peter Steinberger
69d588cf2a fix(openai): remove GPT reply brevity cap 2026-05-17 09:29:11 +01:00
Josh Avant
022723829a fix(agents): preserve suspended subagent final deliveries (#82999)
* fix: preserve suspended subagent final deliveries

* chore: update changelog for subagent delivery fix

* test: use valid killed subagent outcome fixture
2026-05-17 03:23:15 -05:00
Vincent Koc
3918d69587 fix(agents): skip malformed transcript state entries (#82624)
* fix(agents): skip malformed transcript state entries

* fix(agents): preserve repairable transcript tool calls

* fix(agents): preserve openclaw transcript content blocks

* fix(agents): preserve string tool call arguments

* fix(agents): keep repaired compaction markers on branch

* fix(agents): keep legacy assistant transcript text

* fix(agents): preserve null tool call arguments

* fix(agents): keep transcript repair chains

* fix(agents): drop labels for rejected transcript rows

* fix(agents): preserve legacy transcript compaction indexes

* fix(agents): drop unresolved transcript repair parents
2026-05-17 16:18:23 +08:00
Peter Steinberger
a985c99059 fix: steer song requests to music generation 2026-05-17 08:57:27 +01:00
Peter Steinberger
5d1f7bf058 fix: route image URL describes through MiniMax VLM
Summary:
- Preserve HTTP image describe inputs as remote media.
- Route MiniMax CN image understanding through MiniMax-VL-01.
- Cover CLI, media runtime, tools, Telegram stickers, docs, and changelog.

Verification:
- codex-review clean
- pnpm check:changed via Blacksmith Testbox tbx_01krtdekwak0mygxbw5z7cfb6z
- PR CI green on 516281448e
2026-05-17 08:45:50 +01:00
Peter Steinberger
9a36e897be fix: surface async media generation failures 2026-05-17 08:40:33 +01:00
Evgeny Yurchenko
592aae3696 fix: avoid idle Codex hook relay subprocesses
Avoid installing Codex native PostToolUse/Stop hook relays when OpenClaw has no matching local handlers. This keeps pre-tool safety and permission approval relays active while removing idle no-op subprocess fan-out.

Fixes #76552.

Co-authored-by: evgyur <evgyur@users.noreply.github.com>
2026-05-17 08:17:51 +01:00
Galin Iliev
a656f887c8 fix: satisfy OpenAI tool payload lint 2026-05-17 06:30:50 +00:00
Galin Iliev
afdb8705e9 fix: stabilize OpenAI tool payload ordering 2026-05-17 06:30:49 +00:00
Galin Iliev
aca258a8a9 fix: explain memory compaction tool allowlist warnings
Fixes #82941.
2026-05-16 23:25:00 -07:00
Peter Steinberger
aaadf721e3 fix(agents): classify ACP no-output stalls 2026-05-17 07:23:41 +01:00
Josh Avant
9a063e38d1 Fix TTS supplement delivery across live previews (#82935)
* fix: avoid duplicated tts supplement replies

* chore: add changelog for tts supplement fix
2026-05-17 01:15:12 -05:00
Zavian Wang
9a11e76458 fix(plugins): surface configured runtime plugin doctor warnings (#81674)
Fixes #81326.

Summary:
- Warn from `openclaw plugins doctor` when configured runtime owner plugins are missing, disabled, or blocked.
- Share configured-runtime plugin install mapping with `openclaw doctor --fix`, including ACP/acpx.
- Keep implicit OpenAI Codex preferences quiet to avoid false-positive plugin doctor warnings.

Verification:
- `pnpm test src/agents/harness-runtimes.test.ts src/cli/plugins-cli.list.test.ts src/commands/doctor/shared/missing-configured-plugin-install.test.ts -- --reporter=verbose`
- `pnpm exec oxfmt --check CHANGELOG.md src/agents/harness-runtimes.ts src/agents/harness-runtimes.test.ts src/cli/plugins-cli.runtime.ts src/cli/plugins-cli.list.test.ts src/commands/doctor/shared/configured-runtime-plugin-installs.ts src/commands/doctor/shared/missing-configured-plugin-install.ts`
- `pnpm build:plugin-sdk:dts`
- `codex-review --mode branch`
- Testbox-through-Crabbox `pnpm check:changed`: provider `blacksmith-testbox`, id `tbx_01krt8vte22m7ht6wfss4jkeaa`, Actions run https://github.com/openclaw/openclaw/actions/runs/25983150787, exit 0

Co-authored-by: Zavian Wang <36817799+Zavianx@users.noreply.github.com>
2026-05-17 07:13:55 +01:00
ragesaq
58f1db1bc8 Fix OpenAI Codex runtime provider routing (#82864)
* fix: route Codex OpenAI runtime through Codex provider

* docs: add Codex routing evidence collection

* fix(agents): bootstrap OAuth credentials for Codex harness with openai/* model refs

When a plugin harness (e.g. Codex) owns its transport but the runtime
plan resolved to openai-codex via agentRuntime.id: codex, the auth
profile store was left empty because pluginHarnessOwnsTransport short-
circuited initializeAuthProfile(). This caused 'No API key found for
openai-codex' at runtime even though the OAuth profile existed in OpenClaw's
store.

- Add pluginHarnessNeedsOpenClawAuthBootstrap flag when harness owns
transport but the provider is openai-codex and the API is openai-codex-
responses
- Populate authStore and attemptAuthProfileStore from OpenClaw's profile
store in this case
- Run initializeAuthProfile() to forward the OAuth token into the harness
- Update overflow-compaction tests to expect 'openai-codex' provider
  and add dedicated test for OAuth bootstrap path

* fix(agents): refresh Codex OAuth credentials on profile rotation

---------

Co-authored-by: PsiClawOps <267826480+PsiClawOps@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-17 07:06:18 +01:00
Peter Steinberger
71b79f008d fix: sanitize Codex image payload replay (#82931) 2026-05-17 06:42:21 +01:00
Gio Della-Libera
b7f3d01633 fix(mcp): inline local refs in bundled tool schemas (#81238) 2026-05-16 22:41:11 -07:00
Gio Della-Libera
5817e478d1 fix(agents): clear poisoned claude cli sessions (#81247) 2026-05-16 22:25:09 -07:00
Peter Steinberger
3fad770510 fix: update PI runtime packages 2026-05-17 06:12:09 +01:00
Josh Avant
422a1374e0 Fix silent success for non-deliverable Bedrock Telegram turns (#82905)
* fix: handle non-deliverable terminal turns

* chore: add changelog for non-deliverable turns

* fix: align telegram message cache types
2026-05-16 23:57:52 -05:00
Josh Avant
7d1317634e fix(agents): use current assistant final payloads (#82850) 2026-05-16 23:20:43 -05:00
Peter Steinberger
5d81c29cc4 fix: reconcile subagent wait timeouts
Fixes #82787 by keeping session-backed parent subagent runs active when agent.wait only hits a poll timeout before the child session settles. Refactors terminal session-store reconciliation into a shared helper and rejects stale terminal rows from reused child sessions.

Verification:
- CodexReview clean
- pnpm test src/agents/subagent-registry.test.ts src/agents/subagent-registry.lifecycle-retry-grace.e2e.test.ts src/agents/openclaw-tools.subagents.sessions-spawn.lifecycle.test.ts -- --reporter=dot
- git diff --check
- pnpm check:changed via Blacksmith Testbox tbx_01krt1rxpkb7vj53mkaqwfserq
- GitHub CI/CodeQL/OpenGrep/Workflow Sanity green; proof gate covered by maintainer proof: override label
2026-05-17 05:16:36 +01:00
Peter Steinberger
06e85d5eaf fix: honor explicit message tool allowlists (#82889) 2026-05-17 05:11:49 +01:00
Galin Iliev
91ae1a6c03 fix(agents): split embedded attempt dispatch timing
Split embedded-run startup diagnostics into attempt-workspace, attempt-prompt, attempt-runtime-plan, and final attempt-dispatch subspans. Adds focused timing formatter coverage and a changelog entry. Fixes #82782.
2026-05-16 20:44:24 -07:00
Alex Knight
9bb4d1377a Fix brew-only skill installs in Docker (#82845)
Summary:
- The branch hides brew-only skill dependency installers during Linux-container onboarding when Homebrew is unavailable, adds container-specific missing-brew guidance, and updates docs, tests, i18n, and changelog text.
- Reproducibility: yes. Current main source inspection shows onboarding can offer a brew-only missing skill su ... ric missing-brew failure; the PR body also includes Testbox container output for before and after behavior.

Automerge notes:
- No ClawSweeper repair was needed after automerge opt-in.

Validation:
- ClawSweeper review passed for head a4842f3a7d.
- Required merge gates passed before the squash merge.

Prepared head SHA: a4842f3a7d
Review: https://github.com/openclaw/openclaw/pull/82845#issuecomment-4468958593

Co-authored-by: Alex Knight <15041791+amknight@users.noreply.github.com>
2026-05-17 03:37:51 +00:00
Peter Steinberger
b29152e3b9 fix(cron): track claimed reply hooks as execution 2026-05-17 04:12:40 +01:00
Peter Steinberger
d887eb8dc2 fix(agents): harden subagent completion delivery
Co-authored-by: Galin Iliev <galini@microsoft.com>
Co-authored-by: Ava Daigo <theavadaigo@gmail.com>
Co-authored-by: Moeed Ahmed <moeedahmed@users.noreply.github.com>
2026-05-17 03:48:25 +01:00
Peter Steinberger
524185a68e fix(exec): bind approval trust to realpaths (#82825) 2026-05-17 03:41:50 +01:00
Youssef Hemimy
94ed68bc76 fix(whatsapp): honor forceDocument flag end-to-end (#79272)
Merged via squash.

Prepared head SHA: faaff35f1e
Co-authored-by: itsuzef <53057646+itsuzef@users.noreply.github.com>
Co-authored-by: mcaxtr <7562095+mcaxtr@users.noreply.github.com>
Reviewed-by: @mcaxtr
2026-05-16 23:29:01 -03:00
Peter Steinberger
ab595dec0f fix: normalize malformed assistant replay content (#82748) 2026-05-17 03:26:04 +01:00
IWhatsskill
ad8ae05f37 fix(agents): normalize malformed assistant content 2026-05-17 03:26:04 +01:00
Peter Steinberger
1896f8a330 fix: resolve installed plugin facade dist surfaces 2026-05-17 03:25:42 +01:00
gleb
9f112a1a7a fix: include checked credential source in missing auth errors
Include the checked credential source in missing API key errors so users can see which env var, profile, or config path to fix.

Fixes #82785.

Co-authored-by: gleb <116607327+loeclos@users.noreply.github.com>
2026-05-17 03:21:57 +01:00
Gio Della-Libera
6821fbcfba Clarify MEMORY guidance over generic TTS hints (#81930) 2026-05-16 19:21:24 -07:00
Peter Steinberger
2a7f9f3546 fix: avoid Copilot replay item ID collisions 2026-05-17 02:43:44 +01:00
Vincent Koc
d350ac3feb test: use platform spy helpers 2026-05-17 09:24:42 +08:00
Peter Steinberger
7ee5fe011b refactor(agents): share model manifest context 2026-05-17 02:24:07 +01:00
Galin Iliev
4537b89da6 fix(agents): normalize Copilot replay tool IDs
Normalize GitHub Copilot Responses replay tool-call IDs before dispatch so resumed sessions with historical overlong item IDs no longer fail Copilot schema validation.

Closes #82749.
2026-05-16 18:22:10 -07:00