Skip to content

fix(cli): use --timeout-seconds for cron payload timeout#308

Open
funsaized wants to merge 1 commit intosnarktank:mainfrom
funsaized:fix/ensure-crons-timeout-flag
Open

fix(cli): use --timeout-seconds for cron payload timeout#308
funsaized wants to merge 1 commit intosnarktank:mainfrom
funsaized:fix/ensure-crons-timeout-flag

Conversation

@funsaized
Copy link

Summary

Fix CLI fallback timeout flag when creating cron jobs from ensure-crons.

Problem

Antfarm maps job.payload.timeoutSeconds to OpenClaw CLI --timeout, but OpenClaw interprets that flag as gateway/client timeout in milliseconds.

This means a value like 120 (intended seconds) becomes 120ms, causing failures such as:

  • gateway timeout after 120ms
  • gateway client stopped

Fix

Use --timeout-seconds instead of --timeout when passing job.payload.timeoutSeconds.

Validation

  • Reproduced failure with --timeout 120
  • Verified success with --timeout-seconds 120
  • Verified antfarm workflow ensure-crons wedding-speech-research recreates all expected jobs

Closes #307

@vercel
Copy link

vercel bot commented Mar 14, 2026

Someone is attempting to deploy a commit to the Ryan Team on Vercel.

A member of the Team first needs to authorize it.

@funsaized funsaized force-pushed the fix/ensure-crons-timeout-flag branch from cea8fff to 1852cc4 Compare March 14, 2026 10:51
@funsaized
Copy link
Author

funsaized commented Mar 14, 2026

Update after validating OpenClaw CLI semantics:

  • --timeout = gateway/client request timeout (milliseconds)
  • --timeout-seconds = agent job payload timeout (payload.timeoutSeconds)

This PR intentionally maps Antfarm job.payload.timeoutSeconds to --timeout-seconds so CLI fallback matches HTTP behavior and correctly sets job payload timeout instead of transport timeout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ensure-crons passes --timeout instead of --timeout-seconds, causing 120ms gateway timeout

1 participant