Bug: Summarized file anchors show truncated "..." instead of the file path
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of Codex CLI is running?
codex-cli 0.154.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.6-luna
What platform is your computer?
Darwin 25.6.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty
Codex doctor report
What issue are you seeing?
After a conversation is summarized/compacted, file anchors in Codex CLI output can lose their file path and render only as ....
For example, the screenshot shows anchors such as:
(...:326)
(...:771)
(...:65)
(...:151)
(...:3)
These should retain enough of the original file path to identify the referenced file. The line number is preserved, but the file name/path is lost.
This makes references ambiguous, especially when several files are mentioned in the same response.
What steps can reproduce the bug?
Uploaded thread: 01a08f73-c7a2-70b1-a0d2-6e7d504a4e82
What is the expected behavior?
File anchors should preserve the referenced file name/path after summarization, for example:
state.rs:326
execute.rs:771
harness_kernel.rs:65
retry.rs:151
docs/foo.md:3
If shortening is required for display width, the anchor should retain an identifiable suffix such as:
…/state.rs:326
…/harness_kernel.rs:65
rather than reducing the entire path to:
...:326
Additional information
The issue appears specifically related to summarized/compacted conversation state. The response itself still correctly describes the files, while the clickable/reference anchors lose their path component.
Screenshot attached shows multiple occurrences in the same response.
I also searched the currently open openai/codex issues for a matching report and did not find one under this wording.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue from the uploaded thread 01a08f73-c7a2-70b1-a0d2-6e7d504a4e82, then trace the summarization/compaction flow and the file-anchor rendering path. Check the relevant tests around summarized conversation output, and consider the issue done when anchors retain an identifiable file name or path while preserving the line number after compaction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100