Skip to content

v2.2.0 — Long-Running Task Infrastructure

Latest

Choose a tag to compare

@jdrolls jdrolls released this 02 Mar 14:51

What's New

Tasks sent through the bot can now run for hours without being killed. Previously, a 10-minute hard timeout would terminate complex tasks (SSH operations, multi-file refactors, deployments) with a cryptic "exit code null" error.

Changes

  • 4-hour safety cap replaces the 10-minute hard timeout — /cancel is now the primary kill mechanism for user sessions
  • Progress pings every 5 minutes — "Still working... (X min elapsed). Use /cancel to stop."
  • Process health checks — detects zombie processes (close event never fired) every 30 seconds
  • Graceful shutdown — if the gateway restarts during a long task, it notifies the user instead of silently killing the process
  • /status shows task duration — see how long the current task has been running
  • Better error messages — timeout, cancellation, and signal kills each get distinct, user-friendly messages instead of "exit code null"
  • Partial result recovery — if Claude produced output before being killed, that output is returned instead of an error

Unchanged

  • Lite mode timeout (2 min) — unchanged
  • Heartbeat timeout (2 min) — hardcoded, unchanged
  • Cron job timeout (5 min) — hardcoded, unchanged
  • /cancel and AbortSignal flow — unchanged
  • Queue persistence and drain — unchanged

Files Modified

  • src/config.tsfullTimeoutMs → 4h, added progressPingIntervalMs
  • src/claude-runner.ts — health check, timeout/signal handling, partial results
  • src/index.ts — progress pings, task tracking, graceful shutdown, /status enhancement