Summary
antfarm workflow ensure-crons <workflow> can fail while creating cron jobs because the CLI fallback passes the wrong OpenClaw flag for payload timeout (slow clients may fail under certain conditions). I believe antfarm intends to set the agent timeout, not the client gateway call timeout.
Observed behavior
ensure-crons fails with errors like:
gateway timeout after 120ms
gateway connect failed: Error: gateway client stopped
Root cause
In src/installer/gateway-api.ts, CLI fallback builds:
args.push("--timeout", `${job.payload.timeoutSeconds}`);
But in OpenClaw CLI:
--timeout = gateway/client timeout in milliseconds
--timeout-seconds = agent payload timeout in seconds
So when Antfarm passes --timeout 120 (intending 120s), OpenClaw interprets it as 120ms, causing spurious gateway timeouts.
Repro
This fails reliably:
openclaw cron add --json \
--name test \
--every 5m \
--session isolated \
--agent wedding-speech-research_planner \
--message ping \
--timeout 120
Control command (works):
openclaw cron add --json \
--name test \
--every 5m \
--session isolated \
--agent wedding-speech-research_planner \
--message ping \
--timeout-seconds 120
Proposed fix
Change Antfarm CLI fallback to pass --timeout-seconds for job.payload.timeoutSeconds.
I opened a PR with a one-line fix.
Summary
antfarm workflow ensure-crons <workflow>can fail while creating cron jobs because the CLI fallback passes the wrong OpenClaw flag for payload timeout (slow clients may fail under certain conditions). I believe antfarm intends to set the agent timeout, not the client gateway call timeout.Observed behavior
ensure-cronsfails with errors like:gateway timeout after 120msgateway connect failed: Error: gateway client stoppedRoot cause
In
src/installer/gateway-api.ts, CLI fallback builds:But in OpenClaw CLI:
--timeout= gateway/client timeout in milliseconds--timeout-seconds= agent payload timeout in secondsSo when Antfarm passes
--timeout 120(intending 120s), OpenClaw interprets it as 120ms, causing spurious gateway timeouts.Repro
This fails reliably:
openclaw cron add --json \ --name test \ --every 5m \ --session isolated \ --agent wedding-speech-research_planner \ --message ping \ --timeout 120Control command (works):
openclaw cron add --json \ --name test \ --every 5m \ --session isolated \ --agent wedding-speech-research_planner \ --message ping \ --timeout-seconds 120Proposed fix
Change Antfarm CLI fallback to pass
--timeout-secondsforjob.payload.timeoutSeconds.I opened a PR with a one-line fix.