Turn OpenAI Codex into a 24/7 autonomous auditor.
This repository provides a Recursive Research Loop for the OpenAI Codex CLI. By appending the loop.md logic to your task definition, you trigger a long-lived, autonomous audit cycle that documents and researches your codebase indefinitely.
To start the endless loop, follow these two steps:
Prepare a base prompt that clearly defines the scope of work. For the loop to function effectively, your prompt must include:
- Role Definition: (e.g., "You are a Senior Security Auditor.")
- Task Definition: (e.g., "Analyze the repository for SQL injection vulnerabilities.")
- Task Content: The specific files or modules to be examined.
- Acceptance Criteria: (Crucial) Define exactly what the output should look like (e.g., "Generate a Markdown table with the filename, line number, and risk level").
Append the contents of loop.md to the end of your base prompt.
When you input this combined prompt into the Codex CLI, the agent will:
- Complete the current task based on your criteria.
- Save the results.
- Self-Trigger: Automatically scan for the next task or deeper context, running without interruption until the queue is exhausted.
Because this loop is designed to run 24/7, it will consume tokens continuously. Monitor your usage dashboard regularly, even when using the Codex Desktop origin override.