OpenAI Codex in Coder: workspace setup and auditing

Learn to set up Codex in a Coder workspace with Terraform, package registry restrictions, a firewall, and administrator session logs.

Player not loading? Watch on YouTube

This tutorial follows OpenAI Codex inside a self-hosted Coder development environment. The presenter creates a workspace from a template that provisions infrastructure with Terraform, installs Codex, and configures its prompts, tools and policies. Administrators can define containers or more complex environments, such as a virtual machine with an S3 bucket.

The workspace choices shown include software engineering with a corporate ChatGPT account and prototyping with a centralized OpenAI service account. The presenter explains that role-based access controls and identity provider claims can govern access to these options. He opens code-server to run the coding assistant and preview its output.

Codex runs in YOLO mode without repeated command approvals. The presenter argues that the workspace's sandbox infrastructure and configured controls make this appropriate for the demonstration; the walkthrough does not establish a universal safety guarantee. An enterprise package registry rejects Faker, after which the agent finds an approved package. The presenter also describes a firewall intended to block and log attempts to reach restricted endpoints.

The demonstration ends with an application preview through a forwarded URL and an administrator view of the AI session. That view shows the initial prompt, tool calls, commands and rejected package request. This is a workflow for hosting the agent's development environment on organizational infrastructure, rather than a demonstration of local model inference.