feat: Agent 2A - Recurring Tasks Implementation #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
recurring_root_idlinking all spawned tasks to original rootWhat Was Built
is_recurring,recurrence_pattern,max_occurrences,recurring_root_id,recurrence_trigger,clone_subtasks_on_recur,has_spawned_nextcreate_next_occurrence()- Creates next task when current is completedrecurring_root_idmax_occurrenceschecked viaCOUNT(*)query, not stored counterhas_spawned_nextflag prevents re-spawn on re-completion1m,5m,10m,15m,30m,1h,daily,weekly,monthlyFiles Changed
Backend API
packages/api/src/taskflow_api/models/task.py- 7 new recurring fieldspackages/api/src/taskflow_api/routers/tasks.py- Spawn logic + helper functionspackages/api/src/taskflow_api/schemas/task.py- Schema updates with validationMCP Server (Agent Parity)
packages/mcp-server/src/taskflow_mcp/api_client.py- Recurring params supportpackages/mcp-server/src/taskflow_mcp/models.py- Model updatespackages/mcp-server/src/taskflow_mcp/tools/tasks.py- Tool interface updatesWeb Dashboard
web-dashboard/src/app/projects/[id]/tasks/new/page.tsx- Recurring form fieldsweb-dashboard/src/app/tasks/[id]/page.tsx- Display recurring statusweb-dashboard/src/app/tasks/page.tsx- List view indicatorsweb-dashboard/src/types/index.ts- TypeScript typesChatKit Integration
packages/api/src/taskflow_api/services/chat_agent.py- Agent tool updatespackages/api/src/taskflow_api/services/chatkit_server.py- Server updatespackages/api/src/taskflow_api/services/widgets/task_form.py- Form widgetArchitectural & Design Concerns
🔴 Critical (Should Fix Before Production)
recurrence_triggerHas Unimplemented Values -on_due_dateandbothare stored but no background job existsrecurring_root_idneedsindex=Truefor query performance🟡 Medium (Should Address)
🟢 Low (Future Consideration)
new_taskvariable unused inapprove_taskrecurrence_patternPositive Aspects
✅ Clean chain tracking design using
recurring_root_id+ COUNT query✅ Proper audit logging for all spawn events
✅ Full agent parity - MCP tools support recurring task creation
✅ UI integration - Both web form and ChatKit form support recurring fields
✅ Duplicate prevention via
has_spawned_nextflag✅ Subtask cloning is configurable per-task
Test Plan
Questions for Review
🤖 Generated with Claude Code