Auto-skip git checks in `exec` by default and add `@` file reference support
Resolved 💬 3 comments Opened Sep 12, 2025 by Nhahan Closed Nov 27, 2025
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
Current Problem:
# Required now
codex exec --skip-git-repo-check "say hello"
# Want this
codex exec "say hello"
Proposed Changes:
- Auto-skip git checks in
execby default
- Add
--require-gitflag for users who need git validation - Interactive mode unchanged
- (If strict backward compatibility is required) instead of changing exec defaults, introduce a new command (e.g., codex run or codex do) that behaves with auto-skip by default.
- Add
@file reference support
``bash``
codex exec "@file.js analyze this"
codex exec "@package.json @README.md explain project"
codex exec "@src/ find bugs"
Rationale:
- Most
execusage needs--skip-git-repo-checkanyway - File references eliminate copy-paste workflow
- Backward compatible with opt-in git checking
- Improves user experience for common workflows
Are you interested in implementing this feature?
Yes
3 Comments
Thanks for the feature request. This has received only one upvote in three months, so I'm going to close it.
I'll give this a retroactive :+1: It is frustrating to have to pass a
--skip-git-repo-checkflag to all of mycodex execinvocations from scripts that may not be run from within a git repository.Perhaps, instead of changing the default, we could at least expose a config variable for
--skip-git-repo-checkso that _users_ can change their default? @etraut-openai Would you prefer this as a separate feature request? Adding a config variable would seek to resolve the same root problem as this issue, so splitting upvotes for it across issues sounds non-ideal. Perhaps I should open a new feature request that covers the root problem, rather than having issues split by implementation details.@cannonpalms, you're welcome to open a new feature request if you'd like, and we can see if it receives interest from other codex users.