Skip to content

Paths with spaces are not clickable in Codex TUI diff summary #7477

@Ammaar-Alam

Description

@Ammaar-Alam

What version of Codex is running?

codex-cli 0.63.0 (built from source at upstream/main commit 32e4a3a)

What subscription do you have?

n/a (local build for contribution)

Which model were you using?

Not model-specific; reproduced while running local TUI.

What platform is your computer?

Darwin 25.2.0 arm64 arm (uname -mprs)

What issue are you seeing?

When Codex shows a diff summary in the chat transcript, file paths are printed as plain text. If a path contains spaces (e.g., notes with space.txt), the terminal’s auto-linker treats the space as a separator. Cmd/Ctrl-click only opens the first segment ("notes"), so the file cannot be opened from the transcript.

What steps can reproduce the bug?

  1. Create a file with a space in the name (e.g., echo hi > "notes with space.txt").
  2. Ask Codex to edit that file in the TUI (so the transcript shows an "Edited …" block with the filename).
  3. In the transcript, attempt to Cmd/Ctrl-click the file path to open it.

What is the expected behavior?

The entire file path should be clickable/openable even when it contains spaces (e.g., rendered as an OSC-8 hyperlink or otherwise escaped/quoted so the terminal keeps it as one link).

Additional information

  • Observed on macOS Terminal/iTerm2; terminals typically stop links at whitespace unless paths are wrapped in OSC-8 links or quoting. Paths without spaces are unaffected.
  • Likely source: codex-rs/tui/src/diff_render.rs renders paths verbatim via display_path_for without escaping or hyperlink wrapping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions