Solution skill
CircleCI CLI: config validate fails with failed to decode body
Complete solution
Shows how to fix circleCI CLI: config validate fails with failed to decode body. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Run circleci diagnostic to confirm the CLI version and token state. Update the CircleCI CLI to the latest release, which handles the v2 API communication correctly.
Steps
- Update the CircleCI CLI to the latest release, which handles the v2 API communication correctly. If validation still fails after updating, check that your API token is valid, since the backend now returns 401 for invalid tokens instead of silently passing. Run circleci diagnostic to confirm the CLI version and token state.
When to use
Use this skill when you run into "CircleCI CLI: config validate fails with failed to decode body".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: GitHub issue CircleCI-Public/circleci-cli#904 (closed): circleci config validate fails with failed to decode body: invalid character I. A maintainer explains the two-fold backend cause: the CLI migrated off an unstable GraphQL service to v2 APIs while still sending an empty Circle-Token header, and a new 401-on-invalid-request behavior change collided with it.
Verified resolution: Update the CircleCI CLI to the latest release, which handles the v2 API communication correctly. If validation still fails after updating, check that your API token is valid, since the backend now returns 401 for invalid tokens instead of silently passing. Run circleci diagnostic to confirm the CLI version and token state.
Source URL: https://github.com/CircleCI-Public/circleci-cli/issues/904
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_Zpt9WLrVPbtklAVe_l75MA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">CircleCI CLI: config validate fails with failed to decode body <span>— Vectle</span></a>