Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

File preview does not detect language from shebang

Open Beginner friendly
#55,420 0 comments 0 reactions 0 assignees View on GitHub

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

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

app bug
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?
  1. Create a file named hello with no file extension.

  2. Add the following content:

    #!/usr/bin/env bash
    echo "Hello, world!"
    
  3. Open hello in the Codex App's file preview.

  4. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.