Skip to content

Commit 511368a

Browse files
duyetduyetbot
andcommitted
feat(agent-loop): add resume command
- Add agent-loop:resume command to resume loop from persisted state file. - Register agent-loop:resume command in Codex manifest. - Update documentation in README.md and CLAUDE.md. Co-Authored-By: duyetbot <duyetbot@users.noreply.github.com>
1 parent 6e2e4c1 commit 511368a

4 files changed

Lines changed: 41 additions & 1 deletion

File tree

agent-loop/.codex-plugin/plugin.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"agent-loop:stop",
1818
"agent-loop:status",
1919
"agent-loop:triage",
20-
"agent-loop:autoreview"
20+
"agent-loop:autoreview",
21+
"agent-loop:resume"
2122
]
2223
},
2324
"interface": {

agent-loop/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ agent-loop/
3434
| `/agent-loop:status` | Check loop status and history |
3535
| `/agent-loop:triage` | One-shot repo queue triage |
3636
| `/agent-loop:autoreview` | One-shot PR review and fix |
37+
| `/agent-loop:resume` | Resume the loop from persisted state |
3738

3839
### Skills
3940

agent-loop/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ That makes it easy to parallelize + steer work as needed.
4141
| `/agent-loop:status` | Check loop status and history |
4242
| `/agent-loop:triage` | One-shot repo queue triage |
4343
| `/agent-loop:autoreview` | One-shot PR review and fix |
44+
| `/agent-loop:resume` | Resume the loop from persisted state |
4445

4546
## Skill Sources
4647

agent-loop/commands/resume.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
allowed-tools: Bash, Read, Write, Task, Agent
3+
description: Resume the agent-loop from the last persisted state in .agent-loop/state.json. Wakes every 5 minutes, triages repos, dispatches work to parallel agent threads, monitors progress, and reports results.
4+
---
5+
6+
# Agent Loop Resume
7+
8+
Resume the continuous agent-loop from the last saved state in `.agent-loop/state.json`.
9+
10+
The loop will load the state file to recover statistics (cycle count, items processed, PRs merged) and continue the cycle:
11+
1. **Load State** — parse `.agent-loop/state.json` to restore loop context
12+
2. **Wait** — sleep for configured interval (default: 5 min)
13+
3. **Triage** — scan repo queues for actionable items
14+
4. **Dispatch** — route autonomous work to parallel agent threads
15+
5. **Monitor** — track thread progress and outcomes
16+
6. **Report** — log cycle summary
17+
18+
## Usage
19+
20+
```bash
21+
/agent-loop:resume
22+
/agent-loop:resume --interval 300
23+
```
24+
25+
## Options
26+
27+
- `--interval <seconds>`: Sleep between cycles (default: 300)
28+
- `--scope <current|all|org>`: Triage scope (default: current)
29+
- `--max-concurrency <n>`: Max parallel threads (default: 3)
30+
- `--repos <owner/repo,...>`: Comma-separated repos for broad scope
31+
- `--dry-run`: Preview what the loop would do without executing
32+
33+
## State File
34+
35+
State is recovered from and persisted to `.agent-loop/state.json` in the repo root.
36+
Use `/agent-loop:status` to inspect current state.
37+
Use `/agent-loop:stop` to gracefully shut down.

0 commit comments

Comments
 (0)