Resolve Task
Resolves a chat that's blocked waiting for user input and continues the conversation.
Usage
Use this endpoint when a chat is blocked on user input. This includes interacting with plan mode, answering agent questions, confirming integration installations, and responding to permission requests.
The submitted task.type must match the blocked task from the most recent assistant message. If the latest message is not the task you are resolving, the endpoint returns 409 Conflict.
If a task payload is structurally valid but empty in a way that would not carry meaningful user intent, the endpoint returns 422 Unprocessable Entity. For example, blank plan-exit-response.content, empty answered-questions.answers, and empty confirmed-permissions.permissions are rejected.
import { v0 } from 'v0-sdk'const result = await v0.chats.resolveTask({ chatId: '123', task: { type: 'plan-exit-response', status: 'approved', content: 'Proceed with the implementation.', },})console.log(result)Before You Call It
Inspect the latest assistant message first. The blocked task is exposed in experimental_content on:
GET /v1/chats/{chatId}GET /v1/chats/{chatId}/messages/{messageId}
Submit the matching resolution payload for the latest blocked task only.
Task Types
confirmed-steps
Use when the assistant is blocked on integration, MCP preset, script, or environment setup. To reject the agent's request, pass an empty array for the relevant field.
{
"task": {
"type": "confirmed-steps",
"connectedIntegrationNames": ["Supabase"],
"connectedMcpPresetNames": ["Linear"],
"appliedScripts": ["scripts/bootstrap.sh"],
"addedEnvVars": ["SUPABASE_URL"]
}
}plan-exit-response
Use when the assistant proposed a plan and is waiting for approval, rejection, or requested changes.
{
"task": {
"type": "plan-exit-response",
"status": "request-changes",
"content": "Keep the API shape but split validation into a helper."
}
}answered-questions
Use when the assistant asked one or more multiple-choice questions.
{
"task": {
"type": "answered-questions",
"answers": [
{
"questionId": "db-choice",
"questionText": "Which database should I use?",
"selectedLabels": ["PostgreSQL"]
}
]
}
}confirmed-permissions
Use when the assistant is blocked on tool or environment variable approval. The submitted permissions must match the permissions currently pending on the latest blocked assistant message.
{
"task": {
"type": "confirmed-permissions",
"permissions": [
{
"type": "ALLOW_DYNAMIC_TOOL_STRICT",
"toolName": "SystemAction",
"input": {
"systemAction": "executeScript",
"executeScript": "/app/scripts/migrate.sql"
}
}
]
}
}API Signature
Request
Path Parameters
The unique identifier of the chat containing the pending task. Provided as a path parameter.
Body
The task resolution payload. The latest message in the active chat fork must be an assistant message blocked on the matching task type.
The blocked task type being resolved.
Controls how the response is delivered.
Overrides for the model behavior.
Response
Returns the updated chat object, using the same response shape as GET /v1/chats/{chatId}.
Send Message
Creates a new message in an existing chat. Triggers a model response using the provided prompt, with optional attachments and configuration settings.
Find Chat Messages
Retrieves a list of all messages for a specific chat, ordered by creation date (newest first). Supports cursor-based pagination and includes message content, role, and type information.