Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/silupanda/codex-agent-loop/rungit clone --depth 1 https://github.com/SiluPanda/codex-agent-loopWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00027 | $0.00728 |
| Opus 5 | $0.00014 | $0.00364 |
| Sonnet 5 | $0.00005 | $0.00146 |
| Haiku 4.5 | $0.00003 | $0.00073 |
Grade A, and why
run scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/agent-loop:run
This command definition is included for Codex builds that surface plugin-defined
slash commands. If /agent-loop:run is unrecognized in your Codex build, use
$agent-loop instead.
This plugin command is namespaced by plugin id, so invoke it as:
/agent-loop:run ...
Run the local Codex Agent Loop runner at:
~/.codex/plugins/agent-loop/scripts/agent_loop.py
When to use
- The user explicitly asks for a loop, autonomous run, or Claude-Code-style persistence.
- The task likely needs multiple inspect/edit/test cycles.
- You want a bounded run with a turn cap and resumable approval pauses.
Arguments
The user invoked this command with: $ARGUMENTS
Workflow
- Treat
$ARGUMENTSas CLI flags plus the task text. - If
--resumeis present, run the script with that resume path. - Only add
--approve-pendingafter the user explicitly approves the paused action. - If
--doctoris present, run the environment check and summarize the result. - If
--demois present, run the safe onboarding demo. - Approval modes in human terms:
on-write= safenever= hands-offalways= review-everything
- If the first positional token looks like
10m,1h, or5t, treat it as a shorthand budget:m= minutesh= hourst= turns
- Run:
python3 ~/.codex/plugins/agent-loop/scripts/agent_loop.py $ARGUMENTS
- If the runner pauses for approval:
- summarize the pending command or patch
- show the saved state path
- ask whether to resume with
--approve-pending
- If the runner completes, report:
- stop reason
- backend
- turns used
- files changed
- verification commands
- final answer
- Do not claim any command or patch executed unless the runner output shows it.
Notes:
- Agent Loop is bounded; it should stop when the task is complete or when it hits a budget/pause/error.
- In fallback mode, a stop reason like
completed_via_fallbackmeans the run completed throughcodex exec; it is not an error.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 82 lines · 0 tokens per session scan A 690a0cb7e7f1
run is a command published in the GitHub repository SiluPanda/codex-agent-loop (4 stars, last pushed 4mo ago), licensed MIT. It adds 27 tokens to every session and 728 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
review-pr
Revisa un PR de GitHub (por URL o número, en CUALQUIER repo) con múltiples agentes en paralelo — code review por área, seguridad, consistencia de contrato, rendimiento, tests y auditoría de comentarios de revisores — verifica cada hallazgo contra el código real y guarda un consolidado. Nunca comenta en el PR; eso es…
release
Walk the llmwiki release process step by step.
test
Run Postman collection tests, analyze results, diagnose failures, and suggest fixes.
ox-session-pause
belongs in the ox CLI JSON output (guidance field), not here. Skills are agent-specific wrappers; ox serves all agents (Codex, etc.). --> Suspend the current session recording. Local cache continues to receive entries, but the upload at stop time will exclude the suspended range.
incident
Live incident response — intake a Sentry issue, stack trace, or symptom; gate mitigate-first vs root-cause-first; keep a UTC timeline. Use when production is broken RIGHT NOW; for the after-action write-up alone, use /orc:postmortem.
t800-onboard
Для чата с новичками. Показывает, что настроено в Cursor (global + local), и что умеет отдел T-800.