Emit stale handoff notifications (GET)
GET
/cron/stale-in-progress
const url = 'https://example.com/api/cron/stale-in-progress';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/cron/stale-in-progressEmits notifications for tickets stuck in in_progress (default 48h) or in validation with no PR linked (default 24h), and trims the agent_notifications catch-up log to 14 days. Protected by CRON_SECRET via the x-cron-secret header ONLY — a token query parameter is rejected (secrets do not belong in URLs). Thresholds are overridable per environment with STALE_IN_PROGRESS_THRESHOLD_HOURS / STALE_VALIDATION_THRESHOLD_HOURS.
Responses
Section titled “ Responses ”Notification sweep result
Media type application/json
object
ok
required
False when either emitter reported errors or a cooldown probe failed. The best-effort retention sweep never affects it.
boolean
in_progress
required
object
scanned
required
Candidate rows the query returned, before the cooldown filter. Bounded at 300 — see scan_truncated.
integer
notified
required
integer
skipped_cooldown
required
Candidates already notified within 7 days.
integer
errors
required
integer
cooldown_probe_failed
boolean
scan_truncated
boolean
validation
required
object
scanned
required
integer
notified
required
integer
skipped_cooldown
required
integer
errors
required
integer
cooldown_probe_failed
boolean
scan_truncated
boolean
agent_notification_retention
required
object
ok
required
boolean
thresholds
required
object
in_progress_hours
required
number
validation_hours
required
number
Missing or invalid CRON_SECRET