Skip to content

Implement single-task execution lifecycle (assign, execute, complete) #21

@Aureliolo

Description

@Aureliolo

Context

Implement the full single-agent task lifecycle per spec 6.1. This covers the complete flow from task creation through assignment, execution, and completion, including all status transitions, artifact collection, and proxy overhead metrics.

Acceptance Criteria

Task Lifecycle

  • Task status transitions enforced: CREATED → ASSIGNED → IN_PROGRESS → IN_REVIEW → COMPLETED (or BLOCKED/CANCELLED)
  • Task assignment: agent receives task with full context and acceptance criteria
  • Agent executes task using LLM + tools from the agent engine
  • Status transitions validated (no invalid jumps, e.g., CREATED → COMPLETED)
  • Artifacts collected during execution (files created, outputs generated)
  • Task completion includes summary of work done
  • Error handling: task failure with reason, timeout with configurable duration

Proxy Overhead Metrics (§10.5 M3)

  • Cost tracked for the entire task lifecycle
  • turns_per_task: number of LLM turns to complete a task
  • tokens_per_task: total tokens (input + output) consumed
  • cost_per_task: total USD cost (derived from existing CostRecord data)
  • Metrics available on task completion for analysis

Testing

  • Unit tests for status state machine
  • Integration test for full lifecycle (assign → execute → complete)

Dependencies

Design Spec Reference

  • §6.1, §6.2 — Task Lifecycle and Workflow
  • §10.5 — LLM Call Analytics (M3: proxy overhead metrics)

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:criticalBlocks other work, must do firstprio:highImportant, should be prioritizedscope:medium1-3 days of workspec:agent-systemDESIGN_SPEC Section 3 - Agent Systemspec:providersDESIGN_SPEC Section 9 - Model Provider Layerspec:task-workflowDESIGN_SPEC Section 6 - Task & Workflow Enginespec:toolsDESIGN_SPEC Section 11 - Tool & Capability Systemtype:featureNew feature implementationtype:testTest coverage, test infrastructure

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions