Codex Setup
Configure OpenAI Codex with StarterApp context engineering.
StarterApp provides context engineering for OpenAI Codex through structured documentation in AGENTS.md
and /llms/commands/
. Codex automatically reads codebase context and applies architectural patterns when generating code.
Automatic Context Loading
Codex reads AGENTS.md
at the repository root automatically. The file contains comprehensive codebase knowledge, architectural patterns, and template references. Manual context priming is rarely needed.
Codex Extension Setup
Installation
Install the OpenAI Codex extension in VS Code, Cursor, or compatible IDE through the Extensions marketplace
The extension prompts for OpenAI account authentication. Sign in when prompted.
Verify activation by opening a TypeScript file and triggering suggestions
Context Configuration
AGENTS.md Integration
The AGENTS.md
file at the repository root provides comprehensive codebase knowledge that Codex reads automatically:
Command Execution Pattern
Codex executes workflows through natural language instructions referencing command files:
Codex Web Interface
GitHub Repository Connection
Access Codex through chatgpt.com/codex ↗ with repository integration:
Navigate to ChatGPT Settings → Connected apps → GitHub
Authorize the ChatGPT connector application
Select repositories to grant access
Return to Codex interface to access connected repositories
Codex executes tasks in isolated cloud containers with real-time progress updates. The web interface supports pull request creation, code review, and file editing.
Workflow Examples
Starting a Development Session
Open Codex in the IDE or start CLI from the project directory:
cd ~/projects/starterapp
codex
Codex loads context from AGENTS.md
automatically. Begin development tasks with architectural awareness.
Feature Implementation Flow
Design system architecture:
Read and execute llms/commands/architect.md for user notification system
Create feature specification in features/notifications.md
based on architecture output
Generate implementation plan:
Read and execute llms/commands/generate-prp.md for features/notifications.md
Review the generated PRP and provide approval
Execute the plan:
Read and execute llms/commands/execute-prp.md for features/notifications.prp.md
Validate implementation with tests:
Read and execute llms/commands/tdd.md with --focus features/notifications
Template Integration
Codex references patterns from /llms/templates/
automatically. Mention template names in prompts for explicit pattern application:
Pro Tip
Codex reads templates when referenced by filename. Natural language prompts like "Create a protected page using auth-page-template.tsx pattern" trigger template-based code generation.
Command Reference
Available commands through the execution pattern:
Validation Workflow
Verify generated code meets quality standards:
# Type safety
pnpm typecheck
# Code quality
pnpm lint
# Test execution
pnpm test
# Build verification
pnpm build
# Run all checks
pnpm validate
The pnpm validate
command runs all checks sequentially and reports failures.
Next Steps
After Codex configuration:
AI Workflow Overview
Learn AI-assisted development patterns using templates, commands, and context engineering.
Template System
Production-ready code patterns for authentication, billing, and data operations.
Environment Setup
Configure service credentials and environment variables for development.