# Examples of Cache Debt

> See practical examples of Cache Debt in prompts, embeddings, agent logs, model files, Docker volumes, build caches, and generated test output.

Canonical page: https://www.cacheddebt.com/examples/

Ten places retained AI state outlives its usefulness, grouped by what it costs you.

## Ten examples with cleanup actions

Main cost: Security.

### Agent transcripts

Agent tools write every tool result to plaintext transcripts on disk, including files and secrets the agent read. [15](https://www.cacheddebt.com/sources/#claude-code-directory)

Cleanup: Set a retention period, purge finished projects, and rotate credentials an agent saw. [Commands](https://www.cacheddebt.com/checklist/#claude-code)

Main cost: Security.

### Credentials in saved context

API keys and tokens pasted into a session stay in its history and memory files after the task ends. [15](https://www.cacheddebt.com/sources/#claude-code-directory)

Cleanup: Search retained context for key patterns, delete matches, and rotate the keys. [Commands](https://www.cacheddebt.com/checklist/#claude-code)

Main cost: Data loss.

### Orphaned Docker volumes

Volumes outlive the services that created them, and a routine prune keeps them by default. [7](https://www.cacheddebt.com/sources/#docker-prune)

Cleanup: Match each volume to a running container before removing it. Never run a volume prune blind. [Commands](https://www.cacheddebt.com/checklist/#docker)

Main cost: Output quality.

### Embeddings from an old model

Vectors from different embedding models are not comparable, so a half-finished migration degrades retrieval without an error. [4](https://www.cacheddebt.com/sources/#voyage-embedding-migration)

Cleanup: Store the model ID on every vector and re-embed or delete mismatches. [Commands](https://www.cacheddebt.com/checklist/#embeddings)

Main cost: Output quality.

### Embeddings of changed documents

A vector keeps representing a source after the source is edited or deleted.

Cleanup: Store a content hash per vector and compare it with the current source. [Commands](https://www.cacheddebt.com/checklist/#embeddings)

Main cost: Output quality.

### Carried-forward context

Old instructions and history ride along into new tasks, and longer inputs lower model performance. [2](https://www.cacheddebt.com/sources/#chroma-context-rot)

Cleanup: Summarize what still matters, drop the rest, and start new tasks with fresh context. [Commands](https://www.cacheddebt.com/checklist/#prompts)

Main cost: Output quality.

### Unused prompt versions

Superseded prompts stay loaded by a service nobody remembers, so behavior differs between environments.

Cleanup: Version every prompt, map its consumers, and delete versions nothing loads. [Commands](https://www.cacheddebt.com/checklist/#prompts)

Main cost: Disk.

### Old model revisions

Hugging Face keeps every downloaded revision. Nothing in the cache is deleted automatically. [5](https://www.cacheddebt.com/sources/#hf-cache)

Cleanup: List repos by size and prune revisions no project loads. [Commands](https://www.cacheddebt.com/checklist/#hugging-face)

Main cost: Disk.

### Stale browser builds

Browser builds installed outside Playwright's own manager stay after the project upgrades. We measured 920 MB of one. [13](https://www.cacheddebt.com/sources/#playwright-browsers)

Cleanup: Compare installed builds with the version your project pins, then uninstall the rest. [Commands](https://www.cacheddebt.com/checklist/#playwright)

Main cost: Disk.

### Package caches

npm, pip, and uv caches grow with every experiment. npm states clearing them is only for reclaiming space. [10](https://www.cacheddebt.com/sources/#npm-cache)

Cleanup: Measure them, and prune on a schedule when disk is tight. [Commands](https://www.cacheddebt.com/checklist/#uv)

Main cost names what each example damages while it stays. To decide what to fix first on your own systems, use the [Cache Debt Score](https://www.cacheddebt.com/score/).
