Use buildkite-agent annotate to attach Markdown-formatted status information to a build or job in the Buildkite UI, with configurable style, context, and append/update behavior.
domain: buildkite.com/docs · 8 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗
Documented steps
Usage: `buildkite-agent annotate [body] [options...]`, run from within a job. Body can be a CLI argument or piped stdin, e.g. `cat annotation.md | buildkite-agent annotate --style "warning"`. Doc: https://buildkite.com/docs/agent/cli/reference/annotate
Bodies are written in CommonMark Markdown with GitHub Flavored Markdown extensions. Maximum size of each annotation body is 1MiB.
Set visual style with `--style` (env $BUILDKITE_ANNOTATION_STYLE): one of success, info, warning, or error, e.g. `buildkite-agent annotate --style "success" --context "junit"`.
Use `--context <value>` (env $BUILDKITE_ANNOTATION_CONTEXT, 100-character limit) to give the annotation a unique identifier; re-running annotate with the same context updates that annotation instead of creating a new one, and omitting --context targets the default context.
Use `--append` (env $BUILDKITE_ANNOTATION_APPEND) to append new content to an existing annotation's body (matched by context) instead of replacing it.
Use `--priority <1-10>` (default 3) to control display order — priority 10 shows first, priority 1 shows last — and `--scope build|job` (default "build") to control where the annotation is displayed.
You can update only the style of an existing annotation by omitting the body and providing a new `--style` value while reusing the same `--context`.
Remove an annotation with `buildkite-agent annotation remove`. Doc: https://buildkite.com/docs/agent/cli/reference/annotate
Known gotchas
`--context` is capped at 100 characters and the annotation body at 1MiB — plan large or many-part output around these limits.
Re-running annotate with the same `--context` replaces/updates that annotation rather than adding a new one; leave `--context` unset only when you intend the default context.
Omitting the body updates only the style of the annotation matched by the given `--context`, leaving its existing content untouched.
`--redacted-vars` (default patterns: *_PASSWORD, *_SECRET, *_TOKEN, *_PRIVATE_KEY, *_SSH_KEY, *_ACCESS_KEY, *_SECRET_KEY, *_CONNECTION_STRING, *_API_KEY) controls redaction of the agent's own logging around this command — it does not scrub secrets you deliberately print inside the annotation body.
`--scope` defaults to "build"; pass `--scope job` explicitly to attach the annotation to a specific job instead.
Give your agent this knowledge — and 18,200+ more routes
One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?