Codex /goal Beats Claude Code for Autonomous Coding

Chase AIgo watch the original →

Codex's /goal turns long-running agentic tasks into a one-command ReAct loop that runs for hours autonomously, handling budgets, crashes, and verification without extra orchestration—ideal over Claude Code for complex projects.

Enable /goal for Simple, Hands-Off Autonomy

Activate Codex's experimental /goal feature by editing config.toml to add features.goals = true or prompting Codex directly—restart the app after. Trigger with /goal followed by your objective; a subtle goal badge confirms it's active despite no initial UI feedback. This launches an integrated ReAct loop that autonomously iterates: reads the goal, updates internal continuation.md (progress tracking) and budget-limit.md (usage caps), executes turns, and self-verifies completion. At turn end, it follows one of four paths: continue if budget allows; gracefully wrap up near token limits with a final report; audit deliverables and mark complete if done; or pause/edit on crashes. No manual scaffolding needed—unlike bash ReAct loops (while true; do ...), which lack built-in budget handling, crash recovery, or verification.

Outperforms ReAct Loops and Orchestration Layers

ReAct loops in Claude Code require a prompt.md (objective + criteria) and state.md (task progress), looping via bash to inject prompts and check completion (e.g., 75% test coverage). They crash on budget hits or Ctrl+C without graceful saves. /goal embeds this sophistication natively: self-manages state invisibly, injects budget files for safe pauses, and audits via tool calls. Skip external layers like GSD, superpowers, or Higsfield CLI/MCP (needed for Claude Code image gen)—Codex integrates OpenAI's Image Gen 2 (DALL-E) for assets. Result: execute complex tasks in one command vs. 40-minute GSD setups. Trade-off: tied to session/thread; new goals need new chats. Pairs well with Claude Code—plan in one, execute in Codex.

Demo: Rift Salvage Game in 45 Minutes

Prompt Codex in plan mode for a top-down arcade survival game with original assets (player drone, 3 enemies, boss, energy core, mine, rift background, badges, 2 UI flavors). Define precise verification: npm run build (zero errors), dev server URL, Playwright script checking canvas load, keyboard sim, collectibles, damage/health, boss win, UIs. Switch to /goal implement this plan—runs 30 minutes, delivers playable canvas game with controls, spawning enemies/mines, scoring/shields, power-ups, boss phase, win/lose/pause/restart, 11 alpha-cutout assets, Playwright verifier.

Second /goal in new thread (15 minutes): add combat (player/enemy lasers, hit points), quicker boss button, contrast boost. Outcomes: widgets for targets/combo/boss signal; enemies shoot back; unique Image Gen 2 assets. Total: fully functional game from fuzzy idea, no intervention. Best practices: flesh plans tightly (quantifiable deliverables); verify criteria first—if met, you're satisfied. Avoid vague goals like "SaaS unicorn"; excels on 50-hour runs with clear north stars, beating Claude Code's terminal-only limits.

  • #agents
  • #ai-tools
  • #coding
  • #dev-productivity

summary by x-ai/grok-4.1-fast. probably wrong about something. check the source.