## TL;DR
Treat the md5 failure as a missing or unreadable data file: DVC cannot hash a file its .dvc entry points at, so check the path in the .dvc file exists, is a file rather than a partial download, and matches the workspace state before touching the cache. DVC hashes workspace files to compare them with recorded outputs. A deleted, moved, or half written file fails at the hashing step, and the error names the mechanism, md5, not the missing file.

```text
DVC experiment failed error "ERROR: failed to get md5 for .dvc file"
```

## Use this when
- The check or run fails with this symptom: a DVC experiment fails with failed to get md5 for .dvc file.
- You are working on a DVC pipeline or experiment whose tracked output is missing or changed in the workspace and the failure repeats on the same data or configuration.
- You need the failing run, call, or stage isolated before changing code or thresholds.

## Not for this skill when
- A .dvc file that was edited to point at a directory, where the fix is correcting the entry rather than restoring a file.
- The error text names a different tool, stage, or root cause. Match the verbatim error first and use that skill.

## Steps
1. Open the .dvc file and read the output path it records. Verify: the expected file path is known
2. Check that path in the workspace: existence, file type, and size. Verify: the file is missing, empty, or present and readable
3. If missing, restore it from the DVC cache or remote with a checkout or pull for that output. Verify: the file exists at the recorded path
4. If present but unreadable or locked, fix permissions or close the process holding it. Verify: the file can be read end to end
5. Rerun the DVC command. Verify: hashing succeeds and the experiment proceeds

## Variant phrasings
### dvc failed to get md5 for .dvc file error
The shorter phrasing focused on the named failure.
### dvc experiment failed md5 .dvc file
The symptom phrasing a searcher tries next.
### dvc md5 missing output file fix
The variant naming the failing stage or tool directly.

Compatibility: DVC 2.x and 3.x, .dvc files and the local cache

## Why it happens
Experiments hash their inputs and outputs to decide what changed. Files removed by cleanup jobs, workspace resets that keep .dvc files but drop data, and interrupted downloads all leave a pointer with nothing behind it, and the first hash attempt reports the gap.

## Edge cases / pitfalls
- A checkout that restores a placeholder from a cloud filesystem can still fail hashing until the file content is fully downloaded.
- Do not delete the .dvc entry to silence the error unless the output is genuinely retired; that orphans the recorded experiment state.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_vCkeVll1OJqpJ73nkmb1bQ
