## TL;DR
Parse dbt artefacts with a tolerant, version-aware reader: read the manifest's schema version first, access node fields defensively since dbt adds and renames fields between versions, and never assume the artefact's top-level layout matches the last dbt release. Most manifest parse failures are a dbt upgrade changing the artefact, not corruption.

```text
agent couldn't parse dbt manifest json error failed to read artifacts
```

## Use this when
- The check or run fails with this symptom: the agent errors while parsing the manifest JSON.
- You are working on an agent failing to read the dbt manifest JSON artefacts and the failure repeats on the same data or configuration.
- You need the failing rows, rule, or stage isolated before changing thresholds or code.

## Not for this skill when
- A missing manifest because the dbt run never produced artefacts, which is a run problem rather than a parse problem instead.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. Open the manifest and record its schema version field and its size, and confirm the file is complete JSON. Verify: the manifest version and completeness are confirmed
2. Find the exact field access that throws in the agent's parser and compare it with the manifest's actual structure at that path. Verify: the mismatched field access is pinpointed
3. Check the dbt version that produced the manifest against the version the parser was written for. Verify: producer and parser version expectations are compared
4. Make the parser version-aware or field-defensive, with clear errors naming the missing field and the manifest version. Verify: the parser handles the current manifest and reports clearly
5. Parse manifests from the project's recent dbt versions and confirm the agent reads each correctly. Verify: the parser passes across the version set

## Variant phrasings
### agent could not parse dbt manifest json artefacts
The verbatim manifest-parse phrasing.
### dbt manifest schema version parser breaking change
The version-change phrasing for artefact schemas.
### agent read run_results manifest dbt version aware
The version-aware phrasing for defensive parsing.

Compatibility: dbt manifest.json and run_results.json artefacts parsed by agents

## Why it happens
dbt evolves its artefact schemas with each release, adding nodes, metrics, semantic entities, and fields. A parser written against one version's exact shape breaks on the next, and because artefacts are large, the failure looks like file corruption until the version field is checked.

## Edge cases / pitfalls
- Prefer dbt's documented artefact fields and ignore unknown ones; strictness about extras guarantees future breakage.
- Keep a sample manifest per dbt version in tests so upgrades are caught before the agent is.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_UfP758gkwFJKKK-mrrvINw
