Enhancement: Respect macOS “double-space for period” system preference

Resolved 💬 3 comments Opened Nov 1, 2025 by smalyu Closed Jan 14, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

Summary
Make the editor/chat composer convert a trailing double space into “. ” only when the macOS system preference Add period with double-space is enabled. Otherwise, keep the current behavior.

Motivation
Many macOS users rely on this shortcut across native apps. When Codex ignores the OS preference, fast typing yields two spaces instead of a period, causing friction and backspacing. Matching the OS setting reduces surprise and makes the UI feel native.

Proposed behavior

  • Respect the macOS preference: enable auto-period only when that system option is on.
  • Do not alter indentation or alignment: ignore double spaces at the start of a line or in whitespace-only lines.
  • Trigger only when the current line already has non-whitespace characters (so code indentation, markdown lists, etc. are untouched).
  • Provide a small toggle if needed (e.g., editor.autoPeriodFromDoubleSpace: auto | on | off; default auto).

Why it’s safe

  • No breaking changes for non-macOS users or for macOS users who keep the OS option off.
  • Scope is limited to the text-entry handler; no protocol/API changes.

Alternatives considered

  • Always on: breaks indentation and surprises non-macOS users.
  • Always off: ignores a common macOS typing convention and slows input.

Prior work
I previously opened PR #5818 implementing this approach: https://github.com/openai/codex/pull/5818. The PR was closed while new features aren’t being accepted. I’m ready to rebase, split into smaller commits, add tests/docs, and reopen if maintainers think this direction fits.

Request
If this is acceptable in principle, please advise on preferred flags/guardrails.
If others want this too, please react with 👍 to help prioritization.

Additional information

_No response_

View original on GitHub ↗

3 Comments

etraut-openai contributor · 9 months ago

Which version of codex are you using? The CLI, IDE extension, or web?

smalyu contributor · 9 months ago

I'm using the Codex CLI, version v0.58.0.

etraut-openai contributor · 7 months ago

This feature request has received only one upvote in two months, so I'm going to close it.