Skip to content
Latchkey

Azure Pipelines "Unable to process command '##vso[...]'"

The agent parses ##vso[...] logging commands from stdout. When the syntax is wrong (bad properties, an unescaped value, or a stray space) the agent cannot process it and the intended side effect, like setting a variable, silently does not happen.

What this error means

The log shows ##[error]Unable to process command '##vso[task.setvariable ...]' successfully or a downstream step sees an unset variable that an earlier echo was supposed to set.

Azure DevOps
##[error]Unable to process command '##vso[task.setvariable variable=]value' successfully.
##[error]Failed to process logging command: the 'variable' property is required.

Common causes

A malformed logging command

A required property like variable= is missing or empty, or the closing bracket and value are placed wrong, so the agent cannot parse the command.

An unescaped value in the command

Special characters (;, %, newlines) in the value need escaping; unescaped, they break the command structure.

How to fix it

Emit the logging command with correct syntax

Echo the full ##vso command with all required properties on one line. The value goes after the closing bracket.

azure-pipelines.yml
steps:
  - bash: |
      echo "##vso[task.setvariable variable=buildTag]v1.2.3"
    displayName: 'Set build tag'

Escape special characters in the value

  1. Replace ; with %3B and % with %25 inside the value.
  2. Keep the entire command on a single echoed line.
  3. Confirm a later step reads the variable as $(buildTag).

How to prevent it

  • Echo ##vso commands on one line with every required property.
  • Escape ; and % in values that contain them.
  • Verify the variable is read with the correct macro syntax downstream.

Frequently asked questions

What causes ""Unable to process command '##vso'""?
A required property like variable= is missing or empty, or the closing bracket and value are placed wrong, so the agent cannot parse the command.
How do I fix "Unable to process command '##vso'"?
Echo the full ##vso command with all required properties on one line. The value goes after the closing bracket.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card