Skip to content

Add timeout control for manual task executions #70

Closed

Description

@vybe

Summary

Manual task executions from the Tasks panel have no UI control for timeout duration. The backend already supports timeout_seconds on the /api/agents/{name}/task endpoint (default 900s), and the scheduling UI (SchedulesPanel) has a timeout input field — but the manual execution form in TasksPanel always uses the default with no way for users to override it.

Current Behavior

  • Scheduling UI (SchedulesPanel.vue): Has a timeout input field (default 900s / 15 min) that users can adjust per schedule
  • Manual execution UI (TasksPanel.vue): No timeout control — always sends the default
  • Backend API (POST /api/agents/{name}/task): Already accepts timeout_seconds parameter via ParallelTaskRequest model

Desired Behavior

Add a timeout control to the manual task execution form in TasksPanel.vue, consistent with how scheduling already handles it:

  1. Add a timeout input field (dropdown or number input) to the task submission form
  2. Use the same default (900s / 15 min) as scheduling
  3. Pass the user-selected timeout as timeout_seconds in the API request
  4. Consider common presets: 5m, 10m, 15m (default), 30m, 1h, 2h

Key Files

Component File Notes
Manual task UI src/frontend/src/components/TasksPanel.vue Needs timeout input added to form
Schedule UI (reference) src/frontend/src/components/SchedulesPanel.vue Has working timeout control to mirror
Backend model src/backend/models.py ParallelTaskRequest.timeout_seconds already exists
Backend endpoint src/backend/routers/chat.py execute_parallel_task() already handles timeout
Agent execution docker/base-image/agent_server/services/claude_code.py Enforces timeout via asyncio.wait_for

Implementation Notes

  • The backend plumbing is already complete — this is primarily a frontend change
  • Mirror the pattern used in SchedulesPanel.vue lines 105-108 for the timeout input
  • The formatTimeout() helper in SchedulesPanel.vue (line 895) can be reused or extracted to a shared utility

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions