# buildkite-agent build

The Buildkite agent's `build` subcommands provide the ability to control builds.

## Canceling a build

### Usage

`buildkite-agent build cancel [options...]`

### Description

Cancel a running build.

### Example

```shell
# Cancels the current build
$ buildkite-agent build cancel
```

### Options



| `--no-color ` # | Don't show colors in logging (default: false) **Environment variable**: `$BUILDKITE_AGENT_NO_COLOR` |
| --- | --- |
| `--debug ` # | Enable debug mode. Synonym for `--log-level debug`. Takes precedence over `--log-level` (default: false) **Environment variable**: `$BUILDKITE_AGENT_DEBUG` |
| `--log-level string` # | Set the log level for the agent, making logging more or less verbose. Defaults to notice. Allowed values are: debug, info, error, warn, fatal (default: "notice") **Environment variable**: `$BUILDKITE_AGENT_LOG_LEVEL` |
| `--experiment string` # | Enable experimental features within the buildkite-agent **Environment variable**: `$BUILDKITE_AGENT_EXPERIMENT` |
| `--profile string` # | Enable a profiling mode, either cpu, memory, mutex or block **Environment variable**: `$BUILDKITE_AGENT_PROFILE` |
| `--agent-access-token string` # | The access token used to identify the agent **Environment variable**: `$BUILDKITE_AGENT_ACCESS_TOKEN` |
| `--endpoint string` # | The Agent API endpoint (default: "https://agent-edge.buildkite.com/v3") **Environment variable**: `$BUILDKITE_AGENT_ENDPOINT` |
| `--no-http2 ` # | Disable HTTP2 when communicating with the Agent API (default: false) **Environment variable**: `$BUILDKITE_NO_HTTP2` |
| `--debug-http ` # | Enable HTTP debug mode, which dumps all request and response bodies to the log (default: false) **Environment variable**: `$BUILDKITE_AGENT_DEBUG_HTTP` |
| `--trace-http ` # | Enable HTTP trace mode, which logs timings for each HTTP request. Timings are logged at the debug level unless a request fails at the network level in which case they are logged at the error level (default: false) **Environment variable**: `$BUILDKITE_AGENT_TRACE_HTTP` |
| `--build string` # | The build UUID to cancel **Environment variable**: `$BUILDKITE_BUILD_ID` |



