Skip to content

Announce delivery timeout hardcoded to 60s (Math.min cap) - make it configurable #14540

@tonystarkclawd

Description

@tonystarkclawd

Problem

The announce delivery mode for cron jobs has a hardcoded 60-second timeout cap in the codebase:

const waitMs = Math.min(params.announceTimeoutMs, 6e4)

Even if announceTimeoutMs is set higher (e.g. 180000), it's always capped to 60000ms.

Impact

Any isolated cron job that takes >60s to generate output will silently fail delivery. The job runs successfully, but the announce never reaches the user.

Error in journalctl:

Subagent announce failed: Error: gateway timeout after 60000ms
[cron:<jobId>] cron announce delivery failed

This affects common use cases like morning/evening digest jobs that aggregate data from multiple sources (typical duration: 70-180s).

Current Workaround

Set delivery.mode: "none" and add explicit message() tool call instructions in the cron prompt so the agent sends the message itself. Works but requires prompt engineering for every slow job.

Proposed Fix

Either:

  1. Remove the cap and respect the configured announceTimeoutMs value
  2. Raise the cap to something reasonable (300s / 5min)
  3. Make the cap configurable via gateway config (e.g. cron.maxAnnounceTimeoutMs)

Option 1 is simplest — the user already explicitly sets announceTimeoutMs, so the cap is redundant.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions