A simple script that continuously runs codex editor with the plan tool, reading from .agent/prompt.md.
- Create a
.agent/prompt.mdfile in your project with your instructions (seeprompt.mdas template) - Run the script:
./codex-loop.sh
- Press Ctrl-C to terminate the loop
codex-loop.sh- Main script that runs the continuous loopprompt.md- Template prompt file showing the expected format
while :; do cat .agent/prompt.md | codex e --include-plan-tool ; doneThis creates an infinite loop that:
- Reads the prompt from
.agent/prompt.md - Pipes it to codex editor with the plan tool enabled
- Repeats indefinitely
Edit prompt.md to define:
- Project goals and requirements
- Testing strategies
- Development principles
- Memory system usage