Watch the Tutorial: Infinite Agentic Loop with Claude Code
An experimental project demonstrating Infinite Agentic Loop in a two prompt system using Claude Code.
This project uses a custom Claude Code slash command (/project:infinite) to orchestrate multiple AI agents in parallel, generating evolving iterations of content based on specifications.
Read .claude/settings.json to see the permissions and commands allowed.
Start Claude Code: claude
Type slash command /project:infinite to start the infinite agentic loop.
The infinite command takes three arguments:
/project:infinite <spec_file> <output_dir> <count>
/project:infinite specs/invent_new_ui_v3.md src 1Generate one new iteration using the UI specification.
/project:infinite specs/invent_new_ui_v3.md src_new 5Deploy 5 parallel agents to generate 5 unique iterations simultaneously.
/project:infinite specs/invent_new_ui_v3.md src_new 20Generate 20 iterations in coordinated batches of 5 agents for optimal resource management.
/project:infinite specs/invent_new_ui_v3.md infinite_src_new/ infiniteContinuous generation in waves until context limits are reached, with progressive sophistication.
- Specification Analysis: Reads and understands the spec file requirements
- Directory Reconnaissance: Analyzes existing iterations to determine starting point
- Parallel Coordination: Deploys Sub Agents with unique creative directions
- Quality Assurance: Ensures each iteration is unique and spec-compliant
- Wave Management: For infinite mode, manages successive waves of agents
- Apply this to a use case of your choice.
- Build an MCP Server that enables reuse of the infinite agentic loop.
- Get the
.claude/commands/infinite.mdinto your~/.claude/commands/directory for global use. - Update
.claude/commands/infinite.mdto generate sets of files instead of a single file.
Learn to code with AI with foundational Principles of AI Coding
Follow the IndyDevDan youtube channel for more AI coding tips and tricks.
Use the best Agentic Coding tool: Claude Code
MIT License
Copyright (c) 2026 disler
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
