Identify Codex CLI Git Commits for an Audit Trail
Agentic engineering practices changed from “you should commit everything yourself” to giving the agentic tools more autonomy for example in order to try out different things to implement a change. Small git commits are part of that toolset.
Here’s how to teach Codex CLI to self-identify as the git author.
Turns out that my Claude Code environment settings to make Claude identify itself as the git commit author are useful for audit trails – especially with the upcoming EU AI Act in August 2026, enabling agents to self-identify can be useful for engineering teams that tell their agents to create small, atomic git commits and then review branch diffs.
In ~/.codex/config.toml you can change the default git commit behavior from using your own personal user identity and have codex CLI use Codex <codex@openai.com>:
[shell_environment_policy]
inherit = "core"
set = {
GIT_AUTHOR_NAME = "Codex",
GIT_AUTHOR_EMAIL = "codex@openai.com",
GIT_COMMITTER_NAME = "Codex",
GIT_COMMITTER_EMAIL = "codex@openai.com"
}
For the environment inheritance rules, see: https://developers.openai.com/codex/config-advanced