OfficeCLI icon indicating copy to clipboard operation
OfficeCLI copied to clipboard

[FEATURE] Provide an opt-out for the `OfficeCLI.Version` / `OfficeCLI.LastModified` custom properties written on every save

Open Flint8777 opened this issue 3 months ago • 1 comments

Summary

Every save injects two custom document properties into docProps/custom.xml:

  • OfficeCLI.Version (e.g. 1.0.144)
  • OfficeCLI.LastModified (UTC timestamp)

If the part does not exist it is created (and registered in [Content_Types].xml / _rels/.rels); if it exists, the properties are appended next to whatever is already there (verified alongside a third-party GrammarlyDocumentId property). There is currently no flag or environment variable to disable this.

Reproduced on docx, xlsx, and pptx with v1.0.144.

Why an opt-out matters

  • Deliverables: documents submitted to journals, funding agencies, or clients carry a tool fingerprint plus an editing timestamp in file properties that the author may not want to disclose. (PDF export drops it, but plenty of workflows exchange the Office file itself.)
  • Diff hygiene: for version-controlled documents, the timestamp property guarantees a docProps/custom.xml diff on every save even when nothing else changed.
  • Idempotence: a no-op batch that ends in a flush still mutates the file because of the timestamp.

Reproduction

cp any-office-authored.docx repro.docx
officecli set repro.docx "/body/p[1]" --prop bold=true --json
officecli close repro.docx
# unzip -p repro.docx docProps/custom.xml
# → <op:property ... name="OfficeCLI.Version"><vt:lpwstr>1.0.144</vt:lpwstr></op:property>
#   <op:property ... name="OfficeCLI.LastModified"><vt:lpwstr>2026-08-21T...Z</vt:lpwstr></op:property>

Proposal

Any of the following would work (first is simplest):

  • OFFICECLI_NO_FINGERPRINT=1 environment variable, or a --no-fingerprint / config setting
  • Write OfficeCLI.Version only when the property set actually changed, and drop OfficeCLI.LastModified (the OS mtime already carries this)
  • Document the behavior in SKILL.md so agents can strip the properties after editing deliverables

Flint8777 avatar Aug 21 '26 12:08 Flint8777

Standard practice, and it helps us pin down which build caused an issue. Not planning to implement an opt-out.

goworm avatar Aug 30 '26 13:08 goworm