AgentRail integrates with Codex using the same managed runner model as Claude Code.Documentation Index
Fetch the complete documentation index at: https://agentrail.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
agentrail server start wakes Codex automatically when there is actionable work, passing it a compact task prompt and consuming the local report after Codex exits. You can also trigger a single Codex run manually for debugging.
Managed mode
In managed mode, you do not launch Codex directly.agentrail server start reads agent env files from ~/.agentrail/agents/, starts an event-driven agentrail agent run loop for each configured local agent, and restarts those loops when they exit.
Initialize AgentRail
Run the interactive setup to create local config and your first agent profile.For non-interactive environments:
Create an agent profile
If This creates scoped agent credentials, writes the managed agent env file, and configures starter routing for your repo.
agentrail init did not already create an agent, run the agent wizard:Start the server
Keep this running in a dedicated terminal.The server brings up the local API, starts provider delivery, and wakes configured Codex agents automatically. Expected output includes:
In managed mode,
agentrail server start handles waking Codex. You do not need to run agentrail agent run yourself unless you are debugging outside the supervisor.Manual debug mode
Use this to trigger a single Codex run outside the server supervisor — useful when testing a new agent configuration or reproducing a specific task.Run-scoped commands
The Codex child process receives a compact task prompt from AgentRail. If Codex needs to re-read the current assignment, it may use only these run-scoped commands:Reporting progress and completion
Codex reports back to AgentRail usingagentrail agent report. Use --status progress for intermediate updates and --status completed with a handoff file when the work is done.
What AgentRail owns
Codex edits files, validates changes, commits locally, and reports. AgentRail owns everything else:- Task assignment and lifecycle state
- CI and review observation
- Provider PR creation, shipping, and rollback
- Relaunching Codex only when CI or review feedback requires further code changes
.png?fit=max&auto=format&n=TNCV8lxzL1ij3U4N&q=85&s=7345b71aa1c450c74f35b67c2655fc43)