Safely running unattended Codex agents: Guardrails and workflows
paw_lean · x · 2026-08-22
The author details their experience building an environment for unattended Codex agents to develop backend code, highlighting five key guardrails for safety.
- Instructions: The model reads an AGENTS.md file on every run, containing project conventions and commands to determine task completion.
- Isolation: A sandbox policy restricts the agent's shell access.
- Primitives: Infrastructure is declared in typed code rather than manual configuration.
- Verification: Agents can verify their work against local traces before submission.
- Environments: Preview environments are provided for testing, with production sizing kept outside the repo.
The post also explains the hierarchical merging rules of AGENTS.md and its critical role in supplementing implicit information missing from the codebase.
More from coding & agent
- YC F26's Praxis launches AI agents to run law firm ops end to end — ycombinator · 2026-10-16
- Developer builds inter-agent messaging for his AI agents — complete with message undo — baditaflorin · 2026-10-16
- iOS 'dots' workflow: one Siri command turns screenshots into a background shopping and saving agent — nickbaumann_ · 2026-10-16
- Your widget tree is already a list of options: where Jev fits in Flutter — rseroter · 2026-10-16
- How OpenAI's Codex went from failed side project to 40M weekly users in under a year — danshipper · 2026-10-16
- Photon 2.0 launches unified messaging API for AI agents across iMessage and more — Scobleizer · 2026-10-16