Codex is overzealous in executing code in `backquotes`
Resolved 💬 1 comment Opened Feb 2, 2026 by tp-woven Closed Feb 2, 2026
What version of Codex is running?
codex-cli 0.93.0
What subscription do you have?
API key
Which model were you using?
gpt-5.2-codex
What platform is your computer?
Darwin 25.1.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
iTerm2
What issue are you seeing?
Codex sometimes uses command syntax in shell commands that it generates, essentially creating a "code injection" attack on itself. In particular, this happens for commands that take descriptions, e.g.:
gh pr create --body "fixed `cargo test`"
Some notes:
- The backquoting here originates from Codex, not the user prompt
- For some reason, this happens quite often with the
ghCLI, but not ingit commit
What steps can reproduce the bug?
I don't have an exact reproduction, but ask Codex to create (or update) a PR where the title/description would "naturally" include backquoted commands.
What is the expected behavior?
The backquoted text should be used "as-is" in the command rather than being executed
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗