Automate AI Task Completion with the /goal Command to Eliminate Babysitting
A specific workflow using Claude Code and Codex that automates task completion loops, significantly reducing human oversight time.
Practical Summary
This workflow uses the /goal command in AI coding tools to create an automated loop where one AI agent works on a task and a second AI agent grades its output against predefined criteria. If the output fails, the agent retries automatically, eliminating the need for constant human checking.
Why It Matters
For businesses, this translates directly to cost savings by reducing the human hours spent supervising and iterating on AI-generated work. It allows professionals to delegate complex, multi-step tasks and focus on higher-level strategy, effectively making AI a more autonomous and reliable worker.
How to Set Up and Use the /goal Command
The core idea is to define a clear 'finish line' for your AI task. Instead of vague instructions like 'make it good,' you must specify exact, verifiable criteria. For example: "Every claim has a source link, zero placeholders, all six sections present."
In your AI coding tool (Claude Code or Codex), type the /goal command followed by your detailed completion criteria. For example: /goal Create a trip plan for 3 days in Tokyo. Include a daily itinerary with time slots, estimated costs, and source links for all recommended attractions and restaurants. Output a markdown document.
The system activates two AI agents. The first agent (the worker) begins executing the task. It will print its work and proof of progress directly into the conversation.
The second agent (the checker) continuously reads the conversation output and grades it against your predefined /goal criteria. If the work is incomplete or doesn't meet the criteria, the checker instructs the worker agent to try again. This loop continues automatically until the criteria are met.
Once the checker grades the output as successful, the task is marked as complete. You can walk away after issuing the initial command. The author reports a trip-planning task was completed in 3 minutes 23 seconds with zero interruptions using this method.
