a. Subtasks — Level 2 task decomposition for sandbox agent execution
| Field | Type | Required | Description |
|---|
| orgId | string | Yes | Organization ID for multi-tenant isolation |
| taskId | Id<"tasks"> | Yes | |
| programId | Id<"programs"> | Yes | Parent program reference |
| title | string | Yes | |
| description | string | Yes | |
| prompt | string | Yes | |
| estimatedFiles | number | Yes | |
| complexityScore | number | Yes | |
| estimatedDurationMs | number | Yes | |
| allowedFiles | string[] | No | |
| order | number | Yes | |
| isPausePoint | boolean | Yes | |
| status | ”pending” | “executing” | “retrying” | “completed” | “failed” | “skipped” | Yes | |
| retryCount | number | Yes | |
| commitSha | string | No | |
| filesChanged | string[] | No | |
| scopeViolations | string[] | No | |
| executionDurationMs | number | No | |
| errorMessage | string | No | |
| priorChangelog | string | No | |
| Name | Fields |
|---|
| by_task | taskId, order |
| by_program | programId |
| by_org | orgId |
| by_status | taskId, status |