---
title: "Resolve Task"
method: POST
path: "/chats/{chatId}/messages/resolve"
tags: ["Messages"]
---

# Resolve Task

`POST /chats/{chatId}/messages/resolve`

Resolves a pending task in a chat. Blocks until the model response is complete and returns the resulting message.

## Path parameters

- `chatId` string, required — The unique identifier of the chat.

## Request body

- object
  - `task` union, required — The task resolution data. Use this when the chat is waiting for user input on the matching task type.
    - object — Resolves an integration installation task. The agent asked the user to install integrations, MCP presets, or set environment variables. Send this after provisioning the integration on Vercel.
      - `type` 'confirmed-steps', required
      - `connectedIntegrationNames` string[] — Names of integrations that were successfully connected (e.g. "Neon", "Supabase"). Pass an empty array to skip.
      - `connectedMcpPresetNames` string[] — Names of MCP presets that were connected (e.g. "Linear", "Sentry"). Pass an empty array to skip.
      - `appliedScripts` string[] — Names of scripts that were applied.
      - `addedEnvVars` string[] — Names of environment variables that were added.
    - object — Resolves a plan review task. The agent proposed an implementation plan and is waiting for approval.
      - `type` 'plan-exit-response', required
      - `status` 'approved' | 'rejected' | 'request-changes', required — Whether the plan is approved, rejected, or needs changes.
      - `content` string, required — Feedback or instructions for the agent.
    - object — Resolves a question task. The agent asked the user one or more multiple-choice questions.
      - `type` 'answered-questions', required
      - `answers` object[], required — Answers to the questions the agent asked.
        - `questionId` string, required — The ID of the question being answered.
        - `questionText` string, required — The text of the question being answered.
        - `selectedLabels` string[], required — The labels of the selected options. For single-select questions, pass one item.
        - `customText` string — Free-form text input, used when the user selects "Other" or wants to add context.
    - object — Resolves a permission request task. The agent wants to execute a tool (shell command, script, MCP call) and needs approval. Also used to resolve environment variable prompts.
      - `type` 'confirmed-permissions', required
      - `permissions` object[], required — The permissions to grant. Pass the suggestedPermissions from the stopped task.
        - `type` 'ALLOW_DYNAMIC_TOOL_STRICT', required
        - `toolName` string, required — The name of the tool being permitted.
        - `input` unknown, required
        - `taskNameActive` string, nullable — Label shown while the tool is running (e.g. "Running migration").
        - `taskNameComplete` string, nullable — Label shown after the tool completes (e.g. "Migration complete").
        - `userMessage` string — Optional message from the user about this permission.
      - `userMessage` string — Optional message from the user about the permission grant.
    - object — Resolves a Vercel Connect setup task. The agent asked the user to complete connector setup in a browser (a `configure_vercel_connect` agent action with `status: "setup-required"`). Complete setup at the action’s `setupUrl`, poll GET /chats/{chatId}/connect/status until it returns `ready`, then send this task. The server verifies the setup result and attaches the connector; no connector ID is needed. Returns 409 if setup is still pending or failed, or 404 if setup has not started or the request expired.
      - `type` 'vercel-connect-setup', required
  - `modelConfiguration` object — Overrides for the model behavior.
    - `modelId` 'v0-mini' | 'v0-pro' | 'v0-max' | 'v0-max-fast' — Model to use for the generation.
    - `imageGenerations` boolean — Enables image generations to generate up to 5 images per version.

## Response `200`

A single message in a chat.

- Message — A single message in a chat.
  - `id` string, required — Unique message identifier.
  - `chatId` string, required — ID of the chat this message belongs to.
  - `role` 'user' | 'assistant', required — Who produced this message.
  - `createdAt` string, date-time, required — ISO timestamp when the message was created.
  - `updatedAt` string, date-time, required — ISO timestamp when the message was last updated.
  - `content` string, required — The trailing prose of the message — the agent’s closing summary, or the user’s message text. Empty string when there is no closing prose.
  - `parts` union[], required — Ordered list of parts that make up the message. Iterate to render the full narrative including thinking, file operations, tool calls, and prose.
    - union — A single entry in the ordered narrative of a message. Iterate `parts` in order to render the full transcript.
      - object — A block of text output by the agent.
        - `type` 'text', required
        - `text` string, required — Markdown prose written by the agent or user.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — Extended thinking output by the agent.
        - `type` 'thinking', required
        - `text` string, required — The agent's reasoning trace.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — Files read by the agent.
        - `type` 'file-read', required
        - `paths` string[], required — The file paths the agent read in this step.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — The agent created, modified, deleted, renamed, or patched a file.
        - `type` 'file-edit', required
        - `operation` 'create' | 'update' | 'delete' | 'rename' | 'patch', required — The type of file edit performed.
        - `path` string, required — The target file path.
        - `toPath` string — The new path when operation is "rename".
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — The agent searched for something.
        - `type` 'search', required
        - `scope` 'repo' | 'web', required — Whether the agent searched the repository or the web.
        - `query` string, required — The search query.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — The agent ran a shell command.
        - `type` 'bash', required
        - `command` string, required — The shell command that was executed.
        - `output` string — Combined stdout/stderr captured from the terminal. May be empty if the command produced no output.
        - `exitCode` integer, nullable — Process exit code, when available. Reserved for future use; currently always omitted.
        - `isDangerous` boolean — True if the command was flagged as potentially dangerous and required explicit user approval.
        - `timeoutMs` integer — Command timeout in milliseconds, when configured.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — The agent invoked a tool (MCP, integration, or other dynamic tool). For shell commands, use the "bash" part instead.
        - `type` 'tool-call', required
        - `name` string, required — The name of the tool that was invoked (e.g. an MCP tool name or built-in tool identifier).
        - `input` unknown
        - `output` unknown
        - `status` 'ok' | 'error', required — Whether the tool call succeeded or returned an error.
        - `suggestedPermissions` object[] — Present when the agent is blocked waiting for you to approve this tool call (for example, running a setup or migration script). Pass these objects back unchanged as the `permissions` of a `confirmed-permissions` task to approve. Omitted once the tool has run.
          - `type` 'ALLOW_DYNAMIC_TOOL_STRICT', required — Permission grant type.
          - `toolName` string, required — The tool this permission authorizes.
          - `input` unknown
          - `taskNameActive` string, nullable — Internal label for the in-progress task. Pass back unchanged.
          - `taskNameComplete` string, nullable — Internal label for the completed task. Pass back unchanged.
          - `userMessage` string — Optional message associated with the permission.
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
      - object — A typed escape hatch for agent actions that don’t fit the other part types. Forward-compatible: new action types may appear without API version changes.
        - `type` 'agent-action', required
        - `name` string, required — Stable identifier for the action (e.g. "generate_image", "manage_todos", "diagnostics"). See documentation for the registry of known names.
        - `summary` string, required — A short human-readable summary of what happened. Always populated so clients can render something even without knowing the action name.
        - `data` union — Structured payload for input-requesting actions. Present on `ask_user_questions`, `exit_plan_mode`, `get_or_request_integration`, and `configure_vercel_connect` parts when the agent is waiting on you; narrow by the part `name`. Omitted for actions that do not carry structured data.
          - object — Structured payload for an `ask_user_questions` agent action.
            - `questions` object[], required — The questions the agent is waiting for answers to. Resolve with an `answered-questions` task.
              - …
          - object — Structured payload for an `exit_plan_mode` agent action.
            - `plan` string, required — The full proposed plan, as Markdown.
            - `summary` string — A concise summary of the plan, when available.
            - `path` string, required — The path the plan applies to.
          - object — Structured payload for a `get_or_request_integration` agent action.
            - `requestedIntegrations` string[], required — Integration names the agent is asking you to connect (for example, "Neon"). Pass these back in `connectedIntegrationNames` when resolving with a `confirmed-steps` task.
            - `requestedMcpPresets` string[], required — MCP preset names the agent is asking you to add. Pass these back in `connectedMcpPresetNames` when resolving with a `confirmed-steps` task.
          - union
            - object — Connector setup is pending. Complete setup at `setupUrl`, poll GET /chats/{chatId}/connect/status until `ready`, then resolve with a `vercel-connect-setup` task.
              - …
            - object — The Connect action finished; no user input is needed.
              - …
        - `startedAt` string, date-time — ISO timestamp when this part began.
        - `finishedAt` string, date-time — ISO timestamp when this part completed.
  - `finishReason` 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other', nullable, required — The reason why message generation finished, including standard completion reasons and error states.
  - `restorable` boolean, required — True when this is an assistant message that produced restorable code and is not the currently active code.
  - `attachments` object[] — Files attached to this message.
    - `url` string, required — URL to the attachment.
    - `name` string — Original filename, when available.
    - `contentType` string — MIME type.
    - `size` integer — Size in bytes.
  - `authorId` string, nullable, required — ID of the user who authored a user message; null for assistant messages.
  - `usage` object, required — Token usage and credit cost. All values are zero on user messages and on assistant messages that have not yet generated tokens.
    - `tokens` object, required — Token counts for this message.
      - `input` number, required — Prompt input value (non-cached).
      - `output` number, required — Completion output value.
      - `cacheRead` number, required — Cache-read input value.
      - `cacheWrite` number, required — Cache-write input value.
      - `total` number, required — Sum of input, output, cacheRead, and cacheWrite.
    - `creditsCost` object, required — Credit cost for this message.
      - `input` number, required — Prompt input value (non-cached).
      - `output` number, required — Completion output value.
      - `cacheRead` number, required — Cache-read input value.
      - `cacheWrite` number, required — Cache-write input value.
      - `total` number, required — Sum of input, output, cacheRead, and cacheWrite.

## Other responses

- `401` — Response for status 401
- `403` — Response for status 403
- `404` — Response for status 404
- `409` — Response for status 409
- `422` — Response for status 422
- `500` — Response for status 500

---

[API](https://skmtc.net/vercel/apis/v0-platform-api-beta.md) · [All operations](https://skmtc.net/vercel/apis/v0-platform-api-beta/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vercel/v0-platform-api-beta/versions/7c7a496f8022/schema)
