Codex document skill and Windows DOCX renderer have conflicting LibreOffice requirements
What version of the Codex App are you using (From “About Codex” dialog)?
26.1002.51308, build 13417, production channel.
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows NT 10.0.26300.0 x64
What issue are you seeing?
Codex cannot use LibreOffice for DOCX rendering on my Windows Local session even though LibreOffice is installed at:
C:\Program Files\LibreOffice\program\soffice.exe
The document workflow appears to contain contradictory LibreOffice requirements.
The documents SKILL.md instruction says desktop-installed LibreOffice must not be used and requires the bundled LibreOffice copy.
However, render_docx.py indicates that LibreOffice is bundled only on macOS/Linux and expects an installed soffice.exe on Windows.
The initial renderer error was:
FileNotFoundError: LibreOffice soffice.exe was not found on PATH
Codex later confirmed that:
C:\Program Files\LibreOffice\program\soffice.exe
does exist, but it is not discoverable on this session's PATH.
Because the document skill prohibits using the desktop-installed LibreOffice while the Windows renderer appears to expect an installed LibreOffice, Codex falls back to Word + PDF rendering.
There is no verified LibreOffice sandbox-denial event in this session.
This also caused misleading troubleshooting because Codex initially described soffice.exe as unavailable even though the executable is installed.
Reproduction:
- Open Codex Windows desktop app.
- Use a Local coding session.
- Ask Codex to update a DOCX and render/verify its layout using the document skill.
- The renderer reports that soffice.exe cannot be found on PATH.
- LibreOffice is confirmed installed at C:\Program Files\LibreOffice\program\soffice.exe.
- Codex then reports that the document skill prohibits using the desktop-installed copy and requires bundled LibreOffice.
- render_docx.py nevertheless indicates that Windows expects an installed soffice.exe.
- The workflow falls back to Word + PDF rendering.
What steps can reproduce the bug?
Feedback ID: 01a0b159-4bdc-7712-b3fc-1c64ec1a8678
What is the expected behavior?
The Windows DOCX rendering workflow should have one consistent supported LibreOffice path.
Either:
-
Codex should provide and use the bundled LibreOffice copy required by the document skill, or
-
The document skill should allow the Windows renderer to locate and use a verified system-installed LibreOffice executable such as:
C:\Program Files\LibreOffice\program\soffice.exe
The document skill instructions and render_docx.py should agree about which LibreOffice installation method is supported on Windows.
If system LibreOffice is supported on Windows, Codex should also locate the standard installation path rather than reporting that soffice.exe is unavailable only because it is not on PATH.
Additional information
Surface: Codex Windows desktop app, existing local coding chat.
Target: Local.
Working directory: C:\Users\excel\Documents\Codex\2026-09-18\im-x20
CLI diagnostic: codex-cli 0.162.0-alpha.2
Sandbox mode: workspace-write
Codex configuration: C:\Users\excel.codex\config.toml
[windows] sandbox = "elevated"
The configured sandbox is elevated, not unelevated. This does not establish administrator privileges.
CODEX_HOME: C:\Users\excel.codex
C:\Users\excel.codex.sandbox\sandbox.log does not exist, so no sandbox log excerpt is available.
LibreOffice executable confirmed present: C:\Program Files\LibreOffice\program\soffice.exe
soffice.exe is not currently discoverable on this Codex session's PATH.
No verified LibreOffice sandbox-denial event was found.
Impact: The inconsistency causes misleading diagnostics, unnecessary troubleshooting/retries, and wastes Codex usage even though LibreOffice is already installed.
I can reproduce this same Documents rendering problem on Windows after using the Plugins update action.
The failure occurs at executable discovery:
FileNotFoundError: LibreOffice soffice.exe was not found on PATH
The packaged skill instructs the agent to use bundled LibreOffice and prohibits the desktop-installed copy, while the Windows renderer expects a native soffice.exe discoverable through shutil.which. When LibreOffice is installed but its directory is absent from the process PATH, the resolver fails. This does not by itself establish that LibreOffice is not installed or cannot run.
Suggested resolution:
- Make the Windows skill instructions and supported rendering backend consistent.
- If native LibreOffice is supported, provide an explicit executable override or standard-installation discovery.
- Distinguish “not found on PATH” from “not installed” in the agent's diagnostics.
This is a confirmation of the resolver/instruction mismatch already described in this issue, not a claim that an end-to-end document conversion has succeeded. This comment intentionally excludes machine-specific versions, build numbers, file hashes, installation paths, document contents, and logs.
Building on @DarkEmblemHero's original issue report and @dotteryisabell's confirmation comment: the resolver/instruction mismatch and PATH diagnostics are already covered there. This adds a locally tested Windows backend approach and a copy-ready implementation prompt.
I prepared an isolated candidate based on Documents 26.1112.11011, coordinating the renderer, skill instructions and verification playbook. Installed plugin/runtime files and global routing were unchanged.
Local results:
- 28 automated checks passed, including controlled Python-child timeout and process-identity checks; the PowerShell helper also parsed successfully.
- Corrected native Word runs produced a one-page PDF plus one PNG, and a two-page PDF plus two PNGs. All three page images were visually inspected.
- Both source DOCX hashes remained unchanged; no Word process remained after testing.
- Initial attempts exposed Word startup diagnostics exceeding a 64 MiB test scratch budget and a PowerShell optional-argument binding failure. Corrected runs passed with a 128 MiB scratch budget, the four-argument
Documents.Opencall and parameterlessQuit.
Copy-ready implementation prompt (not separately trialled as a prompt):
Implement and test a Windows-capable DOCX preview renderer for OpenAI's Documents plugin. Produce one PNG per document page through DOCX -> PDF -> PNG, using installed Microsoft Word on Windows without requiring LibreOffice.
The defect to repair was observed in Documents version 26.1112.11011: SKILL.md mandates bundled LibreOffice and prohibits desktop-installed LibreOffice, while render_docx.py says LibreOffice is bundled only on macOS/Linux and searches Windows PATH for soffice.exe. Rendering can therefore fail with "LibreOffice soffice.exe was not found on PATH"; that error alone does not establish whether LibreOffice is installed. The renderer has no native Word backend. tasks/verify_render.md supplies LibreOffice-only routes and representative-page spot-check wording that conflicts with SKILL.md's final all-pages inspection gate.
Preparation and boundaries:
- Locate the current installed Documents package and bundled Python/Poppler dependencies. Read the relevant files and check whether the defect still exists; record the version and baseline hashes.
- Work in an authorised maintained source checkout if available; otherwise create an isolated local copy. Never edit installed plugin/runtime files or global instructions. Keep proposed instruction files inactive.
- Verify native Word and Poppler availability. Report missing prerequisites or access restrictions without installing software or weakening host controls.
Implementation:
- Coordinate render_docx.py, SKILL.md, tasks/verify_render.md and required helpers/packaging. Select native Word PDF export by default on Windows and preserve bundled LibreOffice on macOS/Linux. Preserve existing CLI options; allow an explicitly selected, verified Windows LibreOffice executable. Resolve bundled Windows Poppler executables explicitly.
- Require exclusive Word use and refuse to start while Word is running. Create an independently owned instance; disable input-document macros before opening a temporary copy read-only, omit recent-file registration and restore temporary settings. Preserve Windows trust protections, rejecting marked input before copying unless a supported trust-preserving path is established. Avoid creating a guard document before macro suppression.
- Distinguish missing backend, executable discovery, access denial, conversion failure and timeout. Never automatically select desktop control. On failure, stop the helper, retain diagnostic evidence and report unresolved Word state; never force-kill Word solely from a startup PID record. Match creation time when checking process exit.
- Keep the final all-pages visual inspection gate. Bound input expansion, page count, execution, diagnostics and output. Establish applicable native-write containment before testing; a scratch watchdog is not a hard quota on Word profile/cache writes.
Verification and delivery:
- Test missing/denied backends, deadlines, process identity, unchanged source bytes, page counts and CLI compatibility.
- With required permissions and resource controls, render synthetic one- and two-page DOCX files, inspect every PNG and verify matching PDF/PNG counts and owned process exit. Preserve failed attempts and distinguish simulated checks from real native execution.
- Deliver complete changed files and a baseline diff, test fixtures/results, known limitations and an exact command to use the standalone renderer. Stop before installation, publication or global routing changes.
Optional background, only if further context is needed: https://github.com/openai/codex/issues/51566
Limits: the candidate requires exclusive Word use; other Office builds and actual macOS/Linux rendering are unverified. Native tests used explicitly approved, bounded exceptions to a local containment requirement; no hard Word profile/cache quota was established. Final failure-cleanup hardening was covered by automated checks after the successful renders, without another Word run. This is evidence for a local candidate, not an upstream or installed fix.