openclaw - ✅(Solved) Fix [Feature] Configurable exec tool timeout upper bound in openclaw.json [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#60151Fetched 2026-04-08 02:35:41
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1referenced ×1

Allow users to configure the exec tool's timeout limit via openclaw.json, rather than being constrained by the embedded agent run timeout (default 600s).

Root Cause

Allow users to configure the exec tool's timeout limit via openclaw.json, rather than being constrained by the embedded agent run timeout (default 600s).

Fix Action

Fix / Workaround

Workarounds (all fragile)

PR fix notes

PR #60163: feat: raise CLI watchdog timeout defaults for long-running exec commands

Description (problem / solution / changelog)

Summary

Raises the CLI watchdog maxMs defaults so long-running exec commands (builds, downloads, data processing) are no longer killed after 10 minutes of no output.

Changes

SettingBeforeAfter
CLI_FRESH_WATCHDOG_DEFAULTS.maxMs600,000 (10 min)1,800,000 (30 min)
CLI_RESUME_WATCHDOG_DEFAULTS.maxMs180,000 (3 min)600,000 (10 min)

Problem

The CLI watchdog \no-output-timeout`` was capping at 10 minutes for fresh runs and 3 minutes for resumed runs. Commands producing infrequent output (large file downloads, slow builds, data pipelines) would get SIGKILL'd before completing. Users reported this as a 600s exec timeout.

Backwards compatibility

  • Users can still override via `backend.reliability.watchdog.fresh.maxMs` / `resume.maxMs` in `openclaw.json`
  • Schema already supports this (see `CliBackendWatchdogModeSchema` in `zod-schema.core.ts`)

Related

Closes #60151 Closes #14228 Closes #20436

Changed files

  • src/agents/cli-watchdog-defaults.ts (modified, +7/-2)

Code Example

{
  "tools": {
    "exec": {
      "timeoutSec": 3600
    }
  }
}
RAW_BUFFERClick to expand / collapse

Summary

Allow users to configure the exec tool's timeout limit via openclaw.json, rather than being constrained by the embedded agent run timeout (default 600s).

Problem

When an exec command (e.g., a long-running build, download, or data processing task) takes longer than the embedded agent run timeout (600s), the entire agent turn is aborted — killing the exec process mid-execution. This is a frequent pain point for:

  • Long-running downloads (e.g., large model files, datasets)
  • Build/compile tasks
  • Data processing pipelines
  • Any shell command exceeding ~10 minutes

Current behavior

  1. Agent starts a turn → calls exec with timeout: 600
  2. The exec tool itself defaults to defaultTimeoutSec = 1800 (30 min)
  3. But the embedded agent run has its own timeout (600s) that kills the entire turn
  4. Result: exec process is SIGKILL'd even though exec tool would have allowed more time

Workarounds (all fragile)

  • Use background: true + yieldMs — but background processes still get killed when the agent turn times out
  • Use sessions_spawn to offload to sub-agents — adds complexity
  • Manually set timeoutSeconds: 0 on cron jobs — not applicable to interactive sessions

Proposed solution

Add a configurable tools.exec.timeoutSec field in openclaw.json:

{
  "tools": {
    "exec": {
      "timeoutSec": 3600
    }
  }
}

Additionally, consider exposing the embedded agent run timeout as agents.defaults.runTimeoutSeconds so users can override the 600s default for long-running sessions.

Implementation notes

Based on code analysis:

  • defaultTimeoutSec is already configurable via tools.exec.timeoutSec (line 2948 in pi-embedded-bukGSgEe.js)
  • The 600s limit comes from the embedded agent run timeout, not the exec tool itself
  • runTimeoutSeconds is already supported for sub-agents and cron agent turns
  • The fix should allow agents.defaults.runTimeoutSeconds to also apply to main session turns

Impact

  • Affected: All users running long exec commands (>10 min)
  • Severity: Medium — causes data loss and wasted API calls
  • Frequency: Daily for users doing build/download/data tasks
  • Backwards compatible: Yes — defaults remain unchanged

Related issues

  • #14228 — Embedded run timeout fails to clean up session/lane state
  • #20436 — Session context lost after agent run timeout
  • #23303 — Background exec sessions silently killed after ~30 minutes
  • #51287 — Configurable Exec Approval timeout (different but related)

extent analysis

TL;DR

Configure the tools.exec.timeoutSec field in openclaw.json to increase the timeout limit for the exec tool.

Guidance

  • Review the openclaw.json configuration file to ensure the tools.exec.timeoutSec field is set to a suitable value for long-running exec commands.
  • Consider exposing the embedded agent run timeout as agents.defaults.runTimeoutSeconds to allow users to override the default 600s limit.
  • Verify that the defaultTimeoutSec value is not being overridden by other configuration settings.
  • Test the updated configuration with a long-running exec command to ensure the timeout limit is being applied correctly.

Example

{
  "tools": {
    "exec": {
      "timeoutSec": 3600
    }
  }
}

Notes

The proposed solution requires updating the openclaw.json configuration file, which may not be feasible for all users. Additionally, the implementation notes suggest that the fix should allow agents.defaults.runTimeoutSeconds to apply to main session turns, but this may require further development.

Recommendation

Apply the workaround by configuring the tools.exec.timeoutSec field in openclaw.json, as this provides a direct solution to the problem of exec commands being killed due to the embedded agent run timeout.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING