Creating Tasks
Tasks are the primary unit of work in Optio. Each task represents a single agent run against a repository — the agent reads the prompt, writes code, and opens a pull request. You can create tasks from multiple sources.
From the Dashboard
The fastest way to create a task is through the web UI.
- Navigate to Tasks → New Task
- Select the target repository from the dropdown
- Enter a title — this becomes the branch name and PR title
- Write a description — this is the prompt the agent receives. Be specific about what to implement, where to make changes, and any constraints
- Optionally set priority (lower number = higher priority)
- Click Create Task
The task enters the queue and is picked up by the task worker. You can watch live logs in the task detail view as the agent works.
Tip
From Task Templates
If you frequently create similar tasks, save them as templates. Templates store the repo, prompt, agent type, and metadata so you can create tasks with a single click.
- Go to Templates in the sidebar
- Create a template with your base prompt and settings
- Click Run on any template to instantly create a task
From GitHub Issues
Optio can browse GitHub Issues from your connected repositories and turn them into tasks.
Manual Assignment
- Navigate to the Issues view in the dashboard
- Browse issues across all connected repos
- Click Assign to Optio on any issue
- Optio creates a task with the issue title as the task title and the issue body as the prompt
Automatic Sync
Configure a GitHub Issues ticket provider to automatically sync issues into Optio tasks. The ticket sync worker runs periodically and picks up new issues based on your filter configuration.
- Go to Settings and configure a GitHub Issues ticket provider
- Set the sync scope (labels, assignees, or all issues)
- New matching issues are automatically created as tasks
Info
GITHUB_TOKEN secret must be configured for issue browsing and syncing. Add it in Secrets if you haven't already.From Linear
Optio integrates with Linear as a ticket provider, syncing Linear issues into tasks.
- Add a Linear ticket provider in Settings
- Configure your Linear API key and team/project scope
- The ticket sync worker polls Linear for new issues matching your configuration
- Matching issues are created as Optio tasks with the Linear issue title and description
From the API
Create tasks programmatically via the REST API. This is useful for CI/CD pipelines, chatbots, or custom integrations.
{
"title": "Add email validation to signup form",
"prompt": "Add client-side and server-side email validation to the signup form in src/components/SignupForm.tsx. Use Zod for schema validation. Show inline error messages below the input field.",
"repoUrl": "https://github.com/acme/webapp",
"repoBranch": "main",
"agentType": "claude",
"priority": 0
}curl -X POST https://optio.example.com/api/tasks \
-H "Content-Type: application/json" \
-H "Cookie: optio_session=YOUR_SESSION_TOKEN" \
-d '{
"title": "Add email validation to signup form",
"prompt": "Add client-side and server-side email validation...",
"repoUrl": "https://github.com/acme/webapp",
"agentType": "claude"
}'Task Fields
| Field | Required | Description |
|---|---|---|
| title | Yes | Task title (becomes branch name and PR title) |
| prompt | Yes | The full prompt/instructions for the agent |
| repoUrl | Yes | Repository URL (must be connected in Optio) |
| repoBranch | No | Branch to base the work on (defaults to repo default) |
| agentType | No | Agent type: "claude" or "codex" (defaults to "claude") |
| priority | No | Integer priority (lower = higher, default 0) |
| metadata | No | Arbitrary JSON metadata for tracking |
From Schedules
Create recurring tasks with cron-based schedules. Useful for regular maintenance like dependency updates, security audits, or documentation refreshes.
- Go to Schedules in the sidebar
- Create a schedule with a cron expression and task template
- The schedule worker checks for due schedules and creates tasks automatically
Task Priority & Ordering
Tasks have an integer priority field where lower numbers mean higher priority. You can reorder tasks in two ways:
- Dashboard — drag-and-drop reordering in the task list
- API —
POST /api/tasks/reorderwith an array of task IDs in desired order
Bulk Operations
Manage multiple tasks at once:
POST /api/tasks/bulk/retry-failed— retry all failed tasks at oncePOST /api/tasks/bulk/cancel-active— cancel all running and queued tasks
What Happens After Creation
Once created, a task flows through the task lifecycle:
- Enters the queue (
pending → queued) - Task worker provisions a repo pod or reuses an existing one
- Agent runs in an isolated git worktree
- Agent opens a PR and the task transitions to
pr_opened - PR watcher monitors CI, reviews, and merge status
- On merge:
completed. On failure: retried automatically or manually