Failure code reference

August 13, 2026 · View on GitHub

Agent Scan uses X001 through X009 for operational conditions encountered during discovery, inspection, and analysis. These codes describe whether the scan itself completed successfully; they are not security findings and have no risk score.

Failure codes can appear beside an MCP server, skill, or scan path in the human-readable report. In JSON, the corresponding error object contains the structured category, message, and is_failure value.

Agent Scan v0.5.x

Important

Agent Scan v0.5.x is planned for deprecation. This remains the correct failure-code reference for current v0.5.x users.

In v0.5.x, security finding codes and operational failure codes share the --ignore-issues-codes flag. For example, --ignore-issues-codes W001,X001 ignores one security finding and one operational failure during --ci evaluation. The X* codes themselves are operational and are not security issues.

See the v0.5.x CI flags and v0.5.x JSON errors for details.

Agent Scan v0.6 and later

In v0.6 and later, operational failures have their own --ignore-failure-codes flag, separate from --ignore-risks. Codes are case-sensitive. Ignoring a failure code prevents that code from causing a --ci exit but does not remove the error from human-readable or JSON output.

See the v0.6-and-later CI flags.

Code mapping

CodeError categoryMeaningNormally fails --ci
X001server_startupA stdio MCP server could not be started or did not complete its startup handshake.Yes
X002skill_scan_errorA skill could not be collected, validated, or inspected.Yes
X003file_not_foundA configured or well-known path does not exist. This is normally an informational discovery result.No
X004unknown_configA file does not match a supported MCP configuration format. This is normally informational.No
X005parse_errorA configuration file exists but could not be parsed or validated.Yes
X006server_http_errorA remote MCP server returned an HTTP or transport error during inspection.Yes
X007analysis_errorAgent Scan could not reach or successfully use the analysis API.Yes
X008UnclassifiedAn operational error did not have a recognized category.Yes
X009user_declinedThe user declined permission to start a stdio MCP server.Yes

The is_failure field is the source of truth for CI behavior. X003 and X004 normally carry is_failure: false, so they do not fail CI even though they are displayed for context. Agent Scan exits with code 1 when at least one security finding or unignored operational error with is_failure: true remains.

There is no X010 code.

Ignoring operational failures in v0.6 and later

--ignore-failure-codes accepts a comma-separated list and is valid only with --ci:

uvx snyk-agent-scan@latest \
  --ci \
  --dangerously-run-mcp-servers \
  --ignore-failure-codes X001,X007

Unknown codes produce a warning and are not applied. Security risks are unaffected; use --ignore-risks separately when necessary.