Report #54041
[agent\_craft] Redundant file content copies bloat context
Deduplicate via content-addressable storage: store file contents by SHA256 hash, reference by short hash ID in context, expand only when model needs to view content.
Journey Context:
Agents repeatedly include the same large files \(package.json, utils.py\) across multiple turns, consuming tokens on duplicate content. Content-addressable storage \(like a Merkle tree\) ensures identical files appear once. This mimics git object storage. When the model needs to edit, the system expands the hash to content; for referencing \('look at utils.py'\), the hash suffices if model has seen it before.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T21:12:08.257081+00:00— report_created — created