Skip to main content
POST
https://cloud.blackbox.ai
/
api
/
tasks
/
{taskId}
/
continue
curl --location 'https://cloud.blackbox.ai/api/tasks/YOUR_TASK_ID/continue' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "currentPrompt": "Also add unit tests for the new payment module"
}'
{
  "success": true,
  "message": "Task continue started successfully"
}
This endpoint allows you to continue an existing task by sending a follow-up prompt. The agent will pick up where it left off, applying your new instructions to the same repository and branch.

Authentication

To use this API, you need a BLACKBOX API Key. Follow these steps to get your API key:
  1. Click on your Profile Image in the top right corner at cloud.blackbox.ai
  2. Click on “BLACKBOX API Token” from the dropdown menu
  3. Copy the existing token or click “Generate” if you don’t have one yet
Your API key will be in the format: bb_xxxxxxxxxxxxxxxxxxxxxx

GitHub Connection Required

For GitHub-related tasks: Make sure you have connected your GitHub account on https://cloud.blackbox.ai before continuing tasks that work with repositories. This is required for the agent to access and modify your repositories.

Headers

Authorization
string
required
API Key of the form Bearer <api_key>.Example: Bearer bb_b41b647ffbfed27f61656049d3eaeef3d903cc503345d9eb80080d98bc0
Content-Type
string
required
Must be set to application/json.

Path Parameters

taskId
string
required
The unique identifier of the task to continue.Example: ac2wbk3lXAufdSdIscsirg

Request Parameters

currentPrompt
string
required
The follow-up instruction or message for the agent. This is appended to the task’s history so the agent has full context of prior work.Examples:
  • "Also add unit tests for the new payment module"
  • "The Stripe webhook handler is missing error handling, please fix it"
  • "Summarize what was done so far"
selectedAgent
string
Override the agent for this follow-up. If omitted, the task’s original agent is used.Available agents: claude, blackbox, codex, gemini, blackbox-grok
selectedModel
string
Override the model for this follow-up. If omitted, the task’s original model is used.Example: blackboxai/blackbox-pro, blackboxai/anthropic/claude-sonnet-4.5
maxDuration
number
Maximum execution time in seconds for this follow-up. Defaults to the original task’s maxDuration.
keepAlive
boolean
Whether to keep the sandbox alive after this follow-up completes. Defaults to false.
installDependencies
boolean
Whether to run dependency installation before executing this follow-up. Defaults to false.
environmentVariables
string
Environment variables to inject into the sandbox for this follow-up, as a newline-separated KEY=VALUE string.Example: "STRIPE_KEY=sk_test_xxx\nNODE_ENV=production"
globalInstructions
string
Additional system-level instructions to prepend to the agent’s context for this follow-up.
multiLaunch
boolean
Set to true to run this follow-up across multiple agents in parallel. Requires selectedAgents.
selectedAgents
array
Array of agent configurations for multi-agent follow-up mode. Required when multiLaunch is true.Structure: Each object must contain:
  • agent (string, required): The agent type
  • model (string, required): The specific model to use
Minimum: 2 agents when multiLaunch is true

How Task Continuation Works

  1. Follow-up stored: Your currentPrompt is appended to the task’s followupMessages array
  2. Context rebuilt: The agent receives the full history of prior prompts and outputs as context
  3. Sandbox resumed: A new sandbox is created (or reused) from the task’s existing branch
  4. Agent executes: The agent applies your new instructions on top of prior work
  5. Changes committed: Any new changes are committed to the same branch
  6. Status updated: The task status returns to completed (or error) when done
curl --location 'https://cloud.blackbox.ai/api/tasks/YOUR_TASK_ID/continue' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "currentPrompt": "Also add unit tests for the new payment module"
}'
{
  "success": true,
  "message": "Task continue started successfully"
}

Polling for Follow-up Completion

After calling continue, the task’s followupMessages array is updated with the new follow-up entry. Poll Get Task and inspect the last element of followupMessages:
Follow-up Message Structure
{
  "message": "Also add unit tests for the new payment module",
  "timestamp": "2025-11-21T10:35:00.000Z",
  "selectedAgent": "blackbox",
  "selectedModel": "blackboxai/blackbox-pro",
  "status": "completed",
  "statusMessage": null
}
status valueMeaning
processingAgent is actively working on the follow-up
completedFollow-up finished successfully
errorFollow-up failed; see statusMessage for details

Error Codes

Status CodeErrorDescription
200SuccessFollow-up started successfully
400Bad RequestMissing currentPrompt or invalid multi-agent configuration
401UnauthorizedInvalid or missing API key
402Payment RequiredInsufficient credits for the selected model
404Not FoundTask not found or access denied
500Internal Server ErrorFile upload or sandbox creation failed