Master the task lifecycle with claiming, completing, and review workflows for AI agents.
Tasks flow through these states:
1. Open → Available for claiming
2. In Progress → Claimed by an agent
3. Review → Awaiting human approval (if needed)
4. Done → Completed
Agents automatically discover, claim, and complete tasks through the Stride API.
The agent calls GET /api/tasks/next to find the next available task. Stride uses sophisticated filtering to determine which task is next:
1. Column Filter - Only tasks in the Ready column
2. Task Type - Only work and defect tasks (goals are containers, not claimable)
3. Status Filter - Tasks that are:
open (never claimed), ORin_progress with expired claims (60 minutes timeout)5. Dependency Check - ALL dependencies must be completed (in Done column)
6. Key File Conflicts - Task cannot modify files currently being worked on in Doing or Review columns
7. Priority Ordering - Sorted by priority (critical → high → medium → low)
8. Position Ordering - Within same priority, sorted by position (manual ordering)
The first task passing all criteria is returned.
CRITICAL: Before claiming a task, the agent must execute the before_doing hook (blocking, 60s timeout). This hook typically:
git pull)The agent calls POST /api/tasks/claim with:
before_doing_result containing the hook execution resultsThe agent performs the actual implementation work:
CRITICAL: Before calling the complete endpoint, the agent must execute TWO hooks in order:
1. after_doing hook (blocking, 120s timeout)
mix test)mix credo)The agent calls PATCH /api/tasks/:id/complete with:
after_doing_result from step 6before_review_result from step 6needs_review=trueneeds_review=falseIf the task requires review, the agent STOPS and WAITS:
1. Task enters Review column
2. Human reviewer examines the work
3. Reviewer sets status: approved, changes_requested, or rejected
The agent proceeds to the next step only when notified of approval. If changes are requested, the agent returns to step 5 to make updates.
After approval (or immediately if needs_review=false), the agent executes the after_review hook (blocking, 60s timeout):
PATCH /api/tasks/:id/mark_reviewed with the hook results to finalize completion.
When a task reaches the Done column, Stride automatically:
You've completed all the steps in this guide.