> ## Documentation Index
> Fetch the complete documentation index at: https://bilt.me/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# bilt_cancel_workflow

> Cancel a running workflow for a project

## Overview

Stops the active workflow for a project. Use when you want to abort a build or deployment that is no longer needed or is taking too long.

<Warning>
  Canceling a workflow cannot be undone. The workflow stops immediately and its progress is lost.
</Warning>

## Parameters

<ParamField path="projectId" type="string" required>
  The project whose workflow should be cancelled

  * **Format**: UUID
  * **Example**: `"660e8400-e29b-41d4-a716-446655440001"`
</ParamField>

## Response

<ResponseField name="success" type="boolean" required>
  Whether the cancellation succeeded
</ResponseField>

<ResponseField name="sessionId" type="string">
  Session identifier for the project
</ResponseField>

## Example Usage

<CodeGroup>
  ```json Request theme={null}
  {
    "projectId": "660e8400-e29b-41d4-a716-446655440001"
  }
  ```

  ```json Response theme={null}
  {
    "success": true,
    "sessionId": "550e8400-e29b-41d4-a716-446655440000"
  }
  ```
</CodeGroup>

## When to Use

```text theme={null}
User: "Stop the build"

Agent workflow:
1. Call bilt_get_session({ projectId })
2. If a workflow is active, call bilt_cancel_workflow({ projectId })
3. Confirm: "Build cancelled"
```

<Info>
  Once cancelled, start a new workflow with [bilt\_send\_message](/docs/api-reference/bilt_send_message).
</Info>

## Related Tools

<CardGroup cols={3}>
  <Card title="bilt_get_session" icon="clock" href="/docs/api-reference/bilt_get_session">
    Check workflow status
  </Card>

  <Card title="bilt_send_message" icon="paper-plane" href="/docs/api-reference/bilt_send_message">
    Start new workflow
  </Card>

  <Card title="bilt_get_messages" icon="message" href="/docs/api-reference/bilt_get_messages">
    Review conversation history
  </Card>
</CardGroup>
