More How I AI episodes

The Codex feature that works while you sleep thumbnail

The Codex feature that works while you sleep

Published 27 May 2026

Duration: 00:30:20

Goals in Codex leverages AI to autonomously execute complex tasks through goal-based workflows, emphasizing clarity and validation for improved code quality and efficiency, though it struggles with simple edits and may shift developers toward oversight roles.

Episode Description

In this 30-minute episode, I walk through my favorite feature in Codex: the /goal command. I show how Goals transform AI from a turn-based assistant t...

Overview

The podcast discusses an AI tool called "Goals in Codex," designed to enable autonomous execution of complex, long-running tasks by shifting from traditional prompts to goal-based workflows. Unlike turn-based prompts, which require constant human input, goals define a looped process where AI independently works toward a specific outcome, evaluating progress and adjusting actions until predefined success criteria are met. This approach is suited for tasks requiring iterative steps, such as extended coding projects or non-technical workflows like email management or task prioritization in project management tools. Key components of effective goals include clear outcomes, verification methods, constraints, and iteration policies, ensuring AI remains focused on measurable results rather than vague instructions.

Technical applications include resolving systemic issues like reducing P95 checkout latency or fixing document editing errors by systematically analyzing logs, categorizing problems, and applying targeted fixes. For non-technical use cases, the tool streamlines tasks like cleaning up email inboxes or organizing project backlogs by delegating repetitive, rule-based actions to AI. The discussion emphasizes the importance of avoiding overly simplistic or vague goals, as the tool excels when objectives are durable, evidence-based, and require multi-step problem-solving. Lifecycle management functions, such as starting, pausing, or reviewing goals, allow users to delegate tasks with minimal oversight, though the process can be resource-intensive and time-consuming for complex problems.

The podcast highlights the tools ability to shift developers roles toward oversight and validation rather than direct coding, with implications for product managers to refine their goal-setting skills. It draws an analogy to human collaboration, where AI acts as a self-sufficient colleague, requires thoroughness in handling edge cases, and provides structured outputs like error-free code or streamlined task backlogs. Recommendations include testing goal-based workflows in preferred AI tools to address complex challenges autonomously, while acknowledging the need for clear, actionable objectives to maximize efficiency and avoid overuse for trivial tasks.

What If

  • What if you used Goals in Codex to systematically eliminate all critical errors in your codebase without manual intervention?

    • Move: Define a measurable "Goal" for Codex to identify and fix recurring errors (e.g., "Eliminate all P95 checkout latency issues by applying iterative fixes and benchmarking").
    • Why now: Modern software systems require continuous validation, and manual error tracking is inefficient. Codex can autonomously iterate on fixes, reducing downtime and developer burnout.
    • Expected upside: A stable codebase with zero critical errors, measurable improvements in performance metrics, and reduced long-term maintenance costs.
  • What if you automated email inbox management using AI to categorize, unsubscribe, and prioritize emails?

    • Move: Set a Goal for Codex to analyze your email history (e.g., "Categorize 3,900 emails, unsubscribe from spam, and label unread emails as 'needs judgment'").
    • Why now: Email clutter costs time and productivity. With plugins like Gmail integration, Codex can handle this repetitive task, freeing you for strategic work.
    • Expected upside: A clean inbox with actionable labels, reduced mental load, and automated unsubscribe actions that cut noise by 98%.
  • What if you leveraged Goals in Codex to clean up your project management tools backlog by removing outdated tasks?

    • Move: Define a Goal to evaluate your task list in Linear (e.g., "Mark all tasks from past episodes as 'canceled' unless theyre relevant to future priorities").
    • Why now: Task backlogs often contain outdated work, leading to wasted effort. Codex can audit tasks autonomously, ensuring focus on current goals.
    • Expected upside: A streamlined backlog aligned with current priorities, reduced confusion for your team, and faster onboarding for new members.

Takeaway

  • Automate Long-Running Technical Tasks with Autonomous AI Workflows: Use the /goal command to delegate complex, multi-step coding tasks (e.g., optimizing P95 checkout latency) to AI, allowing it to iterate, validate, and self-adjust without manual oversight.
  • Define Measurable Success Criteria for AI Goals: Structure goals with explicit outcomes (e.g., "reduce latency to 50ms"), verification methods (e.g., benchmark tests), and constraints (e.g., "preserve existing API endpoints") to ensure AI delivers actionable results.
  • Leverage AI for Non-Technical Automation (e.g., Email/Task Management): Apply goal-based workflows to clean up email inboxes (e.g., categorize 3,900 emails), label tasks in project management tools (e.g., mark unused Linear tasks as "canceled"), or streamline document editing via plugins.
  • Implement Systematic Error Elimination via AI-Driven Debugging: Use AI to analyze logs, categorize errors, and iteratively fix root causes (e.g., resolve 100% of historical errors in an editing framework) by defining goals with strict completion conditions like "0 remaining errors."
  • Avoid Vague or Overly Simple Tasks with AI Goals: Focus AI on durable objectives requiring multiple iterations (e.g., "eliminate all flaky tests") rather than one-off edits or ambiguous requests (e.g., "make customers happy"), ensuring efficient resource utilization.

Recent Episodes of How I AI

20 May 2026 What launched at Google I/O 2026 (30-minute day 1 recap)

Google's recent AI advancements highlight agentic AI capabilities, the Gemini 3.5 model family (including fast multimodal Flash), Antigravity IDE 2.0 for coding, and creative tools like video-generation Omni and design apps Stitch/Pameli, alongside noted technical and usability challenges.

More How I AI episodes