Commit Graph

11562 Commits

Author SHA1 Message Date
Guy
32c66aff49 fix: add windowsHide: true to spawn in runCommandWithTimeout
Fixes flashing conhost.exe windows on Windows when exec module spawns
child processes. The windowsHide: true option prevents orphaned conhost.exe
processes and eliminates disruptive terminal window flashing.

Closes #18613
2026-02-16 23:49:47 +01:00
Daniel Sauer
20957efa46 fix(process): graceful process tree termination with SIGTERM before SIGKILL
Process trees (pty sessions, tool exec) were being SIGKILL'd immediately
without any grace period for cleanup. This prevented child processes from:
- Flushing buffers and closing files cleanly
- Closing network connections
- Terminating their own child processes
- Removing temporary files

Changes:
- Send SIGTERM to process group first (Unix)
- Wait configurable grace period (default 3s)
- Then SIGKILL if process still alive
- Windows: taskkill without /F first, then with /F after grace period
- Use unref() on timeout to not block event loop exit

Fixes #18619

Co-authored-by: James <james@openclaw.ai>
2026-02-16 23:49:44 +01:00
Tomas Hajek
19ae7a4e17 fix(session-memory): fallback to rotated transcript after /new
When /new rotates <session>.jsonl to <session>.jsonl.reset.*, the session-memory hook may read an empty active transcript and write header-only memory entries.

Add fallback logic to read the latest .jsonl.reset.* sibling when the primary file has no usable content.

Also add a unit test covering the rotated transcript path.

Fixes #18088
Refs #17563
2026-02-16 23:49:41 +01:00
Peter Steinberger
769f7631d5 refactor(test): dedupe duplicate dispatch test flow 2026-02-16 22:47:34 +00:00
Peter Steinberger
af5d4ac7d3 refactor(test): dedupe doctor legacy migration fixtures 2026-02-16 22:47:26 +00:00
Peter Steinberger
389eb8ba10 refactor(test): dedupe discord component registry fixtures 2026-02-16 22:43:37 +00:00
Peter Steinberger
abbe04b184 refactor(discord): share attachment media resolution loop 2026-02-16 22:43:30 +00:00
Peter Steinberger
1aabe9712a refactor(discord): dedupe reaction notification flow 2026-02-16 22:39:42 +00:00
Peter Steinberger
61859377a5 refactor(test): dedupe pi-tools loop detection test setup 2026-02-16 22:39:42 +00:00
Peter Steinberger
05bfb7f9f9 refactor(test): reuse discord message handler base context harness 2026-02-16 22:39:42 +00:00
Dakshay Mehta
8947d2dea5 Agents: format process poll backoff files 2026-02-16 23:32:12 +01:00
Dakshay Mehta
23f5cc80a4 Agents: wire command poll backoff into process poll 2026-02-16 23:32:12 +01:00
Peter Steinberger
054745a7e0 refactor(test): dedupe slack monitor event fixtures 2026-02-16 22:30:39 +00:00
Peter Steinberger
11f3da7669 refactor(test): dedupe cron service test harness setup 2026-02-16 22:30:39 +00:00
Peter Steinberger
21e5c0ce57 chore: reorder latest changelog bullets by user impact 2026-02-16 23:27:23 +01:00
Vignesh Natarajan
4e930db432 fix: guard reminder note (#18588) (thanks @vignesh07) 2026-02-16 14:13:17 -08:00
Seb Slight
0f6b39ea57 Docs/Changelog: add missing entry for #18586 (#18604)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 513498364543fb1986950a9aabfffc8472a02a18
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Co-authored-by: sebslight <19554889+sebslight@users.noreply.github.com>
Reviewed-by: @sebslight
2026-02-16 17:10:14 -05:00
Vignesh Natarajan
5a26d1c622 Agent: guard reminder promises behind cron scheduling 2026-02-16 14:07:16 -08:00
Seb Slight
0cff8bc4e6 fix(telegram): include DM topic thread id in replies (#18586) 2026-02-16 17:02:59 -05:00
pip-nomel
1567d6cbb4 feat(discord): download attachments from forwarded messages (#17049)
Co-authored-by: Shadow <shadow@openclaw.ai>
2026-02-16 15:23:40 -06:00
Shadow
c593709d25 Discord: add per-button component allowlist 2026-02-16 15:15:00 -06:00
Benjamin Jesuiter
fc8290af42 CLI: normalize help command description casing (#18569) 2026-02-16 22:10:21 +01:00
Benjamin Jesuiter
b25f334fa2 CLI: improve command descriptions in help output (#18486)
* CLI: clarify config vs configure descriptions

* CLI: improve top-level command descriptions

* CLI: make direct command help more descriptive

* CLI: add commands hint to root help

* CLI: show root help hint in implicit help output

* CLI: add help example for command-specific help

* CLI: tweak root subcommand marker spacing

* CLI: mark clawbot as subcommand root in help

* CLI: derive subcommand markers from registry metadata

* CLI: escape help regex CLI name
2026-02-16 22:06:25 +01:00
Shadow
05a83b9e97 Discord: add reusable component option 2026-02-16 14:22:49 -06:00
Shadow
fc60336c18 Discord: add native exec options 2026-02-16 14:18:17 -06:00
Sk Akram
e5eb5b3e43 feat: add stuck loop detection and exponential backoff infrastructure for agent polling (#17118)
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: eebabf679b983e5a660fb3cef371e1303f11f615
Co-authored-by: akramcodez <179671552+akramcodez@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
2026-02-16 15:16:35 -05:00
Vignesh Natarajan
1f99d82712 test (heartbeat): relax brittle reply option assertions 2026-02-16 11:57:32 -08:00
Shadow
3646625dc1 Infra: skip Discord text exec approvals 2026-02-16 13:53:12 -06:00
zerone0x
81d2a91a90 fix(discord): send initial message for non-forum thread creation (#18117)
Co-authored-by: Shadow <shadow@openclaw.ai>
2026-02-16 13:48:46 -06:00
victor-wu.eth
7c240a2b58 feat(discord): faster reaction status state machine (watchdog + debounce) (#18248)
* fix(discord): avoid unnecessary message fetches in reaction notifications

* style(discord): format reaction listener for CI

* feat(discord): add reaction status machine and fix tool/final wiring

* fix(discord): harden reaction status transitions and cleanup

* revert(discord): restore status-machine flow from 0a5a72204

* fix(auto-reply): restore lifecycle callback forwarding for channels

* chore(ci): add daily upstream sync workflow for custom branch

* fix(discord): non-blocking reactions and robust cleanup

* chore: remove unrelated workflow from Discord-only PR

* Discord: streamline reaction handling

* Docs: add Discord reaction changelog

---------

Co-authored-by: Shadow <hi@shadowing.dev>
2026-02-16 13:38:39 -06:00
Vignesh Natarajan
c953cfdee7 chore (changelog): note webchat command auth fix 2026-02-16 11:30:49 -08:00
Vignesh Natarajan
e95134ba3f fix (commands): keep webchat auth on internal provider 2026-02-16 11:30:49 -08:00
Shadow
72e228e14b Heartbeat: allow suppressing tool warnings (#18497)
* Heartbeat: allow suppressing tool warnings

* Changelog: note heartbeat tool-warning suppression
2026-02-16 13:29:24 -06:00
Latitude Bot
3238bd78d9 fix(discord): normalize bare numeric IDs in outbound target resolution
Bare numeric Discord IDs (e.g. '1470130713209602050') in cron
delivery.to caused 'Ambiguous Discord recipient' errors and silent
delivery failures.

Adds normalizeDiscordOutboundTarget() to the existing Discord
normalize module (channels/plugins/normalize/discord.ts) alongside
normalizeDiscordMessagingTarget. Defaults bare numeric IDs to
'channel:<id>', matching existing behavior.

Both the Discord extension plugin and standalone outbound adapter
use the shared helper via a one-liner resolveTarget.

Fixes #14753. Related: #13927
2026-02-16 13:25:58 -06:00
nabbilkhan
250896cf6e fix: correct contradictory test name (Greptile review)
The test verifies that cooldownUntil IS cleared when it equals exactly
`now` (>= comparison), but the test name said "does not clear". Fixed
the name to match the actual assertion behavior.
2026-02-16 12:53:45 -06:00
nabbilkhan
03cadc4b7a fix(auth): auto-expire stale auth profile cooldowns and reset error count
When an auth profile hits a rate limit, `errorCount` is incremented and
`cooldownUntil` is set with exponential backoff. After the cooldown
expires, the time-based check correctly returns false — but `errorCount`
persists. The next transient failure immediately escalates to a much
longer cooldown because the backoff formula uses the stale count:

  60s × 5^(errorCount-1), max 1h

This creates a positive feedback loop where profiles appear permanently
stuck after rate limits, requiring manual JSON editing to recover.

Add `clearExpiredCooldowns()` which sweeps all profiles on every call to
`resolveAuthProfileOrder()` and clears expired `cooldownUntil` /
`disabledUntil` values along with resetting `errorCount` and
`failureCounts` — giving the profile a fair retry window (circuit-breaker
half-open → closed transition).

Key design decisions:
- `cooldownUntil` and `disabledUntil` handled independently (a profile
  can have both; only the expired one is cleared)
- `errorCount` reset only when ALL unusable windows have expired
- `lastFailureAt` preserved for the existing failureWindowMs decay logic
- In-memory mutation; disk persistence happens lazily on the next store
  write, matching the existing save pattern

Fixes #3604
Related: #13623, #15851, #11972, #8434
2026-02-16 12:53:45 -06:00
Shadow
d3707147c0 chore: update carbon 2026-02-16 12:45:08 -06:00
Vignesh Natarajan
1cf3aba3f6 chore (changelog): note qmd multi-agent startup fix 2026-02-16 10:35:48 -08:00
Vignesh Natarajan
02c268eec1 fix (gateway/memory): start qmd onBoot for all agents 2026-02-16 10:35:26 -08:00
Vignesh
b0a01fe482 Agents/Tools: preflight exec script files for shell var injection (#18457)
* fix(agents): don't force store=true for codex responses

* test: stabilize respawn + subagent usage assertions

* Agents/Tools: preflight exec to detect shell variable injection in scripts

* Changelog: fix merge marker formatting
2026-02-16 10:34:29 -08:00
Peter Steinberger
9b70849567 refactor(test): dedupe trusted-proxy auth test setup 2026-02-16 18:31:37 +00:00
Peter Steinberger
96eabcbe89 refactor(test): share antigravity usage endpoint fixtures 2026-02-16 18:31:31 +00:00
Peter Steinberger
b0035a1e49 refactor(test): table-drive web tool defaults checks 2026-02-16 18:31:27 +00:00
Peter Steinberger
8a1893a215 refactor(test): table-drive legacy config policy assertions 2026-02-16 18:25:04 +00:00
Peter Steinberger
9372df45f2 refactor(test): table-drive auth choice option checks 2026-02-16 18:25:04 +00:00
Peter Steinberger
23480bb4e3 refactor(test): dedupe trigger model command fixtures 2026-02-16 18:25:04 +00:00
Peter Steinberger
9ff473fa05 refactor(test): share sandbox config test helpers 2026-02-16 18:25:04 +00:00
Peter Steinberger
30c8361d0a refactor(test): dedupe isolated cron turn setup 2026-02-16 18:25:04 +00:00
Shadow
1b7301051b Config: require Discord ID strings (#18220) 2026-02-16 12:22:58 -06:00
Peter Steinberger
5d40d47501 refactor(test): reduce dispatch-from-config setup duplication 2026-02-16 18:09:49 +00:00