Not wired up to config yet. (So we can change the name if we want)
An example payload:
```
{
"session_id": "019c48b7-7098-7b61-bc48-32e82585d451",
"cwd": "/Users/gt/code/codex/codex-rs",
"triggered_at": "2026-02-10T18:02:31Z",
"hook_event": {
"event_type": "after_tool_use",
"turn_id": "4",
"call_id": "call_iuo4DqWgjE7OxQywnL2UzJUE",
"tool_name": "apply_patch",
"tool_kind": "custom",
"tool_input": {
"input_type": "custom",
"input": "*** Begin Patch\n*** Update File: README.md\n@@\n-# Codex CLI hello (Rust Implementation)\n+# Codex CLI (Rust Implementation)\n*** End Patch\n"
},
"executed": true,
"success": true,
"duration_ms": 37,
"mutating": true,
"sandbox": "none",
"sandbox_policy": "danger-full-access",
"output_preview": "{\"output\":\"Success. Updated the following files:\\nM README.md\\n\",\"metadata\":{\"exit_code\":0,\"duration_seconds\":0.0}}"
}
}
```
codex-core
This crate implements the business logic for Codex. It is designed to be used by the various Codex UIs written in Rust.
Dependencies
Note that codex-core makes some assumptions about certain helper utilities being available in the environment. Currently, this support matrix is:
macOS
Expects /usr/bin/sandbox-exec to be present.
When using the workspace-write sandbox policy, the Seatbelt profile allows
writes under the configured writable roots while keeping .git (directory or
pointer file), the resolved gitdir: target, and .codex read-only.
Linux
Expects the binary containing codex-core to run the equivalent of codex sandbox linux (legacy alias: codex debug landlock) when arg0 is codex-linux-sandbox. See the codex-arg0 crate for details.
All Platforms
Expects the binary containing codex-core to simulate the virtual apply_patch CLI when arg1 is --codex-run-as-apply-patch. See the codex-arg0 crate for details.