Overview
Resumes a workflow that was paused or interrupted. Use when a build was stopped mid-process and you want to continue from where it left off.
Only works on workflows in "paused" status. Completed or failed workflows cannot be resumed.
Parameters
Session ID of the workflow to resume
Format : UUID
Get it from : bilt_get_session
Example : "550e8400-e29b-41d4-a716-446655440000"
Response
Session ID (same as input)
New status after resume (typically "running")
ISO 8601 timestamp when workflow was resumed
Example Usage
{
"session_id" : "550e8400-e29b-41d4-a716-446655440000"
}
When to Use
Workflow Was Paused
User: "Continue building my app"
Agent workflow:
1. Call bilt_get_session()
2. Check if status === "paused"
3. Call bilt_resume_workflow(session_id)
4. Workflow continues from where it stopped
After Connection Loss
If a workflow was interrupted due to network issues:
Agent: "I see your build was paused. Let me resume it..."
Agent calls bilt_resume_workflow()
Agent: "Build is continuing now."
User Manually Paused
User: "Pause the build"
Agent: *pauses workflow*
[Later]
User: "Resume the build"
Agent: *calls bilt_resume_workflow()*
Common Patterns
Check Status Before Resuming
async function resumeIfPaused ( sessionId ) {
const session = await bilt_get_session ({ session_id: sessionId });
if ( session . status === 'paused' ) {
await bilt_resume_workflow ({ session_id: sessionId });
return 'Workflow resumed' ;
}
if ( session . status === 'running' ) {
return 'Workflow is already running' ;
}
if ( session . status === 'completed' ) {
return 'Workflow already completed' ;
}
return 'Cannot resume workflow in current state' ;
}
Resume and Monitor
// Resume workflow and track progress
await bilt_resume_workflow ({ session_id });
// Poll for completion
while ( true ) {
const session = await bilt_get_session ({ session_id });
if ( session . status === 'completed' ) {
console . log ( 'Build complete!' );
break ;
}
await sleep ( 2000 );
}
Error Scenarios
400 - Cannot Resume
400 - Already Completed
401 - Unauthorized
404 - Session Not Found
409 - Conflict
429 - Rate Limited
{
"error" : "Cannot resume workflow" ,
"details" : {
"current_status" : "running" ,
"message" : "Workflow is already running"
}
}
Best Practices
Always check workflow status before attempting to resume: const session = await bilt_get_session ({ session_id });
if ( session . status !== 'paused' ) {
console . log ( `Cannot resume: workflow is ${ session . status } ` );
return ;
}
await bilt_resume_workflow ({ session_id });
Handle resume failures gracefully
If resume fails, offer alternatives: try {
await bilt_resume_workflow ({ session_id });
} catch ( error ) {
if ( error . status === 400 ) {
// Can't resume - offer to start fresh
await bilt_send_message ({
session_id ,
message: "Continue previous build"
});
}
}
Workflow State Transitions
Only the "paused" state can transition to "running" via resume. Other states require different actions.
Next Steps
After resuming workflow:
Monitor progress - Use bilt_get_session
View logs - Use bilt_get_messages
Cancel if needed - Use bilt_cancel_workflow