Codex CLI should automatically disable interactive prompts when running shell commands
What feature would you like to see?
I often use Codex to handle tedious Git-related tasks, such as resolving merge conflicts or fixing CI issues. However, I’ve noticed that Codex sometimes executes commands that trigger interactive prompts (for example, when Git asks for a commit message or other user input).
When this happens, Codex ends up waiting indefinitely, since it doesn’t detect or handle those interactive prompts.
To improve this, I suggest that Codex automatically inject common environment variables into its subprocesses to prevent interactive behavior.
This would make Codex’s automation more reliable and avoid hanging indefinitely on commands that expect manual input.
Proposed solution:
- Automatically inject a safe set of environment variables that tell CLI tools not to spawn editors or input prompts.
- Optionally allow users to override or extend this set via config.
Benefit:
Codex becomes much more robust for unattended automation tasks, especially when working with Git or other interactive CLI tools.
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗