File preview does not detect language from shebang
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 67/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bash, rust
- Domain
- desktop, developer-experience
Research direction
Start by locating the Codex App file preview’s syntax highlighting and language detection entry point, then compare how it selects a language for extensionless files and for files with recognized extensions. Reproduce with the hello file containing #!/usr/bin/env bash and compare it with hello.sh; done when the extensionless file receives Bash highlighting in the preview.
Written by the indexing model from the issue text.
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.1013.40934
What subscription do you have?
free
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
When I open an extensionless script in the Codex App's file preview, the preview does not appear to detect its language from the shebang, so the file is not syntax-highlighted as expected.
Codex can recognize a shebang when discussing script content in chat, but the file preview appears to rely on the file extension for syntax highlighting. Files with recognized extensions are highlighted correctly.
What steps can reproduce the bug?
-
Create a file named
hellowith no file extension. -
Add the following content:
#!/usr/bin/env bash echo "Hello, world!" -
Open
helloin the Codex App's file preview. -
Compare it with the same file renamed to
hello.sh.
What is the expected behavior?
The file preview should detect Bash from #!/usr/bin/env bash and apply Bash syntax highlighting, even when the file has no recognized extension.
Additional information
For comparison, Cursor correctly detects Bash from the #!/usr/bin/env bash shebang and applies Bash syntax highlighting to the same extensionless file.
- Dominant language
- Rust
- Stars
- 130k
- Forks
- 20.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 996
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from openai/codex
-
bug CLI config
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Clarify session recovery differences between daemon restart and stop/startPossibly taken @akhil9tiet claimed this 1 day ago. Openapp-server CLI documentation
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openai/codex#56859 · 1 comment ·
Maintainers usually reply within 1 day
-
CLI enhancement TUI
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
CLI documentation skills
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
[BUG] Linux codex stucks when ~/.codex/.env is a directory.Possibly taken @akhil9tiet claimed this 1 day ago. Openbug CLI config performance
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
openai/codex#56738 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
manuscript-lang/manuscript#1364 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
fable-compiler/Fable#5157 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
C-bug needs-triage O-UEFI T-libs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day