> ## Documentation Index
> Fetch the complete documentation index at: https://docs.delino.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Unit Tasks

> Create and manage single-focus development tasks with AI automation

Unit tasks are DevBird's building blocks for straightforward development work. Each unit task focuses on a single objective and can generate multiple pull requests to complete it.

## Creating a unit task

1. Navigate to your DevBird dashboard
2. Select your repository from the dropdown
3. Enter your task description in the prompt field
4. **Leave "Create as Composite Task" unchecked** for unit tasks
5. (Optional) Configure advanced settings:
   * AI Agent: Choose your preferred AI coding agent
   * Model Version: Specify the model version
   * Base Branch: Choose the branch to work from
6. Click **Create Task**

## Task lifecycle

### 1. Pending

Your task is created and queued for execution. DevBird prepares to trigger the GitHub Actions workflow.

### 2. In Progress

The AI agent is actively working on your task:

* Analyzing your requirements
* Writing code
* Creating pull requests
* Running tests

**Detailed Status**: When a task is in progress, DevBird shows detailed information about what's currently happening:

* "Creating initial implementation..." - AI is writing the first version
* "Addressing PR review feedback..." - Responding to review comments
* "Fixing CI failures..." - Attempting to fix failing tests
* "Updating pull request..." - Making requested changes

This gives you real-time visibility into the current workflow execution phase.

### 3. Completed

The task is marked complete when all pull requests are merged. This means:

* All code changes have been reviewed and approved
* All PRs have been merged to their target branches
* The task objectives have been successfully implemented

### 4. Failed

The task encountered an error. Common reasons:

* GitHub Actions workflow failed
* Invalid configuration
* AI agent encountered an issue

You can retry failed tasks from the task details page.

## Task details page

The task details page shows:

### Task overview

* Task title (automatically generated from your prompt)
* Original prompt
* Repository and branch information
* Current status
* Creation timestamp

### Pull requests

All PRs created for this task:

* PR title and number
* Status (open/closed/merged)
* CI check results
* Review comment count
* Links to GitHub

### Workflow executions

History of all workflow runs for this task, including:

**Direct task workflows:**

* Task creation - Initial implementation
* Task retries - Retry after failure

**PR-related workflows:**

* PR updates - Manual update requests
* PR reviews - Responses to review feedback
* PR CI fixes - Automatic fixes for failing checks

**Details shown:**

* Execution status (pending/in\_progress/completed/failed)
* Workflow type
* Timestamps (created, started, completed)
* GitHub Actions run link (when available)
* Retry button for failed executions

## Managing pull requests

### Automatic PR comments

When a PR is created, DevBird adds two types of comments:

**Task link comment** (always added):

* Links back to the DevBird task
* Provides context for reviewers

**Task prompt comment** (optional, enabled by default):

* Shows the original task prompt
* Helps reviewers understand the AI's instructions
* Can be disabled in [Settings](/devbird/settings)

### PR workflow

1. **PR Creation** - AI creates PR and opens it for review
2. **Draft Status** - PR is converted to draft during automated updates
3. **Code Review** - Team members review the changes
4. **AI Responds** - DevBird automatically responds to review comments
5. **CI Checks** - Automated tests run
6. **CI Fixes** - DevBird fixes failing checks automatically
7. **Ready to Merge** - PR is undrafted when all checks pass

## Updating a pull request

You can manually request updates to any PR:

1. Go to the task details page
2. Find the PR you want to update
3. Click **Update PR**
4. Enter your update instructions
5. DevBird converts the PR to draft and makes the changes

## Retrying a task

If a task fails, you can retry it:

1. Go to the task details page
2. Click **Retry Task** in the workflow executions section
3. The task will re-execute with the same configuration

## Syncing task status

Use the sync feature to refresh task status from GitHub:

1. Go to the task details page
2. Click **Sync Task** in the Debug menu
3. DevBird checks all PRs and updates the task status automatically:
   * **All PRs merged** → Task marked as completed
   * **All PRs closed without merge** → Task marked as failed
   * **PRs still open** → Status remains in progress

## Deleting a task

Deleting a task:

* Closes all open pull requests
* Cancels any running workflows
* Removes the task from your dashboard

**Note**: This action cannot be undone.

## Best practices

### Write clear prompts

Be specific about what you want:

**Good prompts:**

```
Fix the null pointer exception in UserService.java when email is missing
```

```
Add rate limiting to the /api/auth endpoint with 10 requests per minute
```

```
Update the user profile page to show avatar upload with preview
```

**Avoid vague prompts:**

```
Fix the bug
```

```
Make it better
```

```
Update the code
```

### Include context

Reference specific files, functions, or error messages:

```
Fix the CORS error on line 45 of server.js when calling from localhost:3000
```

### Use file references

Include file paths with `@` for better AI understanding:

```
Refactor @src/services/payment.ts to use the new PaymentProcessor interface
```

### Specify requirements

Include technical requirements or constraints:

```
Add user authentication using JWT tokens with 24-hour expiration,
stored in httpOnly cookies
```

### Break down large tasks

For complex work, consider using [Composite Tasks](/devbird/tasks/composite) or creating multiple unit tasks.

## Troubleshooting

See the [Unit Task Troubleshooting](/devbird/troubleshooting/unit-task) guide for common issues and solutions.

## Next steps

* Learn about [Composite Tasks](/devbird/tasks/composite)
* Understand [PR Review Process](/devbird/reviewing-prs)
* Configure [AI Agents](/devbird/ai-agents/claude-code)
