Commit Graph

22392 Commits

Author SHA1 Message Date
George Pickett cd0bcc2fb8 docs: add heartbeat runner changelog entry openclaw#52270 thanks @MiloStack 2026-03-26 18:28:06 -07:00
Stanley Huang b83efd4a8a fix: wrap heartbeat run() in try/finally to guarantee timer re-arm
The heartbeat scheduler silently dies after the first batch because
run() has multiple exit paths that skip scheduleNext(). Once any path
returns without re-arming the timer, heartbeats stop permanently.

The most common trigger is the requests-in-flight early return, but
any unhandled rejection in the async chain between runOnce() and the
manual scheduleNext() calls can also kill the timer.

Fix: wrap the run() body in try/finally so scheduleNext() is called
on every exit path. All manual scheduleNext() calls inside are removed
— the finally block is the single re-arm point.

The requests-in-flight case is excluded via a flag because the wake
layer (heartbeat-wake.ts) already handles retry scheduling for this
case with DEFAULT_RETRY_MS. Calling scheduleNext() here would register
a 0ms timer that races with the wake layer's 1s retry.

Fixes #31139
Fixes #45772

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 18:28:06 -07:00
Peter Steinberger cfbef8035d
refactor: split subagent run manager 2026-03-27 01:26:07 +00:00
Peter Steinberger 18dc98b00e
refactor: split embedded run auth controller 2026-03-27 01:21:10 +00:00
Peter Steinberger f3b152e0d9 refactor: split channel setup into shared flow modules 2026-03-27 01:17:39 +00:00
Peter Steinberger 7d6d642cb8 refactor: move doctor orchestration into flow contributions 2026-03-27 01:17:39 +00:00
Peter Steinberger 23aded30d8 refactor: add provider and search flow contributions 2026-03-27 01:17:39 +00:00
Peter Steinberger 5e35e6a95f
fix: lazy-load zca-js at the zalouser runtime boundary 2026-03-27 01:14:42 +00:00
Peter Steinberger b9c60fd37a
fix: default and gate apply_patch like write 2026-03-27 01:14:42 +00:00
Tak Hoffman c326083ad8
fix: keep session settings in gateway live events 2026-03-26 20:11:13 -05:00
Tak Hoffman 48ff617169
fix: keep fast mode in gateway session rows 2026-03-26 20:11:13 -05:00
Peter Steinberger ba60154826
fix: unify upload-file message actions 2026-03-27 01:04:01 +00:00
Peter Steinberger 046a950877
refactor: split agent command execution helpers 2026-03-27 01:02:40 +00:00
Peter Steinberger 6fd1725a06 fix: preserve ws reasoning replay (#53856) (thanks @xujingchen1996) 2026-03-26 17:53:59 -07:00
scoootscooob cc359d4c9d
fix: use runtime model and per-agent thinking defaults in status (thanks @scoootscooob, @xaeon2026, @ysfbsf) (#55425)
Merged via squash.

Prepared head SHA: 061d7c7ac0
Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Co-authored-by: scoootscooob <167050519+scoootscooob@users.noreply.github.com>
Reviewed-by: @scoootscooob
2026-03-26 17:49:21 -07:00
Peter Steinberger c9556c257e
docs: clarify memory plugin adapter ids 2026-03-27 00:47:01 +00:00
Peter Steinberger dbf78de7c6
refactor: move memory engine behind plugin adapters 2026-03-27 00:47:01 +00:00
Peter Steinberger aed6283faa
refactor: split embedded run setup helpers 2026-03-27 00:46:01 +00:00
Peter Steinberger d4da878d64 fix: preserve plugin sdk api baseline source link 2026-03-27 00:44:24 +00:00
Peter Steinberger 7de494fcec test: stabilize discord monitor ci isolation 2026-03-27 00:44:24 +00:00
Peter Steinberger 89e6b91b89
fix: decouple moonshot stream wrappers from provider runtime 2026-03-27 00:40:51 +00:00
Peter Steinberger 770c462c47
refactor: split subagent registry helpers 2026-03-27 00:35:41 +00:00
R. Desmond fa0835dd32
test(agents): cover undersized model dispatch guard (#55369) 2026-03-26 20:30:20 -04:00
Peter Steinberger 5a98a1dbe2
refactor: split embedded run helpers 2026-03-27 00:27:49 +00:00
Peter Steinberger 540b98b23f
refactor: split subagent announce output helpers 2026-03-27 00:23:32 +00:00
Peter Steinberger 0d9e4f20d5
refactor: split embedded attempt helpers 2026-03-27 00:23:32 +00:00
Peter Steinberger 48ae976333
refactor: split cli runner pipeline 2026-03-27 00:19:24 +00:00
Peter Steinberger 4329c93f85 test: wire discord monitor runtime seams 2026-03-27 00:05:49 +00:00
Craig Allan-McWilliams 984f98be95
Fix: treat HTTP 500 as a transient failover error (#55332)
HTTP 500 (Internal Server Error) was not triggering model fallback,
causing agents to fail outright instead of trying the next candidate.
This is inconsistent with TRANSIENT_HTTP_ERROR_CODES which already
includes 500. Aligns the direct status check with that constant.

Co-authored-by: Craig McWilliams <craigamcw@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 20:05:15 -04:00
Peter Steinberger da845ce598
test: align discord lifecycle shutdown expectations 2026-03-27 00:03:00 +00:00
Peter Steinberger 2f43c6b334
refactor: split discord monitor startup and lifecycle 2026-03-27 00:03:00 +00:00
rustam e3cd209889
chore: remove stale README-header.png packlist entry (#55325) 2026-03-26 16:59:36 -07:00
Coy Geek 8e285d112d
fix(cr-mbx-feishu-encryptkey-config-redaction-bypass): apply security fix (#53414)
Generated by staged fix workflow.
2026-03-26 19:58:37 -04:00
Saurabh afc649255c fix: match guild-level entries in Discord exec allowlist (#55175) 2026-03-26 16:56:58 -07:00
Peter Steinberger bdeb7d859b test: stabilize discord monitor ci mocks 2026-03-26 23:54:59 +00:00
Marko Jak b8ff152a98 fix(cli): isolate claude MCP config 2026-03-26 16:52:17 -07:00
Peter Steinberger 85b169c453 fix: clamp copilot auth refresh overflow (#55360) (thanks @michael-abdo) 2026-03-26 16:48:06 -07:00
Peter Steinberger f0c1057f68
fix: restore reveal-to-edit raw config flow 2026-03-26 23:45:10 +00:00
Peter Steinberger d25c4fd6c5 test: tighten discord lifecycle gateway mocks 2026-03-26 23:44:43 +00:00
Peter Steinberger 4726593d6d test: refresh planner batching expectations 2026-03-26 23:44:43 +00:00
Peter Steinberger 96a44d979d fix: route memory test harness through plugin sdk 2026-03-26 23:44:43 +00:00
felear2022 623f4d3056 fix: use stream-json output for Claude CLI backend to prevent watchdog timeouts
The Claude CLI backend uses `--output-format json`, which produces no
stdout until the entire request completes. When session context is large
(100K+ tokens) or API response is slow, the no-output watchdog timer
(max 180s for resume sessions) kills the process before it finishes,
resulting in "CLI produced no output for 180s and was terminated" errors.

Switch to `--output-format stream-json --verbose` so Claude CLI emits
NDJSON events throughout processing (init, assistant, rate_limit, result).
Each event resets the watchdog timer, which is the intended behavior —
the watchdog detects truly stuck processes, not slow-but-progressing ones.

Changes:
- cli-backends.ts: `json` → `stream-json --verbose`, `output: "jsonl"`
- helpers.ts: teach parseCliJsonl to extract text from Claude's
  `{"type":"result","result":"..."}` NDJSON line

Note: `--verbose` is required for stream-json in `-p` (print) mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 16:39:15 -07:00
kenantan32 4ad7d51c01 fix: preserve CLI session ID in text output mode
When the CLI backend output mode is "text", sessionId was hardcoded to
undefined. This caused the fallback chain to store the OpenClaw internal
UUID as the CLI session ID. On resume, --resume was called with the
wrong UUID, resulting in "No conversation found with session ID".

Return resolvedSessionId instead of undefined so the correct CLI session
ID is persisted and resume works correctly.
2026-03-26 16:34:02 -07:00
Peter Steinberger e46e655451 test: restore memory test seams (#55324) (thanks @joelnishanth) 2026-03-26 16:33:43 -07:00
joelnishanth 5b85d0efa4 discord: fix stale-socket reconnect crash from uncaught reconnect-exhausted error 2026-03-26 16:33:43 -07:00
dhi13man 9f8c4efa9b fix(agents): use claude-cli backend in tools-disabled regression test
codex-cli lacks systemPromptArg, so the system prompt is never
serialized into argv — making the not-toContain assertion pass
vacuously even on pre-fix code. Switch to claude-cli which defines
systemPromptArg ("--append-system-prompt") and add a positive
assertion that the user-supplied prompt IS present in argv.

Co-Authored-By: Dhiman's Agentic Suite <dhiman.seal@hotmail.com>
2026-03-26 16:30:19 -07:00
dhi13man 99f0ea8d43 fix(agents): remove unconditional "Tools are disabled" prompt injection in CLI runner
`runCliAgent()` unconditionally appended "Tools are disabled in this
session. Do not call tools." to `extraSystemPrompt` for every CLI
backend session. The intent was to prevent the LLM from calling
OpenClaw's embedded API tools (since CLI backends manage their own
tools natively). However, CLI agents like Claude Code interpret this
text as a blanket prohibition on ALL tools, including their own native
Bash, Read, and Write tools.

This caused silent failures across cron jobs, group chats, and DM
sessions when using any CLI backend: the agent would see the injected
text in the system prompt and refuse to execute tools, returning text
responses instead. Cron jobs reported `lastStatus: "ok"` despite the
agent failing to run scripts.

The fix removes the hardcoded string entirely. CLI backends already
receive `tools: []` (no OpenClaw embedded tools in the API call), so
the text was redundant at best.

Closes #44135

Co-Authored-By: Dhiman's Agentic Suite <dhiman.seal@hotmail.com>
2026-03-26 16:30:19 -07:00
Peter Steinberger 16565020a1 refactor: finish browser test path cleanup 2026-03-26 23:28:46 +00:00
Peter Steinberger 0ef2a9c8b5 refactor: remove core browser test duplicates 2026-03-26 23:28:34 +00:00
Peter Steinberger 9a7ceceffa refactor: move browser tests into plugin 2026-03-26 23:26:37 +00:00