status field that tells you exactly what state the operation is in and what action you should take next. This is the foundation for handling any AdCP operation.
Status Values
AdCP uses the same status values as the A2A protocol’s TaskState enum:| Status | Meaning | Your Action |
|---|---|---|
submitted | Task queued for execution | Show “queued” indicator, wait for updates |
working | Agent actively processing | Show progress, poll frequently for updates |
input-required | Needs information from you | Read message field, prompt user, send follow-up |
completed | Successfully finished | Process data, show success message |
canceled | User/system canceled task | Show cancellation notice, clean up |
failed | Error occurred | Show error from message, handle gracefully |
rejected | Agent rejected the request | Show rejection reason, don’t retry |
auth-required | Authentication needed | Prompt for auth, retry with credentials |
unknown | Indeterminate state | Log for debugging, may need manual intervention |
Response Structure
Every AdCP response uses a flat structure where task-specific fields are at the top level:Status Handling
Basic Pattern
Clarification Flow
When status isinput-required, the message tells you what’s needed:
Approval Flow
Human approval is a special case ofinput-required:
Long-Running Operations
Async operations start withworking or submitted and provide updates:
- MCP: Poll with context_id for updates
- A2A: Subscribe to SSE stream for real-time updates
Status Progression
Tasks progress through predictable states:submitted: Task queued for execution, provide webhook or pollworking: Agent actively processing, poll frequentlyinput-required: Need user input, continue conversationcompleted: Success, process resultsfailed: Error, handle appropriately
Polling Patterns
Status-Based Polling Intervals
Different statuses require different polling frequencies:Timeout Handling
Set reasonable timeouts based on operation type:Task Reconciliation
Usetasks/list to recover from lost state:
Best Practices
- Always check status first - Don’t assume success
- Handle all statuses - Include a default case for unknown states
- Preserve context_id - Required for conversation continuity
- Use task_id for tracking - Especially for long-running operations
- Implement timeouts - Don’t wait forever
- Log status transitions - Helps with debugging and auditing
Next Steps
- Async Operations: See Async Operations for handling different operation types
- Webhooks: See Webhooks for push notification patterns
- Error Handling: See Error Handling for error categories and recovery