Tip: Use Codex CLI /goal for Autonomous Goal-Directed Loops Instead of Manual Re-Prompting
Simon Willison·medium signal
In Codex CLI 0.128+, run /goal 'migrate all API endpoints from Express to Hono' and the agent loops autonomously until it evaluates the goal as complete or exhausts the token budget. Use /goal pause to intervene, /goal resume to continue, /goal clear to reset. The loop injects continuation prompts (goals/continuation.md) between turns rather than hardcoding logic, making it a prompt-engineering-based architecture for long-running tasks.