Codex 101 Guide from a Recovering PM

(forwardeployed.com)

1 points | by yummyelephant8 6 hours ago ago

1 comments

  • yummyelephant8 6 hours ago

    I've spent thousands of hours with agentic coding tools like Claude Code and Codex. Steal everything I know about Codex in the blog post I wrote

    1/ You might be able to 1-shot prompt a complex app prompt once, but that's luck.

    To do it reliably, you need to break your project into subcomponents, build each one separately, then bring it all together.

    This isolates bugs so you can build on your projects in the future.

    I call this agentic engineering.

    2/ Firstly, your Codex setup probably isn't optimal. Add this to ~/.zshrc:

    alias codex="codex --search --model=gpt-5.4 -c model_reasoning_effort="high" --sandbox workspace-write -c sandbox_workspace_write.network_access=true"

    model_reasoning_effort="xhigh" and network_access=true are the v important here.

    3/ The VIBE method: Verbalize → Instruct → Build → Evaluate

    Run this recursively on each subcomponent of your project.

    Building a PDF-to-PNG web app? Backend endpoint first, frontend second, each in its own VIBE cycle.

    4/ The only Skills you need.

    Clone wshobson/agents, copy the tools folder to ~/.codex/prompts.

    Try "explain this codebase" raw, then run the same prompt with /prompts:code-explain. You'll see a huge difference in the quality of your output.

    That's why you use Skills.

    5/ The only MCP you need.

    I used to paste API documentation manually and tell the LLM to "read this before implementing." But Context7 and exa-code are much better at this.

    I switched from Context7 to exa-code recently. Exa searches thousands of repos for current best practices before implementing. Either gets the job done.

    6/ AGENTS.md

    A file you drop in your repo root that agents read before doing anything. A behavioral contract at the project level. (h/t Jason Liu)

    # Use uv run, never python # Prefer async over sync patterns # Write at 9th grade level in documentation # Avoid heavily mocking tests without user permission # Update docs when code changes # Never git add ., specify files # Run linters/formatters before committing # Type check before merging # Run affected tests for changed files

    "avoid mocking tests without permission" is v important: stops agents from writing fake tests that pass trivially.

    7/ Subagents.

    Multi-agent systems solve a real LLM performance problem: the more context your agent uses, the worse it performs.

    Splitting responsibilities across subagents each with its own objective and context window will get you better outputs.

    Example: building a login feature.

    → Orchestrator spins up 2 subagents → Backend engineer builds the functionality → Security engineer checks it for vulnerabilities → Both finish, orchestrator returns the combined output

    8/ Full write-up covers the Codex CLI setup, VIBE walkthroughs, MCP config, the full AGENTS.md, and a receipt invoicing lab you can follow step by step.