Repository navigation
Integrations Codex Sandbox
Experimental: Tracekit's Codex hooks are experimental: checked against recorded hook payloads, not a live Codex (support).
Codex CLI runs each shell command inside an operating-system sandbox: Seatbelt on macOS, bubblewrap and seccomp on
Linux, a restricted token on Windows. Its sandbox_mode decides what a command can write (read-only,
workspace-write, or danger-full-access, which is no sandbox), and the network is off unless you turn it on.
Tracekit records and gates every call Codex makes, sandboxed or not. They do different jobs and work together:
| Codex's sandbox | Tracekit | |
|---|---|---|
| What it does | Limits what a shell command can write and reach while it runs | Decides each call before it runs, holds risky ones for a person, and signs a record of every call and approval |
| Where | Inside Codex, around each command | A signer outside the agent (dev or system mode) |
| What a third party can check later | Nothing signed; Codex keeps its own session files | A signed, hash-chained bundle, verified offline |
Turn both on. Tracekit first (tracekit init --dev --v2 --agent codex, coding agents), then
the sandbox in ~/.codex/config.toml:
sandbox_mode = "workspace-write"
approval_policy = "on-request"
approvals_reviewer = "user"-
workspace-writelets a command write the workspace and temporary directories, with no network unless[sandbox_workspace_write]setsnetwork_access = true. Withdanger-full-access, or--dangerously-bypass-approvals-and-sandbox, commands run with no sandbox: Tracekit still decides and records each call, but nothing limits what an allowed command does. -
approval_policy = "on-request"makes Codex ask before it runs a command the model wants outside the sandbox (below). For unattended runs,"never"makes Codex refuse every such request instead. -
approvals_reviewer = "user"(the default) sends those questions to you;"auto_review"lets a reviewer model answer them. - Keep execpolicy
allowrules (~/.codex/rules/*.rules) narrow. A command whose every part matches one runs without asking, and can run outside the sandbox. Answering "don't ask again for commands that start with …" in a Codex prompt adds one todefault.rules.
Codex's shell tool (exec_command) lets the model ask to run a command outside the sandbox:
sandbox_permissions: "require_escalated", with a justification that Codex shows to whoever approves. Under
on-request Codex asks before such a command runs; under never it refuses the request.
Tracekit can't hold these the way it holds Claude Code's unsandboxed retries (TK-A003,
Claude Code's sandbox): Codex's PreToolUse hook sends a shell call as {"command": ...}
only, so neither the request nor Codex's answer reaches Tracekit. What Tracekit does: its policy decides each command
before Codex's own approval step, so a command a rule denies or holds is denied or held whether or not it asked to
leave the sandbox. To keep every escalation in front of a person, use the settings above.
Codex puts the id of the tool call that started a command into the command's environment as CODEX_TOOL_CALL_ID.
It's the id Codex's hooks send as tool_use_id, which Tracekit records as tool_call_id on every record of the call:
its decision, any approval, its result (format v2). So a record of what a process did
that captured its environment (an OS audit log, an EDR) can be joined to the signed call that started it. Input Codex
later types into a running command keeps the first call's id.
Codex documents the label as for correlation, not authorization: the command, its shell startup files and its child processes can change or remove it. Read a match as a pointer to the signed call, not as proof that the call caused the effect, and a process without one as unexplained.
-
Sees: every shell command (as
Bash), patch (apply_patch, asEdit) and MCP tool call Codex sends to its hooks, with its arguments and call id, the decision, any approval, and the result. Records commit to the arguments rather than store them (privacy). -
Doesn't see: whether a command ran in the sandbox: a request to leave it, Codex's answer, or a command an
allowrule let run outside it. What the sandbox blocked shows only in the command's output. In current Codex, input typed into a running command (write_stdin) runs noPreToolUsehook; it belongs to the command Tracekit already decided. -
Doesn't record: Codex's sandbox and approval settings. They aren't signed into the run, and
tracekit doctordoesn't read them (it reads only Codex's reasoning summaries setting).
Limits lists these with what to do.
Generated from docs/ at v1.4.1. Edit the docs in the repository, not here.
Get started
- Quickstart: the v2 signer
- Quickstarts
- Quickstart: Claude Agent SDK
- Quickstart: a custom agent
- Quickstart: LangChain and LangGraph
- Quickstart: MCP client
- Quickstart: OpenAI Agents SDK
- Coding agents other than Claude Code
- tracekit doctor
- Walkthrough: Tracekit end to end
How it works
- How Tracekit works
- Overview
- The life of a tool call
- The evidence format
- Verification and assurance
- Witnesses and monitoring
- Policy
- Approvals
- Detection and containment
- Capture and completeness
- Custody
- Provenance and tracekit why
- Deployment and isolation
- Storage, durability and performance
- Integrations
- Security model
- Architecture
- tracekit why: architecture
Integrations
- Integrations
- Adapters
- OpenTelemetry
- Remote clients
- Kubernetes agent-sandbox
- agentgateway
- agentsh and Tracekit
- Browser Use
- Claude Agent SDK
- Claude Code's sandbox
- Codex's sandbox
- CrewAI
- Docker MCP Gateway
- E2B
- Falco
- Gemini CLI's sandbox
- Google ADK
- Haystack
- LangChain v1
- LiteLLM
- LlamaIndex
- MCP client
- microsandbox
- Microsoft Agent Framework
- OpenAI Agents SDK
- NVIDIA OpenShell
- Pydantic AI
- sandbox-runtime's proxy on its own
- Strands Agents
- Tetragon
- Vercel AI SDK
- Wassette
Policy and approvals
- Policy reference
- Approvals
- Findings
- Reading the model's reasoning
- Incidents and containment
- Webhooks
Deploy and operate
- Deploying the signer
- The signer as a container
- The signer on Kubernetes
- The compose stack
- Identity
- Tool executor
- MCP gateway
- LLM gateway
- Egress observation
- Witnesses
- Log monitor
- Record-key issuer
- Signer observability
- Viewer
- tracekit why: causal investigation and replay
- Migrating
- Platforms
Verify the evidence
- Reading a v2 verify report
- Evidence format v2
- Auditor guide
- Sample evidence bundle
- Signing
- What Tracekit guarantees
Security and privacy
- Threat model: the v2 signer
- Threat model: the v1 laptop signer
- HTTP security checklist
- Threat-model review packet
- Privacy
- Known limits and trade-offs
- What's stable
Compliance
- Compliance mapping
- EU AI Act
- ISO/IEC 42001
- NIST AI RMF and the Generative AI Profile
- OWASP Top 10 lists for LLM and agentic applications
Evaluation
Demos
- Demos
- Agent approvers within bounds
- Completeness and tamper evidence
- Detection and containment
- Network coverage: an egress observer
- Guardrails: allow, deny, or ask a person
- MCP tools, gated and recorded
- Prompt injection held by provenance
- Why: which input caused the action
Help