Paperclip integration with Codex (OpenAI)
OpenAI Codex (via o3/o4-mini with code execution or Codex CLI) enables autonomous development tasks in the terminal. Integration with Paperclip adds control: budgets, approval workflows, and audit trails.
What is Codex in the context of Paperclip?
Codex CLI is a command-line agent that understands natural language and executes tasks in the terminal: writing code, running commands, reading files, and fixing errors. Paperclip manages this agent like a human employee: assigning tasks, reviewing results, and monitoring expenses.
Setting up integration
The Codex CLI is deployed in an isolated Docker container with access to the repository. The Paperclip API endpoint accepts tasks and starts Codex sessions. A webhook returns results (diff, test status, commit hash).
Sandbox configuration: Read-only for production configs, write-only for src/. Network isolation (only access to the npm/pip registry). Time limit for task execution.
Typical tasks
Migrations: "Replace all direct SQL queries with ORM." Refactoring: "Split the components/Monster.tsx file into individual components." Bug fixes as described in the issue tracker.







