TeamCity CLI Help

Managing the Build Queue

The build queue holds builds waiting to be assigned to an available agent. The teamcity queue command group lets you inspect queued builds, control their priority, approve builds that require manual approval, and remove builds from the queue.

Listing queued builds

View all builds currently in the queue:

teamcity queue list

Filter by job:

teamcity queue list --job MyProject_Build

Limit results and output as JSON:

teamcity queue list --limit 20 teamcity queue list --json teamcity queue list --json=id,state,buildType.name,triggered.user.name,webUrl

queue list flags

Flag

Description

-j, --job

Filter by job (build configuration) ID

-n, --limit

Maximum number of queued runs to display

--json

Output as JSON. Use --json= to list available fields, --json=f1,f2 for specific fields.

Prioritizing a build

Move a queued build to the top of the queue, giving it the highest priority:

teamcity queue top 12345

This is useful when a critical build needs to run before others in the queue.

Approving a build

Some build configurations require manual approval before they can run. Approve a queued build:

teamcity queue approve 12345

Removing a build from the queue

Remove a build from the queue:

teamcity queue remove 12345

Use --force to skip the confirmation prompt:

teamcity queue remove 12345 --force
22 February 2026