codex-goal-loop

Automate complex tasks with OpenAI Codex's persistent goal loop.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/mrmtsuruya/hermes-backup --skill codex-goal-loop-mrmtsuruya
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: codex-goal-loop
Source: https://github.com/mrmtsuruya/hermes-backup/tree/main/skills/codex-goal-loop
Command: npx skills add https://github.com/mrmtsuruya/hermes-backup --skill codex-goal-loop-mrmtsuruya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires codex, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates complex tasks by leveraging OpenAI Codex's /goal feature, enabling a persistent agent loop for continuous execution and verification of tasks.

Core Features & Use Cases

  • Persistent Agent Loop: Executes a task in a loop until a stop condition is met.
  • Plan → Act → Test → Review → Iterate: Follows a structured process for task execution.
  • Use Case: Ideal for tasks like software migrations, coverage lifts, and refactors with contract tests.

Quick Start

Start a goal loop to automate the migration process by typing: /goal Migrate this project from Pydantic v1 to v2. Read first: pyproject.toml, src/, tests/. Constraints: no public API changes; keep imports backwards-compatible via shims if needed; no new dependencies. Validate after each change with: pytest -q. Work in checkpoints; log progress briefly. Stop when: full suite passes with zero deprecation warnings, OR when a change requires architecture decisions.

Frequently Asked Questions about codex-goal-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate a complex software migration task with Codex?

Automating complex software migration with Codex involves a persistent goal loop that follows a structured Plan, Act, Test, Review, and Iterate process. This continuously executes and verifies the task until a specific stop condition is met.

What is a persistent goal loop for task execution?

A persistent goal loop for task execution is an automated agent cycle that continuously processes a task through planning, acting, testing, and reviewing. It iterates until a defined stop condition is achieved, ensuring continuous verification.

Do I need a specific Codex CLI version to use the goal loop feature?

Yes, using the persistent goal loop requires Codex CLI, app, or extension version 0.128.0 or higher. You must also explicitly enable the goals feature in your config.toml file to run automated tasks.

What is the best way to handle refactors with contract tests using Codex?

Handling refactors with contract tests using Codex is best achieved through a persistent goal loop. This approach provides continuous verification and iteration, executing structured checkpoints until your test suite passes without warnings.

When should I stop an automated Codex task loop during a migration?

You should stop an automated Codex task loop when your full test suite passes with zero deprecation warnings, or when a specific change requires architecture decisions. You define these stop conditions in your initial goal prompt.