Commit Graph

3004 Commits

Author SHA1 Message Date
Mert Başar
029ca8c268 feat(agents): implement state-aware failover and lane suspension
Summary:
- Persist quota-suspension state transitions and reload fresh suspension state before failover handoff injection.
- Restore suspended lanes to configured concurrency and share failover-to-suspension reason mapping across fallback and embedded runner paths.
- Export model.failover diagnostics via OTLP and cover queueing/resume behavior with regressions.

Verification:
- pnpm test src/config/sessions/store.pruning.integration.test.ts src/process/command-queue.test.ts src/agents/session-suspension.test.ts src/agents/model-fallback.test.ts extensions/diagnostics-otel/src/service.test.ts
- git diff --check
- pnpm exec oxfmt --check --threads=1 on changed TypeScript files
- GitHub checks: 92 successful, 0 pending, 0 failed on head 962146be88
- Review threads: none unresolved
2026-05-07 18:34:05 -05:00
Peter Steinberger
830a72d2ee fix(chat): reset model override with default 2026-05-07 22:36:31 +01:00
Vincent Koc
c97998ce21 chore(channels): remove bluebubbles bundled surface 2026-05-07 12:52:48 -07:00
pashpashpash
1c33990108 Route OpenAI agents through Codex by default (#78899)
* route openai agent runs through codex

* fix: load codex plugin for implicit openai runtime

* fix: preserve explicit OpenAI PI Codex auth routing

* fix: show codex auth for openai model listing

* fix: map codex auth into configured openai list rows

* fix: preserve explicit openai pi auth routes

* docs: keep openai model route examples canonical

* fix: clean openai codex test fixtures

* fix: scope codex auth status fallback

* fix: repair current ci boundary drift
2026-05-07 19:46:49 +09:00
Alex Knight
bf3b994378 fix(compaction): ignore metadata bytes in preflight pressure
Fix stale preflight compaction pressure estimation so metadata bytes before the latest usage record do not count as model-context tokens, while preserving post-usage tail pressure and the active transcript byte guard.

Fixes #78604.
2026-05-07 20:10:20 +10:00
Pavan Kumar Gondhi
758051322d Honor owner enforcement for native commands [AI] (#78864)
* fix: honor owner enforcement for native commands

* addressing codex review

* addressing codex review

* docs: add changelog entry for PR merge
2026-05-07 15:26:49 +05:30
Peter Steinberger
8e17910191 fix: treat aws sdk auth profiles as config metadata 2026-05-07 10:24:19 +01:00
Christof
afdf03b563 fix: clear reset skills snapshot (#78873) 2026-05-07 11:18:39 +02:00
pashpashpash
3a901b5e95 Revert "Install Codex plugin on OpenAI model selection (#78799)" (#78878)
This reverts commit c8f3fecad6.
2026-05-07 18:13:59 +09:00
Vincent Koc
34ca9adbf5 test(status): keep pi status expectation for openai routes 2026-05-07 02:02:59 -07:00
pashpashpash
c8f3fecad6 Install Codex plugin on OpenAI model selection (#78799)
* route openai agent runs through codex

* fix: load codex plugin for implicit openai runtime

* docs: credit openai codex auth fix

* fix(agents): respect custom openai runtime routing

* fix(agents): install codex plugin on openai selection

* fix(agents): preserve OpenAI Codex auth switching

* fix(ci): restore channel contract runner expression

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-05-07 01:57:34 -07:00
Rajvardhan Patil
c25f319d49 fix(btw): keep usage placeholder visible
Fixes #62877.\n\nThanks @RajvardhanPatil07.
2026-05-07 01:36:11 -07:00
Pavan Kumar Gondhi
d5eabbd36c fix(auto-reply): gate inline skill tool dispatch [AI] (#78517)
* fix: enforce tool hooks for inline skill dispatch

* addressing claude review

* addressing codex review

* addressing codex review

* fix: complete root-cause handling

* docs: add changelog entry for PR merge
2026-05-07 13:47:18 +05:30
Peter Steinberger
330ba1fa31 refactor: move canvas to plugin surfaces 2026-05-07 09:07:18 +01:00
Peter Steinberger
2e78fc57af fix: accept aws-sdk auth profiles 2026-05-07 08:09:55 +01:00
Vincent Koc
f0a7b8a6a8 fix(core): satisfy perf bucket lint 2026-05-06 22:22:39 -07:00
Vincent Koc
8a23485472 fix(reply): preserve queue metadata after perf cherry-picks 2026-05-06 22:22:39 -07:00
Vincent Koc
eee7307891 perf(core): trim reply helper churn 2026-05-06 22:22:39 -07:00
Vincent Koc
468c6a0101 perf(core): trim reply and agent allocation churn 2026-05-06 22:22:39 -07:00
Vincent Koc
16b0a6202c perf(reply): avoid queue churn in dedupe paths 2026-05-06 22:22:39 -07:00
Peter Steinberger
2b4b60b551 fix: label claude cli oauth status 2026-05-07 05:52:12 +01:00
sallyom
bf2511098f fix: persist rotated gateway session files
Signed-off-by: sallyom <somalley@redhat.com>
2026-05-06 21:41:03 -04:00
Peter Steinberger
9c7c0ae891 fix(discord): keep agents quiet when others are addressed (#78615)
* fix(discord): keep agents quiet when others are addressed

* fix(groups): tighten addressed-elsewhere prompt
2026-05-06 21:29:42 +01:00
Peter Steinberger
197edaa33d fix(discord): prompt agents to suppress link embeds (#78614)
* fix(discord): prompt agents to suppress link embeds

* fix(discord): tighten link embed prompt
2026-05-06 21:27:03 +01:00
Shakker
61223a74a4 chore: add coarse agent turn timeline spans 2026-05-06 17:33:46 +01:00
Vincent Koc
0b65f0c108 test(auto-reply): mark source delivery cases as non-command 2026-05-06 08:53:40 -07:00
the sun gif man
d4b4660026 config: stop automatic writes and guard Nix mutators (#78047)
Keep startup-derived plugin enablement, gateway auth tokens, control UI origins, and owner-display secrets runtime-only instead of persisting them into openclaw.json.

Refuse config writers, mutating update/plugin lifecycle commands, and doctor repair/token generation in Nix mode with agent-first nix-openclaw guidance.

Verification:
- pnpm check
- pnpm build
- pnpm test -- src/config/io.write-config.test.ts src/config/mutate.test.ts src/config/io.owner-display-secret.test.ts src/gateway/server-startup-config.recovery.test.ts src/gateway/startup-auth.test.ts src/gateway/startup-control-ui-origins.test.ts src/cli/plugins-cli.install.test.ts src/cli/plugins-cli.policy.test.ts src/cli/plugins-cli.uninstall.test.ts src/cli/plugins-cli.update.test.ts src/cli/update-cli.test.ts src/auto-reply/reply/commands-plugins.install.test.ts src/auto-reply/reply/commands-plugins.test.ts src/commands/onboarding-plugin-install.test.ts src/commands/doctor.runs-legacy-state-migrations-yes-mode-without.e2e.test.ts src/commands/doctor/shared/codex-route-warnings.test.ts src/commands/doctor/repair-sequencing.test.ts src/agents/auth-profile-runtime-contract.test.ts src/auto-reply/reply/agent-runner-execution.test.ts
- GitHub CI green on 05a2c71b90

Co-authored-by: Codex <noreply@openai.com>
2026-05-06 14:43:32 +02:00
simplyclever914
20906f56e2 fix: make conversation labels work with Codex (#78450)
Summary:
- The PR changes the shared conversation-label generator to send label instructions as `systemPrompt`, omit `temperature` for Codex simple completions, log error stop reasons, and add focused tests plus a changelog entry.
- Reproducibility: yes. Source reproduction is high-confidence: current main sends the prompt only inside user ... ple transport reads instructions from `context.systemPrompt` and only includes `temperature` when supplied.

Automerge notes:
- PR branch already contained follow-up commit before automerge: docs: note Codex topic label fix

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

Prepared head SHA: 9380907984
Review: https://github.com/openclaw/openclaw/pull/78450#issuecomment-4387573775

Co-authored-by: Clever <clever@users.noreply.github.com>
2026-05-06 12:39:30 +00:00
Jesse Merhi
1c42c77433 feat: add user input blocking lifecycle gates (#75035)
Summary:
- The PR adds a `before_agent_run` plugin hook with pass/block decisions, redacted blocked-turn persistence, diagnostics/docs/changelog updates, and focused runner, gateway, session, and plugin tests.
- Reproducibility: not applicable. as a feature PR rather than a current-main bug report. Current main lacks ` ... un`, while the PR head adds source coverage and copied live Gateway/WebChat log proof for the new behavior.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix: trim before agent hook PR scope
- PR branch already contained follow-up commit before automerge: fix: keep before-agent blocks redacted
- PR branch already contained follow-up commit before automerge: fix: keep runtime context out of model prompt
- PR branch already contained follow-up commit before automerge: docs: refresh config baseline after rebase
- PR branch already contained follow-up commit before automerge: fix: align blocked turn clients with redacted content
- PR branch already contained follow-up commit before automerge: fix: remove out-of-scope client block UI changes

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

Prepared head SHA: 767e46fde8
Review: https://github.com/openclaw/openclaw/pull/75035#issuecomment-4351843275

Co-authored-by: Jesse Merhi <jessejmerhi@gmail.com>
Co-authored-by: jesse-merhi <79823012+jesse-merhi@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-06 11:41:04 +00:00
Peter Steinberger
fc1e2c505a fix(reply): preserve private group replies for text turns 2026-05-06 12:09:28 +01:00
Vincent Koc
a2f1d1dfd8 fix(reply): keep text command replies visible 2026-05-06 03:24:59 -07:00
Conan-Scott
e437763246 fix(agents): deliver agent TTS audio when block streaming is off (#78355)
Summary:
- The branch changes non-streaming block reply delivery to direct-send all media-bearing block replies, updates reply-delivery/media-path regression tests, and adds a changelog entry.
- Reproducibility: yes. Current main's predicate and unit test show captioned media-bearing block replies are  ... sent when block streaming is disabled, and the PR body adds real Telegram after-fix proof for the TTS path.

Automerge notes:
- PR branch already contained follow-up commit before automerge: test(agents): align direct media block delivery coverage

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

Prepared head SHA: e9bb1314fe
Review: https://github.com/openclaw/openclaw/pull/78355#issuecomment-4386200162

Co-authored-by: Clawdbot <clawdbot@apilab.us>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-05-06 09:37:22 +00:00
Edionwheels
58f81b0e04 fix(codex): honor OAuth contextTokens in native harness
Fixes #77858.

Co-authored-by: Edionwheels <267595845+lilesjtu@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-06 08:54:52 +01:00
keshavbotagent
3f210b10ce fix: show Codex tool progress in channel drafts (#77949)
Summary:
- Normalize Codex app-server dynamic and native tool activity into channel-visible tool progress.
- Keep Telegram message-tool-only progress drafts visible without duplicate dynamic item/tool lines.
- Preserve suppressed item progress while avoiding duplicate tool callbacks.

Verification:
- OPENCLAW_VITEST_MAX_WORKERS=1 pnpm test extensions/codex/src/app-server/event-projector.test.ts extensions/codex/src/app-server/run-attempt.test.ts extensions/telegram/src/bot-message-dispatch.test.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/dispatch-from-config.test.ts --pool=forks --maxWorkers=1
- pnpm tsgo:extensions:test
- pnpm exec oxfmt --check --threads=1 CHANGELOG.md extensions/codex/src/app-server/event-projector.ts extensions/codex/src/app-server/event-projector.test.ts extensions/codex/src/app-server/run-attempt.ts extensions/codex/src/app-server/run-attempt.test.ts extensions/codex/src/app-server/tool-progress-normalization.ts extensions/telegram/src/bot-message-dispatch.ts extensions/telegram/src/bot-message-dispatch.test.ts src/auto-reply/get-reply-options.types.ts src/auto-reply/reply/agent-runner-execution.ts src/auto-reply/reply/agent-runner-execution.test.ts src/auto-reply/reply/dispatch-from-config.ts src/auto-reply/reply/dispatch-from-config.test.ts src/infra/agent-events.ts
- pnpm lint:extensions
- pnpm build
- CI on 6ff6a1f868: 88 success, 20 skipped, 1 neutral, no failures or pending checks

Fixes #75641.
2026-05-06 08:18:20 +01:00
Peter Steinberger
9e108fa9a7 fix: repair fs-safe ci expectations 2026-05-06 02:56:12 +01:00
Peter Steinberger
a6a4140ee7 fix(media): handle canonical inbound media paths 2026-05-06 02:50:36 +01:00
Peter Steinberger
20163313af fix: resolve fs-safe post-land fallout 2026-05-06 02:41:36 +01:00
Peter Steinberger
538605ff44 [codex] Extract filesystem safety primitives (#77918)
* refactor: extract filesystem safety primitives

* refactor: use fs-safe for file access helpers

* refactor: reuse fs-safe for media reads

* refactor: use fs-safe for image reads

* refactor: reuse fs-safe in qqbot media opener

* refactor: reuse fs-safe for local media checks

* refactor: consume cleaner fs-safe api

* refactor: align fs-safe json option names

* fix: preserve fs-safe migration contracts

* refactor: use fs-safe primitive subpaths

* refactor: use grouped fs-safe subpaths

* refactor: align fs-safe api usage

* refactor: adapt private state store api

* chore: refresh proof gate

* refactor: follow fs-safe json api split

* refactor: follow reduced fs-safe surface

* build: default fs-safe python helper off

* fix: preserve fs-safe plugin sdk aliases

* refactor: consolidate fs-safe usage

* refactor: unify fs-safe store usage

* refactor: trim fs-safe temp workspace usage

* refactor: hide low-level fs-safe primitives

* build: use published fs-safe package

* fix: preserve outbound recovery durability after rebase

* chore: refresh pr checks
2026-05-06 02:15:17 +01:00
Peter Steinberger
2ead1502c9 feat: route outbound sends through durable lifecycle 2026-05-06 01:46:42 +01:00
Neerav Makwana
a01ba8099b fix(agent-reply): surface CLI subprocess timeouts in user-facing replies
Treat shared CLI runner timeout literals as actionable copy when verbose failures
stay off (#77007).

- Use subprocess-neutral wording; optional routing context from fallback
  `provider/model:` prefixes (`codex-cli/...`, `anthropic/...`) without implying
  a Claude-only backend.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-05 21:30:40 +05:30
Vincent Koc
3b1921b543 fix(core): avoid session export filename collisions (#77762) 2026-05-05 02:11:48 -07:00
Vincent Koc
a17d4371d1 feat(status): show uptime in chat status
Show compact Gateway process and host system uptime in chat /status output.
2026-05-04 22:52:00 -07:00
Patrick Erichsen
9e97cdb213 fix(discord): fail dropped final reply delivery 2026-05-05 01:33:22 +01:00
pashpashpash
b2c3202a15 Surface Codex usage-limit reset details in chat replies (#77557)
* fix(codex): surface usage limit reset details

* fix(codex): satisfy extension lint

* fix: surface codex runtime failures in tool-only replies
2026-05-05 09:00:39 +09:00
Vincent Koc
ac3cd1a0ca Harden Codex harness control surfaces (#77459)
* fix(scripts): find codex protocol source from worktrees

* fix(test): keep codex harness docker caches writable

* fix(test): relax live codex cache mount permissions

* test(codex): add live docker harness debug output

* fix(test): detect numeric ci env in codex docker harness

* fix(codex): skip duplicate agent-command telemetry

* fix(tooling): skip sparse-missing oxlint tsconfig

* fix(tooling): route changed checks through testbox

* fix(qa): keep coverage json source-clean

* fix(test): preflight codex docker auth

* fix(codex): validate bind option values

* fix(codex): parse quoted command arguments

* fix(codex): reject extra control args

* fix(codex): use content for blank bound prompts

* fix(codex): decode local image file urls

* fix(codex): treat local media urls as images

* fix(codex): keep windows media paths local

* fix(codex): reject malformed diagnostics confirmations

* fix(codex): reject malformed resume commands

* fix(codex): reject malformed thread actions

* fix(codex): reject malformed turn controls

* fix(codex): reject malformed model controls

* fix(codex): resolve empty user input prompts

* fix(codex): enforce user input options

* fix(codex): reject ambiguous computer-use actions

* fix(codex): ignore stale bound turn notifications

* test(gateway): close task registries in gateway harness

* test(gateway): route cleanup through task seams

* fix(codex): describe current permission approvals

* fix(codex): disclose command approval amendments

* fix(codex): preserve approval detail under truncation

* fix(codex): propagate dynamic tool failures

* test(codex): align dynamic tool block contract

* fix(codex): reject extra read-only command operands

* fix(codex): escape command readout fields

* fix(codex): escape status probe errors

* fix(codex): narrow formatted thread details

* fix(codex): escape successful status summaries

* fix(codex): escape bound control replies

* fix(codex): escape user input prompts

* fix(codex): escape control failure replies

* fix(codex): escape approval prompt text

* test(codex): narrow escaped reply assertions

* test(codex): complete strict reply fixtures

* test(codex): preserve account fixture literals

* test(codex): align status probe fixtures

* fix(codex): satisfy sanitizer regex lint

* fix(codex): harden command readouts

* fix(codex): harden bound image inputs

* fix(codex): sanitize command failure replies

* test(codex): complete rate limit fixture

* test(tooling): isolate postinstall compile cache fixture

* fix(codex): keep app-server event ownership explicit

---------

Co-authored-by: pashpashpash <nik@vault77.ai>
2026-05-05 07:23:41 +09:00
Vincent Koc
e091d912ce fix(model): guide runtime allowlist repairs 2026-05-04 15:15:32 -07:00
Peter Steinberger
0909df1a4f refactor: centralize reply followup drain lifecycle 2026-05-04 22:25:16 +01:00
Peter Steinberger
a9817a5f97 fix(gateway): clear reply run before followup drain 2026-05-04 22:04:32 +01:00
Vincent Koc
7b86481c94 fix(plugins): trust chat catalog installs 2026-05-04 13:46:11 -07:00
Mert Başar
c240e718e9 Feat/main session durable delivery pr (#75280)
* feat: generalize pending-final-delivery for subagents and main session

(cherry picked from commit 677fcbfaf87c8cd6de8b5bd02099b29b7d49e916)

* feat(agents): implement Phase 2 durable final delivery for main sessions

(cherry picked from commit b4e39f0ddf6dbd3f0d3b9226df8e714ad722f751)

* fix(agents): narrow heartbeat deferral to pending final delivery

* fix(agents): clear final delivery after dispatch

* fix(agents): gate durable delivery retry capture

---------

Co-authored-by: Mert Basar <MertBasar0@users.noreply.github.com>
2026-05-05 01:44:11 +08:00