Overview
Control endpoints allow you to manage task execution flow by pausing, resuming, or cancelling running tasks. These operations give you fine-grained control over agent behavior.Available Operations
Pause
Temporarily halt task execution. The session remains active and can be resumed later.Resume
Continue execution of a paused task from where it left off.Cancel
Stop the current task execution. The session remains active and can receive new messages.State Transitions
Pause vs Cancel vs Delete
| Operation | Effect | Use When |
|---|---|---|
| Pause | Temporary stop, can resume | Need to interrupt briefly |
| Cancel | Stop task, session stays active | Want to abandon current task |
| Delete | Destroy entire session | Completely done with session |
Use Cases
Rate Limiting
Pause during rate limit, resume after cooldown period.User Verification
Pause for user approval before proceeding with sensitive operations.Temporary Interruption
Pause to adjust task parameters or send updated instructions.Emergency Stop
Cancel task execution when user requests immediate stop.Best Practices
After cancelling, the session remains active. Send a new message to start a different task, or delete the session to clean up.
Cancelled sessions can still receive new messages to start fresh tasks. Deleted sessions are permanently removed.