Skip to content

Tickets and delegation

Tickets are the unit-of-work aggregate in Control Center. They represent a task, issue, or piece of work that needs to be done. Tickets are vendor-agnostic — they can exist purely locally or be synced with external providers like Linear.

Tickets replaced the former “tasks” feature. Ticket is now the single unit-of-work aggregate.

AttributeDescription
titleShort summary
descriptionDetailed description (Markdown)
statusLifecycle state (open, in_progress, blocked, done, cancelled, failed)
priorityPriority level
providerWhere the ticket lives: local or linear
externalKeyThe ID in the external provider (if any)
assignedAgentIdWhich agent is working on this ticket
assignedTeamIdWhich team is working on this ticket
delegatedByAgentIdWhich agent delegated this ticket
channelIdThe conversation channel for this ticket
modeConversation mode for the dispatch
pipelineRunIdThe pipeline run that created this ticket (if any)
projectIdWhich project this ticket belongs to
parentTicketIdParent ticket for hierarchy
expectedOutputSchemaJSON Schema for the expected output
outputJsonThe actual output when completed
executionLockedAtOptimistic concurrency lock
open → in_progress → done
→ failed
→ cancelled
→ blocked → in_progress (unblocked)

The TicketWorkflowService manages lifecycle transitions with:

  • Optimistic concurrency — a version field prevents conflicting updates
  • Workspace isolation — every mutation validates workspaceId ownership
  • Audit trail — all state changes are tracked

When a ticket is assigned to an agent:

  1. TicketAssigned domain event fires
  2. TicketDispatcher picks it up
  3. Runs a readiness check (is the agent available? is the workspace ready?)
  4. Ensures a conversation channel exists for the agent + ticket
  5. Transitions the ticket from open to in_progress
  6. Dispatches the agent with the ticket context

The dispatcher is the sole owner of the assigned-ticket→agent dispatch flow. It dispatches exactly once per assignment.

Tickets support parent/child relationships via parentTicketId. This enables:

  • Breaking down a large task into subtasks
  • Agents creating child tickets for sub-problems they encounter
  • Pipeline steps creating child tickets for parallel execution

TicketLink creates directional dependencies between tickets:

Link typeDescription
blocksThe source ticket blocks the target
relatesToThe tickets are related
duplicateOfThe source is a duplicate of the target

A Project is a workspace-scoped grouping of tickets toward a shared goal. Projects are Control Center-only — they never sync to external providers.

Projects have:

  • Name and description
  • Color (for visual identification)
  • Status: active, completed, archived

TicketSyncService handles bidirectional sync with external providers:

  • Pull: remote tickets are mirrored into local tickets
  • Push: local state changes are mirrored back to the provider
  • The workflow service stays free of infrastructure concerns

Pipelines can create, complete, and cancel tickets via the TicketWorkflowPort:

  • A pipeline step can create a ticket as output
  • A pipeline trigger can fire on TicketAssigned or TicketCompleted
  • Tickets can carry pipelineRunId to track which run created them

TicketCollaborator tracks who is working on a ticket:

  • Agent collaborators with roles (owner, contributor)
  • The human user (sentinel 'user')
  • Joined timestamp