Skip to content

fix: Slack message router ignores per-agent execution timeout (TIMEOUT-001) #221

Closed

Description

@pavshulin

Summary

The Slack message router (adapters/message_router.py) passes timeout_seconds=_get_channel_timeout() (default 120s) to TaskExecutionService.execute_task(), overriding the agent's configured execution_timeout_seconds (e.g. 900s).

Root Cause

Line 189 in message_router.py explicitly sets timeout_seconds=_get_channel_timeout(). However, TaskExecutionService already has built-in logic (TIMEOUT-001) to read the per-agent timeout when timeout_seconds=None:

# task_execution_service.py line 153-155
if timeout_seconds is None:
    timeout_seconds = db.get_execution_timeout(agent_name)

All other callers (chat.py, paid.py) pass None and let the service handle it. The Slack router is the only one overriding.

Fix

  • Change timeout_seconds=_get_channel_timeout() to timeout_seconds=None
  • Add graceful timeout error message: "Sorry, that took too long to process."

Observed Impact

Agent ability-website configured with 900s timeout, but Slack-triggered tasks timeout at 120s.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority-p1type-bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions