Commit Graph

30013 Commits

Author SHA1 Message Date
Vincent Koc
e3621f5057 fix(cli): keep secret diagnostics off json stdout 2026-05-17 20:08:16 +08:00
Peter Steinberger
3c6ec521d5 fix(cli): resolve PowerShell completion profiles 2026-05-17 12:58:35 +01:00
Stellar鱼
fe68af5307 fix(cli): show concrete PowerShell completion profile path 2026-05-17 12:58:35 +01:00
Peter Steinberger
93db190308 fix(gateway): isolate hot reload channel failures
* fix(gateway): isolate hot reload channel failures

* fix(gateway): restore partial hot reload stops
2026-05-17 12:56:14 +01:00
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
Vincent Koc
7d6e45ef7c fix(qa-lab): clean orphaned gateway runtimes 2026-05-17 19:10:46 +08: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
d8198c8c0e fix: use Codex runtime context budget for compaction 2026-05-17 11:46:17 +01:00
Peter Steinberger
156e86afa4 fix: load source tool plugin entries with SDK aliases 2026-05-17 11:45:18 +01:00
Peter Steinberger
4d05008283 fix: preserve tool plugin manifest metadata 2026-05-17 11:45:18 +01:00
Peter Steinberger
ae172741e1 feat: dogfood tool plugin helpers 2026-05-17 11:45:18 +01:00
Peter Steinberger
b17e4ed50c feat: add simple tool plugin authoring 2026-05-17 11:45:18 +01:00
Peter Steinberger
0165560f70 test: align plugin metadata test snapshots 2026-05-17 11:29:39 +01:00
Peter Steinberger
9feca3e11e fix: stabilize release validation gates 2026-05-17 11:24:01 +01:00
Vincent Koc
5aac7939db fix(gateway): drain replies during restart close 2026-05-17 18:12:52 +08: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
d66fe50a10 fix(cli): preserve optional web fallback secrets
Co-authored-by: wuyangfan <1102042793@qq.com>
2026-05-17 10:42:57 +01:00
Peter Steinberger
e3a248585e fix(cli): preserve scoped secret resolution
Co-authored-by: wuyangfan <1102042793@qq.com>

# Conflicts:
#	src/cli/capability-cli.test.ts
#	src/cli/capability-cli.ts
2026-05-17 10:42:57 +01:00
Peter Steinberger
fe680e47ce fix(cli): scope web command secret refs 2026-05-17 10:42:57 +01:00
wuyangfan
230806eaf2 fix(cli): resolve plugin web search SecretRefs for infer web search
Materialize agent-runtime plugin credentials through the shared command
secret resolution path before local web search/fetch runs, matching gateway
runtime behavior for plugins.entries.*.config.webSearch.apiKey refs.

Fixes openclaw/openclaw#82621

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-17 10:42:57 +01:00
Peter Steinberger
6f024293e0 fix: surface reply media failures
Co-authored-by: Jerry-Xin <jerryxin0@gmail.com>
2026-05-17 10:39:28 +01: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
Vincent Koc
54d063167e test: use platform spy helper in cli tests 2026-05-17 17:03:23 +08:00
Vincent Koc
85f8fd0533 test: reuse platform spy helper in infra tests 2026-05-17 16:58:18 +08:00
Vincent Koc
9ca98a6d39 fix(config): accept together thinking format 2026-05-17 16:55:51 +08:00
Vincent Koc
46061442e7 test: share process platform spy helper 2026-05-17 16:52:46 +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
Bob
80d03a1e5b fix: classify provider conversation state errors (#82616)
Classify provider conversation-state rejections and return a clear message-channel error instead of auto-resetting or falling back to a generic runner failure.

Local validation:
- pnpm docs:list
- pnpm build
- pnpm check
- node scripts/run-vitest.mjs src/auto-reply/reply/provider-request-error-classifier.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/dispatch-from-config.test.ts
- node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts src/auto-reply/reply/agent-runner.runreplyagent.e2e.test.ts

Co-authored-by: dutifulbob <261991368+dutifulbob@users.noreply.github.com>
2026-05-17 16:22:09 +08: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
samzong
dd32c5307f fix(gateway): reuse startup auth preflight snapshot
Summary:
- Reuse the prepared gateway startup auth SecretRef snapshot when the startup config still matches the preflight source.
- Preserve fresh activation fallback for config mismatches and shared weak-token, warning, and recovery handling.
- Add focused regression coverage and changelog entry.

Verification:
- pnpm test src/gateway/server-startup-config.secrets.test.ts
- GitHub checks green on 72587758ee
2026-05-17 01:12:21 -07:00
Peter Steinberger
83e19ca469 fix: keep ACP turns on OpenClaw timeouts (#82997) 2026-05-17 09:10:42 +01:00
Peter Steinberger
e4ec1b3de8 test(cli): clarify gateway model-run session proof (#82861) (thanks @Kaspre) 2026-05-17 09:08:02 +01:00
Kaspre
820ec9d3be test(cli): assert fresh gateway model-run sessions 2026-05-17 09:08:02 +01:00
Kaspre
0fd152b286 fix(cli): isolate gateway model run sessions 2026-05-17 09:08:02 +01: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
Peter Steinberger
635b947e32 fix(acp): honor terminal turn results 2026-05-17 08:25:14 +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
Peter Steinberger
77547226ce fix: improve progress draft truncation 2026-05-17 08:13:39 +01:00
Peter Steinberger
76da34760c fix(mac): speed up config settings 2026-05-17 08:03:10 +01:00