How OpenAI Codex Works: Inside the Architecture of an AI Coding Agent