Coding agents
Herd + Codex CLI
Record Codex CLI shell commands and tool calls.
What it is
A managed hook on each device sends every shell command, file edit, and MCP tool call to Herd. Your ChatGPT connection separately lists who ran each Codex session and when.
Why it exists
A command-line agent acts on a developer’s machine, and nothing in ChatGPT’s own logs shows what it did there.
What it means for you
Calls are recorded and your shell-command rules apply, starting in recording mode.
- Access
- Inbound (a managed hook sends each tool call to Herd for checking)
- Connects with
- Hook token (HERD_HOOK_TOKEN)
How to connect Codex CLI
The short version. The setup guide has every screen and setting.
Before you start
- Agent oversight turned on for your organization (available on request)
- Node 18 or later on each device
- A device management tool that can place files on devices
Download the Codex CLI bundle
In AI Insights → Setup, download the bundle. It holds a requirements.toml and a script named herd-codex-hook.mjs, and neither carries your token.
Install the hook script
Place herd-codex-hook.mjs at /opt/herd/codex-hooks on macOS and Linux, or C:\ProgramData\Herd\codex-hooks on Windows.
Merge requirements.toml
Merge the generated file into the device’s Codex requirements file without adding a second [hooks] table.
Deliver the token and test
Decide how HERD_HOOK_TOKEN reaches each device, then run a shell command in Codex and check that it appears in Herd.
The full walkthrough is in the Codex CLI setup guide.
More Coding agents integrations
Herd connects to the rest of your stack too.
Join the Herd
See Herd working with Codex CLI.
Bring your stack to a demo. We’ll connect it and show you what Herd does with it.