AI Goals: The secret weapon for automating complex, long-running tasks

May 27, 2026 · Lenny's Podcast
🎧 PodShort 30 min squeezed to 2 AI SprinklerAS AI / ML
Episode artwork
Claire Vo
Product Leader, AI Obsessive, Host at How I AI
Lenny's Podcast
30 min squeezed to 2
Full episode from Lenny's Podcast
Quotable Moments

If you find yourself in that process [of micro-managing turn-based AI], using /goal in Codex might be a tool that you want to add to your toolkit.

You really want to use goals when you would otherwise find yourself saying the same thing after turn, like 'keep going,' 'try the next thing,' 'run it again,' 'now run the test,' 'continue until it's actually done'.

Working with AI just continuously to feel more and more like working with a colleague, a human colleague. In that you assign a human colleague a task, you don't like sit there over their shoulder and tap and say okay, next step, okay, next step.

Key Insights
  • The 'Goals' feature in AI tools enables AI to run complex, long-running tasks autonomously, often overnight, addressing a common challenge for AI users.
  • A 'goal-based loop' differs from a simple 'prompt' by allowing the AI to continuously work towards a defined outcome, iterating through steps and verifying progress until the goal is met.
  • Goals provide the AI with an overarching description of the desired outcome, enabling it to work, check its work, decide next steps, and gather evidence until the goal is achieved.
  • The 'Goals' feature, specifically in Codex, has allowed the speaker to achieve multi-hour, long-running autonomous tasks that were previously impossible with traditional AI coding agents.
  • Goals are most effective when you frequently find yourself giving repetitive instructions to AI (e.g., 'keep going,' 'try the next thing,' 'run it again'), as they automate this iterative process.
  • The strongest goals for AI, particularly in tools like Codex, include clear definitions of the outcome, verification methods, constraints, boundaries for operation, an iteration policy, and a definitive stop condition.
  • A real-world application of Goals involved successfully eliminating tons of errors in a complex diff-based editor by having AI categorize, fix, and re-play events, leading to zero outstanding issues.
  • Working with AI using goal-based approaches increasingly feels like collaborating with a human colleague, where you assign a goal and allow them the necessary time to complete the task autonomously.
Metrics Mentioned
  • 5 hours and 45 minutes (Duration a coding task ran using the 'Goals' feature in Codex.)
  • 3 hours and 52 minutes (Duration for an AI task to categorize and clean up emails.)
  • 6 million tokens (Approximate token usage for the email cleanup AI task.)
  • 3,900 emails (Starting number of emails in an inbox before AI cleanup.)
  • 68 emails (Remaining number of emails in an inbox after AI cleanup, requiring human review.)

RevBots.ai View:

  • AI Sprinkler teams bolt this on for tactical wins but miss the ARM orchestration layer.
  • Tab Hoppers will misuse this for one-off tasks without integrating into workflows.
  • SaaS Hoarders add another AI tool without connecting to their existing stack.
  • True ARM adoption requires goal-based AI woven into revenue workflows, not just sprinkled.
🎧Full Episode:Lenny's Podcast →