AI DOERS
Book a Call
← All insightsAI Excellence

Why the /goal Command Changes How Agents Actually Work

The /goal command lets you hand an agent a measurable outcome and a way to test it, then a built-in judge keeps the agent working for hours until the goal is genuinely met. That turns a back-and-forth chat into autonomous completion.

Why the /goal Command Changes How Agents Actually Work
Illustration: AI DOERS Studio

The contract between person and agent has changed

OpenAI shipped the /goal command inside the Codex CLI on April 30, 2026, and within days people were running it for 10, 20, and 30 hours on work that normally takes days. The surface reading is that a new feature arrived. The more accurate reading is that the relationship between a person and an AI agent changed in a structural way, and businesses that understand the change will build differently than those that do not.

Under the old arrangement, using AI meant staying in the loop at every step. You prompted, it responded, you reviewed, you prompted again. The agent was powerful but tethered. You were effectively a supervisor sitting next to a very fast assistant, and the value you could extract was capped by how much supervision you were willing to provide in real time.

The /goal command flips that arrangement. You define the outcome you want, you define the test that proves the outcome has been reached, and you hand the goal to the agent. The agent runs, sometimes for 6 hours, sometimes for 18, sometimes across multiple sessions and machine restarts, until the test passes. You are no longer the supervisor. You are the person who wrote the brief and set the acceptance criteria. That distinction determines what kinds of work are now practically viable to hand off.

Autonomous completion is a distinct category from AI assistance. Assistance means the agent helps you work faster. Autonomous completion means the agent does the work and hands you the result. The /goal command is what creates that category, and the difference in practical output is not marginal. It is the difference between getting help on a task and getting the task done while you sleep.

How it works (short)

Why the Ralph loop always failed eventually

Before /goal there was the Ralph loop, an approach where you handed an agent a task, had it save state at intervals, and let it restart and continue indefinitely. In principle it sounded like the same thing: an agent running unsupervised on a long task. In practice it had three structural flaws that prevented it from working reliably at scale.

The first flaw was no termination condition. The loop ran until something stopped it externally. There was no internal definition of done, because the task was given as a direction rather than as a testable outcome. Without a concrete finish line, the agent had no signal for when to stop and no way to determine whether it was making genuine progress or spinning in circles.

The second flaw was no accountability over resource consumption. A Ralph loop run could burn enormous quantities of tokens chasing dead ends, repeating work from a previous session that was not properly persisted, or getting stuck on a step it could not resolve and retrying it indefinitely. There was no token ceiling, no escalation path when the run stalled, and no governor that cut the run if it was consuming without converging.

The third and deepest flaw was no independent judge. The agent doing the work was the same agent deciding whether the work was good enough to count as done. That creates a subtle but consequential bias. An agent that has spent tokens pursuing a particular approach has an orientation toward that approach that makes it less reliable as an evaluator of that approach's quality. The practical effect is similar to sunk-cost reasoning: the agent tends to rate its own recent output as acceptable even when an outside observer would not.

The /goal command closes all three gaps at once. It introduces a concrete, testable outcome that serves as a termination condition. It adds central control over token consumption so a run does not spiral. And it introduces a judge agent that is structurally separate from the worker, with no stake in any particular approach, whose only job is to evaluate progress honestly.

Hours of work an agent finishes per run

The judge agent and why the separation is the whole point

The judge agent is the architecturally important piece of the /goal system, and it is also the most counterintuitive one. Its job description sounds simple: review the goal text, the worker agent's most recent output, and the system prompt, then determine whether real progress is happening and whether the goal criteria have been met. The significance of that role comes from what makes the judge different from the worker.

The judge has no sunk cost in any path the worker has taken. It did not spend tokens exploring the approach. It has no relationship to the implementation decisions the worker made. It looks at the goal and the output and asks a clean question: does this output, evaluated against the criteria in the goal, represent genuine progress, and has the test been satisfied? Because the judge cannot be biased by the worker's choices, its evaluations are reliable in a way the worker's self-assessments cannot be.

This separation also makes the system composable and auditable. The judge can be a faster, cheaper model than the worker because its task is narrow and well-defined. You can log every judge decision and review the history of how a run progressed. You can change the judge's evaluation criteria without changing the worker. None of that would be possible if evaluation and execution lived in the same system.

The CEO and CTO orchestration pattern that practitioners have settled on exploits this structure cleanly. One agent holds the /goal and acts as the orchestrator. It decides the overall strategy and delegates work to sub-agents. The sub-agents handle specific bounded tasks: cleaning a batch of records, drafting a set of messages, making a specific API call. The orchestrator tracks whether the work is moving toward the goal criteria and makes steering decisions when the run drifts. The judge evaluates the orchestrator's progress, not the sub-agents' line-level execution.

Mid-run steering works within this structure too. Adding a sub-goal while the agent is running does not require stopping and relaunching the entire goal. The orchestrator absorbs the new direction as a course correction, the judge updates its criteria, and the run continues. New information becomes a refinement, not a disruption.

What persistence across sessions actually unlocks for business

A single context window has a practical ceiling. A long, complex task that requires many sequential steps exceeds that ceiling. The previous generation of agent automation handled this by breaking tasks into pieces small enough to fit in a single session, which meant ambitious tasks had to be managed by a human coordinator who handed the pieces to the agent one at a time.

Persistence across sessions removes that ceiling in a direct and practical way. The agent saves its progress, and when the session ends, whether because of a crash, a planned restart, or a machine shutdown, it resumes from that saved state. A goal that runs for 18 hours does not require a person to stay awake. You launch the goal, go to sleep, and review the result in the morning.

The categories of work that this unlocks are significant and overlap with what most businesses actually need done. Large database migrations and enrichment jobs that would previously require a developer to write and babysit a script. Content production backlogs where each piece follows a template but the volume is large enough that a single session cannot cover it. Customer outreach sequences where personalization requires reading a record for each recipient and there are thousands of recipients. In every case, the task is well-defined, the finish line is testable, but the volume makes a single-session approach impractical.

Persistence also changes the risk profile of long runs. An agent that crashes mid-run and loses all its progress is a reliability problem. An agent that saves state and resumes is a standard operational tool. The difference between those two is the difference between a capability you can depend on and one you use cautiously.

Converting failures to skills rather than rediscovering them

One of the least-discussed but most practically valuable aspects of the /goal pattern is the ability to convert failures into reusable skills. This addresses a specific expensive pattern in long agent runs: the tendency to rediscover the same fix repeatedly.

In a run covering thousands of records or hundreds of sequential steps, the agent will hit failures. A record fails to parse because the date field uses an unexpected format. An API call fails because the endpoint expects a different parameter order than the documentation suggested. A file read fails because the path was specified relative to a directory that was not the working directory at that point in the run. Each of these failures has a fix. Without a skill mechanism, the agent discovers the fix, applies it, and then hits the same failure pattern again on the next affected record and has to rediscover the same fix. Tokens burn rediscovering the same resolution over and over.

The skill-conversion approach changes that dynamic. When the agent identifies a fix for a failure, it records the fix as a named skill: a pattern description, the failure condition that triggers it, and the resolution. That skill is available for the rest of the current run. When the same failure condition appears again, the agent applies the known fix immediately rather than working through the failure from scratch.

Over the course of a long run, this produces a compounding effect. The first few hundred records in a large backfill run encounter failure modes the agent has not seen before. Each one gets converted to a skill. The next few hundred records encounter some of the same failure modes, which the agent now handles immediately. By the time the run is near completion, the agent has accumulated a library of known failure patterns and their resolutions, and its effective throughput is higher at the end of the run than at the beginning. Skills also persist across runs, meaning the second time you run a similar goal, the agent starts with a populated skill library and handles common failure modes without discovering them again.

The HVAC company and the 17,000 records

An HVAC company had two years of service tickets sitting in a spreadsheet that had never been used strategically. The records existed, names and addresses and equipment notes, but the data was inconsistent. Many records were missing system age, last service date, or equipment model. Without clean data, the business could not filter to the customers most likely to need a maintenance service before the summer peak season, and the manual effort to clean 17,000 records was not a realistic option for an operation without a dedicated data team.

The /goal approach handled this overnight. The goal was written precisely: enrich every customer record with last service date and system age where that information can be inferred from the ticket notes, then draft a personalized maintenance reminder for every household whose inferred system age is eight years or more, and the goal is complete when every record has a populated system-age field and at least 300 reminders are in the outreach queue.

The judge checked those criteria on every evaluation pass. If any record still had a blank system-age field, the run continued. If fewer than 300 reminders were queued, the run continued. The CEO agent held the goal and delegated to sub-agents: one to handle the enrichment pass, one to handle the filtering pass, one to draft the messages. When records appeared with date fields in multiple inconsistent formats, the agent recorded the parsing fix as a skill and applied it to all subsequent records rather than working through it on each one.

The run completed overnight at a token cost of roughly $35 to $50. The business started the next morning with a cleaned database and a queue of 300 personalized maintenance reminders ready to send. An illustrative tune-up at this business runs $95. If 30 of the 300 reminders convert to a booked appointment, that single overnight run produces approximately $2,850 in revenue from a $50 token spend and zero manual labor hours. The pre-season timing amplifies the return: a tune-up in May prevents a breakdown call in July, which is expensive in parts, labor, and customer frustration, so the reminder campaign also shifts the customer relationship from reactive to planned.

Writing the goal so the judge can score it

The skill that determines whether a /goal run succeeds or wastes tokens is writing the outcome precisely enough for the judge to score it. A goal phrased as "improve the customer database" gives the judge no scoring criterion. A goal phrased as "every record has a populated system-age field and the outreach queue contains at least 300 messages" gives the judge a clear binary check on every pass.

Before launching a goal, apply a simple test: could a person looking at the current state of the work answer yes or no to whether this goal is done, without any subjective interpretation? If the answer requires judgment, the goal is not precise enough. If the answer is a factual check on the data, the goal is ready.

The other critical preparation is assembling the full tool harness before the run starts. An agent that stalls halfway through a multi-hour run because it is missing an API key or a file system permission wastes significant resources and requires a restart from a checkpoint. Set up all required tools, permissions, and skills before the run begins. The ten minutes of preparation avoids the hour of waste.

The /goal pattern rewards precision in specification and patience in setup. Those two investments, a testable outcome and a complete harness, are the difference between a run that converges cleanly and one that meanders. Once those conditions are met, the agent runs the hours, not you.

Do it with an expert
You can build this yourself, or have it set up right the first time.

That is exactly what we do at AI DOERS. Book a private 30-minute call with Madhuranjan Kumar and we will map the fastest path to it for your specific business.

Book your call →
Madhuranjan Kumar

Madhuranjan Kumar

Founder, AI DOERS · Performance Marketing

Madhuranjan Kumar brings 20 years of performance-marketing experience and has managed over $200 million in Facebook ad spend for brands across the United States and beyond. His expertise spans the full modern marketing stack: Meta, Google Ads, TikTok, email automation, CRM, and the websites that hold it together. At AI DOERS he turns that track record into lead-generation systems for businesses across every industry.

← Back to all insights
Why the /goal Command Changes How Agents Actually Work | AI Doers