URL and codebase links across multiple lines are not clickable
What version of Codex is running?
codex-cli 0.58.0
What subscription do you have?
ChatGPT Plus
Which model were you using?
gpt-5.1-codex
What platform is your computer?
Darwin 24.3.0 arm64 arm
What issue are you seeing?
When performing codebase review or web search, links are usually clickable using Command + Click, however when the link starts near the end of the length limit it is broken down and would appear like:
- Security-tracking feeds (e.g., Safety DB) currently list 0.121.1 as the newest “clean” version, with earlier CVEs addressed in historical point releases. If you pin
versions for compliance, make sure you’re pulling at least 0.121.1+ and reviewing dependency SBOMs after every upgrade. (data.safetycli.com (https://data.safetycli.com/
packages/pypi/fastapi/?utm_source=openai))
- 0.120.2–0.120.4 were largely stabilizing: schema separation regressions from 0.119.0 were fixed, dependency resolution internals were refactored (reducing mutual
recursion), and OpenAPI security schemes defined at the app level now serialize correctly—helpful if you centralize OAuth/JWT metadata. (fastapi.tiangolo.com (https://
fastapi.tiangolo.com/release-notes/))
so that command + click won't work here because https:// is not part of the clickable link, see screenshot below:
<img width="1215" height="99" alt="Image" src="https://github.com/user-attachments/assets/c78555a2-bc8f-4f63-bc8f-6efa49db65f5" />
I think to fix this one would have to change codex-rs/tui/src/wrapping.rs and create some kind of custom rules for links in the RtOptions:
pub fn new(width: usize) -> Self {
RtOptions {
width,
line_ending: textwrap::LineEnding::LF,
initial_indent: Line::default(),
subsequent_indent: Line::default(),
break_words: true,
word_separator: textwrap::WordSeparator::new(),
wrap_algorithm: textwrap::WrapAlgorithm::OptimalFit(Penalties {
// ~infinite overflow penalty, we never want to overflow a line.
overflow_penalty: usize::MAX / 4,
..Default::default()
}),
word_splitter: textwrap::WordSplitter::HyphenSplitter,
}
}
What steps can reproduce the bug?
Perform a web search with a query such as "Do me a web search of the latest FastAPI updates" with codex --enable web_search_request and try to click on all the links.
What is the expected behavior?
All links are clickable and would redirect to the correct URL / codebase script.
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗