Lesstep
Azure Pipelines · logging commands · Checked November 10, 2026

Azure Pipelines: "##_vso[" in the log, and the variable is not set

The task printed your logging command, but the agent didn't run it. Since June 2026, Microsoft has been changing its tasks so that ##vso[ in output from a remote machine, or from a tool the task runs, comes out as ##_vso[: a fix for logging-command injection, where output the pipeline doesn't control sets variables or fails the job. The agent acts only on lines that start with ##vso[, so the variable is never set, the step still succeeds, and a later step reads an empty value. From an SSH@0 0.277.0 log: ##_vso[task.setvariable variable=returnValue;isOutput=true]0 (azure-pipelines-tasks #22352).

Tasks that changed

TaskChange (merged)What it touches
SSH@00.277.0 (#22297, June 26)Output from the remote machine
PowerShellOnTargetMachines@3, AzureFileCopy3.277.1 escaped everything (#22282, June 25) and was reverted; now only commands outside an allow list (#22451, August 26)Output from the remote machine
Docker@2, DockerCompose#22477, September 16Docker output
Kubernetes@1, KubernetesManifest@1#22542, September 23; #22631, October 19kubectl output
Npm@0, Npm@1#22646, October 9npm output, including your package scripts; Npm@1 is also no longer allowed to set variables
SqlAzureDacpacDeployment@1#22663, October 16SqlPackage output
PublishCodeCoverageResults@2#22700, October 20The coverage tool's output

Merge dates in 2026; a change reaches your pipeline when the new task version reaches your organization, and the version is at the top of the step's log. Helm and Xcode have the same change under review (#22768, #22801). Microsoft's logging commands page doesn't mention it yet.

When the variable feeds a pull request's build validation: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists the pull request's branch policies with their state in IntelliJ IDEA, Rider or PyCharm, and with Pro runs a failed build policy again once the step is fixed. Its Pipelines tab (version 1.0.86 and later) lists the runs of the repositories you have open and opens a failed task's log in the editor, free to read.

Getting the value across again

- bash: |
    value=$(ssh deploy@contoso-vm 'cat /opt/app/version')
    echo "##vso[task.setvariable variable=appVersion;isOutput=true]$value"
  name: remote

Is it this?

Search the step's log for ##_vso[. If the line still starts with ##vso[ and the value is still empty in another job or stage, the logging command ran, and the cause is how the variable is read: see an output variable is empty in the next job or stage.

Similar pages

Azure DevOps pull requests in IntelliJ IDEA, Rider and PyCharm

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and with Pro you run a failed or expired build policy again from there. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps and Azure Pipelines are trademarks of Microsoft Corporation; IntelliJ IDEA, Rider and PyCharm are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: Output variable is empty · Step names must be unique · Build validation · 日本語