Bug: Cron isolated agent timeout during long tool execution
Problem
Cron jobs with isolated: true fail with CommandLaneTaskTimeoutError when tool execution exceeds ~10 minutes, even though timeoutSeconds is configured to 600s (10 minutes).
Root Cause
In dist/embedded-agent-*.js, the noteLaneTaskProgress() function is only called during:
- Startup phases
- Attempt progress events
It is NOT called during:
- Tool execution (e.g.,
exec commands running 5+ minutes)
- LLM streaming output
The lane timeout uses a sliding window: laneTaskTimeoutMs = timeoutMs + 30s grace. If no progress is reported during long tool execution, the sliding window expires and triggers CommandLaneTaskTimeoutError.
Evidence
- Error:
CommandLaneTaskTimeoutError: Lane task timed out after 630000ms
- Occurs consistently when cron jobs execute long-running tools (e.g., data processing scripts, builds)
- Same jobs work fine when triggered manually (non-cron context)
Fix
Wrap runEmbeddedAttemptWithBackend() call in an IIFE that periodically calls noteLaneTaskProgress() every 30 seconds:
const rawAttempt = await (() => {
const progressInterval = setInterval(() => noteLaneTaskProgress(), 30000);
return runEmbeddedAttemptWithBackend({
// ... existing params
}).catch((err) => {
throw postCompactionAbortError ?? err;
}).finally(() => {
clearInterval(progressInterval); // <-- Add this
parentAbortSignal?.removeEventListener?.("abort", relayParentAbort);
if (postCompactionAbortController === attemptAbortController) postCompactionAbortController = void 0;
});
})();
Impact
- Cron jobs with long-running tools fail unpredictably
- Users must set artificially high
timeoutSeconds to work around the issue
- Affects all isolated cron agents executing tools that take >5 minutes
Environment
- OpenClaw version: 2026.6.5 - 2026.6.8
- Node.js: v24.14.0
- OS: Linux (WSL Ubuntu 24.04)
Workaround
Until this is fixed upstream, users can patch dist/embedded-agent-*.js manually (see fix above).
Bug: Cron isolated agent timeout during long tool execution
Problem
Cron jobs with
isolated: truefail withCommandLaneTaskTimeoutErrorwhen tool execution exceeds ~10 minutes, even thoughtimeoutSecondsis configured to 600s (10 minutes).Root Cause
In
dist/embedded-agent-*.js, thenoteLaneTaskProgress()function is only called during:It is NOT called during:
execcommands running 5+ minutes)The lane timeout uses a sliding window:
laneTaskTimeoutMs = timeoutMs + 30s grace. If no progress is reported during long tool execution, the sliding window expires and triggersCommandLaneTaskTimeoutError.Evidence
CommandLaneTaskTimeoutError: Lane task timed out after 630000msFix
Wrap
runEmbeddedAttemptWithBackend()call in an IIFE that periodically callsnoteLaneTaskProgress()every 30 seconds:Impact
timeoutSecondsto work around the issueEnvironment
Workaround
Until this is fixed upstream, users can patch
dist/embedded-agent-*.jsmanually (see fix above).