An agent using my document pipeline answered a question about a vendor contract with clause numbers that didn't exist. The clause had been struck out during review — but the RAG index still had it.
I pulled the DOCX apart. Word documents are zip archives, and tracked changes live in word/document.xml as first-class citizens: insertions are wrapped in <w:ins>, deletions in <w:del>, and deleted text sits in its own element type, <w:delText>. Critically, an unaccepted revision stays in the file forever — nothing removes it until someone clicks Accept in Word.
My converter's text walker collected every text-ish node. Since <w:delText> quacks like a text node, out it came, interleaved with the surviving text. One 14-page contract came back with roughly 2,100 extra words — about 9% of the total — and all of it was language that had been rejected.
The fix was less deleting and more classifying:
<w:del> (including <w:delText> runs) is metadata about the document's history, not its content. Drop it.<w:ins> wrappers can simply be unwrapped — the text inside is live, just tagged.<w:moveFrom>/<w:moveTo> pairs from drag-edits, and <w:rPrChange>, which is formatting-only noise that still bloats the XML if you do anything naive like regex over the raw file.
I also added an accept_revisions option: on gives you the document "as if everyone clicked Accept"; off keeps strikethrough text visible for tools that genuinely want a redline. Default is stripped, because a retrieval pipeline has no business quoting text a lawyer deleted.
The lesson generalizes: document files are databases of editorial intent, and "visible in Word" is not the same as "part of the document." If your pipeline ingests contracts or redlined drafts, check whether deleted clause text survives a round trip.
I folded all of this into my DOCX-to-Markdown converter (https://x402.freeq.one/tools/docx_to_markdown.html) — revisions stripped by default, redline mode if you explicitly ask for it.