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
- CodeFlow: Visualize codebase architecture with zero setup in browser — tom_doerr · 2026-08-22
- Agent engineering struggle: 30+ context compactions in 12 hours — morgymcg · 2026-08-22
- Using MCP to let Codex auto-build complex ComfyUI workflows — mcai8rw2 · 2026-08-22
- Open source agent framework Harness hits 12 stars — rchardkovacs · 2026-08-22
- MCP roadmap: agent-to-agent communication, triggers and events, progressive discovery, DPoP — dsp_ · 2026-08-22
- Agent Orchestrator: A Kanban-style IDE for managing fleets of coding agents — aigclink · 2026-08-22