PPTX export produces PowerPoint repair dialog and removes unreadable content

Open 💬 3 comments Opened Mar 31, 2026 by rdtowers

What version of Codex CLI is running?

codex-cli 0.117.0

What subscription do you have?

Not specified

Which model were you using?

Not specified

What platform is your computer?

macOS

What issue are you seeing?

A generated .pptx file opens in Microsoft PowerPoint with a repair flow, which indicates the exported presentation contains invalid or unreadable content.

Affected file:

generated_presentation_ascii.pptx

When opening the file, PowerPoint shows:

PowerPoint found a problem with content in generated_presentation_ascii.pptx.
PowerPoint can attempt to repair the presentation.

If you trust the source of this presentation, click Repair.

After clicking Repair, PowerPoint shows:

PowerPoint couldn't read some content in generated_presentation_ascii - Repaired and removed it.

Please check your presentation to see if the rest of it looks ok.

So the file is not cleanly readable by PowerPoint and some content is removed during repair.

What steps can reproduce the bug?

  1. Use Codex to generate or refine a PowerPoint presentation and export it as a .pptx.
  2. Save the generated file as:

generated_presentation_ascii.pptx

  1. Open the file in Microsoft PowerPoint.
  2. Observe that PowerPoint does not open it normally and instead shows a repair prompt.
  3. Click Repair.
  4. Observe that PowerPoint reports unreadable content was repaired and removed.

What is the expected behavior?

The generated .pptx should open in Microsoft PowerPoint without any repair prompt, and no content should be removed.

Additional information

  • I searched existing issues in openai/codex and did not find one matching this specific PowerPoint repair-dialog failure mode.
  • This appears distinct from issue #15427, which is about artifact runtime release availability rather than malformed PPTX contents.
  • If useful, I can provide:
  • the generated .pptx
  • the exact prompt used to generate or refine it
  • the PowerPoint repair log XML, if PowerPoint produced one
  • screenshots of the repair dialogs

View original on GitHub ↗

3 Comments

Whatsonyourmind · 4 months ago

This is a common issue when generating PPTX files programmatically — PowerPoint is very strict about Open XML compliance, much more so than LibreOffice or Google Slides.

The root cause is usually one of these:

  • Relationship ID mismatches in the .rels files (media references pointing to wrong targets)
  • Empty or malformed chart XML (PowerPoint rejects empty series, null categories, or misordered child elements)
  • Slide layout references that don't match the actual slide masters in the file

The underlying problem is that when an LLM generates python-pptx or PptxGenJS code, it doesn't validate the resulting XML against the OOXML spec — it just hopes the output is valid. And for simple decks it usually is, but once you get into charts, images, or complex layouts, the XML compliance becomes fragile.

Some approaches that help:

  1. Run the output through Open XML SDK validation before saving
  2. Use a PPTX rendering engine that handles the OOXML compliance layer (so the AI generates structured content, not code that writes XML)
  3. Embed charts as static PNGs rather than native chart XML — sidesteps most chart-related repair issues

The broader pattern is: separate "what goes on the slide" (content, which the LLM is good at) from "how it gets serialized to OOXML" (rendering, which needs deterministic compliance).

Fiddlehead-MB · 1 month ago

this is such a huge opportunity for someone to fix. Neither claude or open ai are solving for "make masters and layouts;" only for "pretty demo."

MaxwellaSchmutz · 6 hours ago

A PowerPoint file is secretly just a zip folder full of text files. When I drew something for slides, I gave each arrow a little internal label for its proportions. The label I used, "adj," is the right name for rounded rectangles but the wrong name for arrows, which use "adj1" and "adj2" instead. Basically I spelled one word wrong.

Almost every program shrugs at that typo. PowerPoint doesn't. It reads the label, can't find it, panics, and throws away everything else on the slide. That's the repair prompt I kept seeing.

When PowerPoint "repaired" the file, it just kept throwing away the items I wanted and pretending it was fixed

That's it. I am attaching an .md so that it can explain to claude the likely issue for you and it will fix it most likely.

pptx-solve.md