diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 6e1e0363c..463afab93 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "0e4be1e3d33fe153aa9feecca024e9a2a2deb518", - "syncedAt": "2026-04-27T10:13:35.194Z" + "sha": "4067d78a4c1d43577b50e40bc46aa8059654392c", + "syncedAt": "2026-04-27T10:16:37.764Z" } diff --git a/docs/gateway/background-process.md b/docs/gateway/background-process.md index f5d42d784..03a0811d0 100644 --- a/docs/gateway/background-process.md +++ b/docs/gateway/background-process.md @@ -17,7 +17,7 @@ Key parameters: - `command` (required) - `yieldMs` (default 10000): auto‑background after this delay - `background` (bool): background immediately -- `timeout` (seconds, default 1800): kill the process after this timeout +- `timeout` (seconds, default `tools.exec.timeoutSec`): kill the process after this timeout; set `timeout: 0` only to disable the exec process timeout for that call - `elevated` (bool): run outside the sandbox if elevated mode is enabled/allowed (`gateway` by default, or `node` when the exec target is `node`) - Need a real TTY? Set `pty: true`. - `workdir`, `env` @@ -26,6 +26,7 @@ Behavior: - Foreground runs return output directly. - When backgrounded (explicit or timeout), the tool returns `status: "running"` + `sessionId` and a short tail. +- Background and `yieldMs` runs inherit `tools.exec.timeoutSec` unless the call provides an explicit `timeout`. - Output is kept in memory until the session is polled or cleared. - If the `process` tool is disallowed, `exec` runs synchronously and ignores `yieldMs`/`background`. - Spawned exec commands receive `OPENCLAW_SHELL=exec` for context-aware shell/profile rules. diff --git a/docs/tools/exec.md b/docs/tools/exec.md index 6f0a06504..69bf097ba 100644 --- a/docs/tools/exec.md +++ b/docs/tools/exec.md @@ -32,8 +32,8 @@ Auto-background the command after this delay (ms). Background the command immediately instead of waiting for `yieldMs`. - -Kill the command after this many seconds. + +Override the configured exec timeout for this call. Set `timeout: 0` only when the command should run without the exec process timeout. @@ -70,6 +70,7 @@ Notes: - `node` requires a paired node (companion app or headless node host). - If multiple nodes are available, set `exec.node` or `tools.exec.node` to select one. - `exec host=node` is the only shell-execution path for nodes; the legacy `nodes.run` wrapper has been removed. +- `timeout` applies to foreground, background, `yieldMs`, gateway, sandbox, and node `system.run` execution. If omitted, OpenClaw uses `tools.exec.timeoutSec`; explicit `timeout: 0` disables the exec process timeout for that call. - On non-Windows hosts, exec uses `SHELL` when set; if `SHELL` is `fish`, it prefers `bash` (or `sh`) from `PATH` to avoid fish-incompatible scripts, then falls back to `SHELL` if neither exists. - On Windows hosts, exec prefers PowerShell 7 (`pwsh`) discovery (Program Files, ProgramW6432, then PATH), @@ -94,6 +95,7 @@ Notes: - `tools.exec.notifyOnExit` (default: true): when true, backgrounded exec sessions enqueue a system event and request a heartbeat on exit. - `tools.exec.approvalRunningNoticeMs` (default: 10000): emit a single “running” notice when an approval-gated exec runs longer than this (0 disables). +- `tools.exec.timeoutSec` (default: 1800): default per-command exec timeout in seconds. Per-call `timeout` overrides it; per-call `timeout: 0` disables the exec process timeout. - `tools.exec.host` (default: `auto`; resolves to `sandbox` when sandbox runtime is active, `gateway` otherwise) - `tools.exec.security` (default: `deny` for sandbox, `full` for gateway + node when unset) - `tools.exec.ask` (default: `off`)