codex - 💡(How to fix) Fix Add folders in @ search [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#18297Fetched 2026-04-18 05:56:34
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×3commented ×1cross-referenced ×1renamed ×1
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using (From “About Codex” dialog)?

26.415

What subscription do you have?

Pro

What platform is your computer?

Microsoft Windows NT 10.0.22631.0 x64

What issue are you seeing?

There are several related issues affecting file navigation and usability:

  1. Folders missing in @ search

When using the @ feature to search and reference files, folders are not shown in the results. This makes it difficult to navigate project structure or reference entire directories.

  1. Unable to attach folders

It is currently not possible to attach a folder to the chat (e.g., via right-click like with files). Only individual files can be attached.

This limits workflows where a whole directory context is needed.

  1. Incorrect sorting in file preview (All files)

In the file preview (All files view), items are sorted purely alphabetically without separating folders and files.

This results in a mixed list like:

a_file.py
b_folder/
c_file.py
d_folder/

Instead of the expected and standard OS behavior:

b_folder/
d_folder/
a_file.py
c_file.py

The current behavior makes navigation harder and visually confusing, especially in large directories.

What steps can reproduce the bug?

Folders missing in @ search

  • Open Codex App
  • Open any project with a nested folder structure
  • In chat, type @ to reference files
  • Start typing a folder name

Result: folders do not appear in search results

Unable to attach folders

  • Open Codex App
  • Open any project
  • Right-click on a folder in the file tree (or try to attach it via chat input)

Result: there is no option to attach a folder (only files can be attached)

Incorrect sorting in file preview Open Codex App Open a project with both files and folders in the same directory Go to file preview / “All files” view

Result: files and folders are mixed together and sorted alphabetically as a single list, instead of grouping folders first

What is the expected behavior?

  • @ search should include folders in results
  • Ability to attach folders to chat (similar to files)
  • File preview should follow standard sorting:
    • Folders first (alphabetically)
    • Files second (alphabetically)

Additional information

These issues together significantly impact navigation and workflow efficiency when working inside Codex App without switching to an IDE.

Improving these areas would make the app much closer to being a полноценная IDE replacement.

extent analysis

TL;DR

The most likely fix involves updating the file navigation and sorting logic in the Codex App to include folders in search results, allow folder attachments, and implement standard sorting behavior.

Guidance

  • Review the current implementation of the @ search feature to ensure it queries the file system for both files and folders, and update the query logic if necessary.
  • Modify the attachment functionality to accept folders in addition to files, potentially by adding a new attachment type or modifying the existing file attachment logic.
  • Update the file preview sorting algorithm to separate folders from files and sort them alphabetically within their respective groups, following standard OS behavior.
  • Verify these changes by testing the @ search, folder attachment, and file preview features with various project structures and folder names.

Example

# Example of updated sorting logic
def sort_files_and_folders(file_list):
    folders = [item for item in file_list if item.endswith('/')]
    files = [item for item in file_list if not item.endswith('/')]
    return sorted(folders) + sorted(files)

Notes

The provided guidance assumes that the Codex App's file navigation and sorting logic can be modified to address the reported issues. However, without access to the app's source code or documentation, the exact implementation details may vary.

Recommendation

Apply workaround: Until the Codex App is updated to address these issues, users may need to rely on external file navigation tools or workarounds, such as using the app's file tree view to locate folders and then manually typing the folder name in the chat input.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Add folders in @ search [1 comments, 2 participants]