doctor: top-level Notes summary uses a hyphen while detail sections use an em dash for the same message
Description
codex doctor's top-level "Notes" summary and the detailed sections below it both surface the same diagnostic messages, but join the summary/remediation text with different connector characters: the "Notes" digest uses a plain hyphen (-), while the corresponding detailed section uses an em dash (—). Confirmed across multiple independent checks in a single run, so this is systematic rather than a one-off rendering glitch.
Steps to reproduce
codex doctor
in any directory/config state that triggers at least one warning or failure (e.g. no auth configured is enough on its own).
Actual behavior
In one run, three separate checks each showed the inconsistency:
Notes
⚠ git ...significantly improve repository and filesystem performance - create a trusted Windows Dev Drive...
✗ auth no Codex credentials were found - Run codex login...
⚠ websocket ...HTTPS fallback may still work - Check proxy, VPN, firewall...
Environment
⚠ git ...significantly improve repository and filesystem performance — create a trusted Windows Dev Drive...
...
Configuration
✗ auth no Codex credentials were found — Run codex login...
...
Connectivity
⚠ websocket ...HTTPS fallback may still work — Check proxy, VPN, firewall...
Same wording each time, - in "Notes", — in the detail section.
A fourth instance shows up when CODEX_HOME points at a nonexistent directory (config could not be loaded - ... vs config could not be loaded — ...).
Expected behavior
The same diagnostic message should render identically wherever it appears in the report.
Root cause hint
codex doctor --json shows summary and remediation as clean, separate JSON fields with no dash of any kind in the underlying data:
"summary": "this worktree is not on a Windows Dev Drive; moving it to a trusted Dev Drive can significantly improve repository and filesystem performance",
"remediation": "create a trusted Windows Dev Drive for source repositories: https://learn.microsoft.com/..."
So this isn't data corruption — it's a text-rendering-layer bug. Two different code paths format the same summary + remediation pair with different connector characters: the compact "Notes" digest renderer (hyphen) vs. the detailed per-section renderer (em dash).
Environment
- codex-cli version: 0.149.1
- Install method: npm
- OS: Windows 11 Pro (10.0.26100), x86_64
1 Comment
Root cause:
actionable_note_summaryincodex-rs/cli/src/doctor/output.rshardcodes a hyphen (" - ") when joining a check'ssummaryandremediationfor the top-level Notes digest, while the detailed per-section renderer (row_description) already picks hyphen vs. em dash based onHumanOutputOptions::ascii. In the default (unicode) mode this makes the same diagnostic message render with a hyphen in Notes but an em dash in the detail section below it.Fix: thread
optionsthroughnotes_for_report→non_ok_notes→actionable_note_summaryso the Notes digest picks the same ascii-aware dash as the detail renderer.Verified via
cargo check -p codex-cli,cargo clippy -p codex-cli --bin codex --no-deps, andcargo fmt --check, all clean. Red-before-green ondoctor::output::tests: reverting just this change makes 3 of 17 tests fail with the reported hyphen/em-dash mismatch; restoring the fix makes all 17 pass. Two snapshot fixtures also needed updating to match (included above).I understand
openai/codexdoesn't take external PRs perdocs/contributing.md, so posting the root-cause analysis and diff here per your stated preference rather than opening one.