Overview
Stops a workflow that is currently running or paused. Use when you want to abort a build/deployment that is no longer needed or is taking too long.Parameters
Session ID of the workflow to cancel
- Format: UUID
- Get it from: bilt_get_session
- Example:
"550e8400-e29b-41d4-a716-446655440000"
Optional reason for cancellation
- Max length: 500 characters
- Example:
"User requested cancellation" - Usage: Helpful for logs and debugging
Response
Session ID (same as input)
New status after cancellation (
"cancelled")ISO 8601 timestamp when workflow was cancelled
Confirmation message
Example Usage
Basic Cancellation
With Reason
When to Use
User Requests Stop
Build Taking Too Long
User Changed Mind
Detected Error During Build
Common Patterns
Cancel with Confirmation
Cancel and Start Fresh
Cancellation States
Can Cancel
runningpausedpending
Cannot Cancel
completedfailedcancelled(already cancelled)
Best Practices
Confirm before cancelling
Confirm before cancelling
For important workflows, ask the user first:
Provide reason
Provide reason
Include a reason for better logging:
Check status first
Check status first
Don’t attempt to cancel completed workflows:
Offer alternatives
Offer alternatives
After cancelling, help the user move forward:
Error Handling
Workflow State After Cancellation
Once cancelled, a workflow cannot be resumed. You’ll need to start a new workflow.
What Happens to Resources?
When you cancel a workflow:- Build stops immediately - No further processing
- Partial changes may exist - Code may be partially generated
- No deployment - App won’t be deployed
- Logs preserved - You can still view what was done
- Session remains - Session history is kept for debugging
Related Tools
bilt_get_session
Check workflow status
bilt_resume_workflow
Resume instead of cancel
bilt_send_message
Start new workflow
Next Steps
After cancelling workflow:- Start fresh - Use bilt_send_message
- Check logs - Use bilt_get_messages
- Verify status - Use bilt_get_session
