You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(agent-loop): enhance state management with auto-detection and recovery
Add robust state persistence features to improve loop resumption and error recovery:
- Auto-detect existing state on startup — /agent-loop:start checks for
.agent-loop/state.json and prompts user to resume or start fresh
- Add /agent-loop:inspect command for deep state inspection (history, errors, validation)
- Add /agent-loop:reset command to clear state with automatic backup
- Add /agent-loop:restore command to recover from timestamped backups
- Implement state validation and corruption detection
- Create .agent-loop/backups/ system for timestamped state backups
Enhanced documentation:
- Update /agent-loop:start with auto-detection workflow
- Enhance /agent-loop:resume with detailed recovery information
- Add state management section to README with recovery scenarios
- Update orchestrator skill with state validation procedures
- Create CHANGELOG documenting v0.4.0 changes
Manifest updates:
- Bump version to 0.4.0 across all platforms (.claude-plugin, .codex-plugin, .antigravity-plugin)
- Register new commands in all manifests
- Update descriptions to mention auto-detection
The new state management system ensures users never lose loop context due to
interruptions, crashes, or accidental resets. All state operations are safe
and reversible through the backup system.
Co-Authored-By: duyetbot <duyetbot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: agent-loop/.antigravity-plugin/plugin.json
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "agent-loop",
3
-
"version": "0.3.0",
4
-
"description": "Continuous agent loop for overnight/day repository maintenance. Orchestrates triage, autoreview, browser automation, and parallel agent work across threads. Wake every 5 min, direct work to threads, land autonomously.",
3
+
"version": "0.4.0",
4
+
"description": "Continuous agent loop for overnight/day repository maintenance. Auto-detects and resumes from saved state. Orchestrates triage, autoreview, browser automation, and parallel agent work across threads. Wake every 5 min, direct work to threads, land autonomously.",
"description": "Continuous agent loop for overnight/day repository maintenance. Orchestrates triage, autoreview, browser automation, and parallel agent work across threads. Wake every 5 min, direct work to threads, land autonomously.",
3
+
"version": "0.4.0",
4
+
"description": "Continuous agent loop for overnight/day repository maintenance. Auto-detects and resumes from saved state. Orchestrates triage, autoreview, browser automation, and parallel agent work across threads. Wake every 5 min, direct work to threads, land autonomously.",
Copy file name to clipboardExpand all lines: agent-loop/.codex-plugin/plugin.json
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "agent-loop",
3
-
"version": "0.3.0",
4
-
"description": "Continuous agent loop for overnight/day repository maintenance. Orchestrates triage, autoreview, browser automation, and parallel agent work across threads. Wake every 5 min, direct work to threads, land autonomously.",
3
+
"version": "0.4.0",
4
+
"description": "Continuous agent loop for overnight/day repository maintenance. Auto-detects and resumes from saved state. Orchestrates triage, autoreview, browser automation, and parallel agent work across threads. Wake every 5 min, direct work to threads, land autonomously.",
All notable changes to the agent-loop plugin are documented here.
4
+
5
+
## [0.4.0] — 2026-06-14
6
+
7
+
### Added
8
+
9
+
**State Management & Recovery**
10
+
- ✨ Auto-detection of existing `.agent-loop/state.json` on startup — `/agent-loop:start` now checks for saved state and prompts to resume or start fresh
11
+
- ✨ `/agent-loop:inspect` command — deep inspection of state file, view cycle history, thread details, errors, and state integrity
12
+
- ✨ `/agent-loop:reset` command — clear state and start fresh, with automatic backup of old state to `.agent-loop/backups/`
13
+
- ✨ `/agent-loop:restore` command — recover state from timestamped backups
14
+
- ✨ State validation and corruption detection — automatic checks when loading state.json
15
+
- ✨ Backup system with timestamped files — automatic backups on reset or fresh start
16
+
17
+
**Enhanced Commands**
18
+
- 📝 Improved `/agent-loop:start` to auto-detect and prompt for resume vs. fresh (can force with `--fresh` or `--resume`)
19
+
- 📝 Enhanced `/agent-loop:resume` documentation with recovery details and state restoration info
20
+
- 📝 Updated `/agent-loop:status` to show when resuming from backed-up state
21
+
22
+
**Documentation**
23
+
- 📖 Enhanced orchestrator skill with state validation, recovery procedures, and backup system details
24
+
- 📖 Added "State Management & Recovery" section to README with recovery scenarios
25
+
- 📖 Updated README with organized command reference (Loop Control, State Management, One-Shot Operations)
26
+
- 📖 Comprehensive guides for all new commands with examples and recovery workflows
27
+
28
+
### Changed
29
+
30
+
- 🔄 Plugin version bumped from 0.3.0 to 0.4.0 (across all manifests: `.claude-plugin`, `.codex-plugin`, `.antigravity-plugin`)
31
+
- 🔄 State file schema now includes `version` and `state_valid` fields for better corruption detection
32
+
- 🔄 Updated descriptions in all manifests to mention "Auto-detects and resumes from saved state"
33
+
34
+
### Technical
35
+
36
+
- 🔧 State schema v0.4.0 with enhanced validation fields
- 🔧 State integrity checks: JSON validity, required fields, type safety, orphaned threads, metric consistency
40
+
41
+
### Why These Changes?
42
+
43
+
The agent-loop plugin previously required manual state management. Users had to explicitly remember to resume with `/agent-loop:resume` after interruptions, and there was no built-in recovery from state corruption or accidental resets.
44
+
45
+
**v0.4.0 improvements:**
46
+
1.**Smarter startup** — Auto-detect saved state and offer to resume (no more lost context)
47
+
2.**Better debugging** — Inspect command lets users understand their loop state deeply
48
+
3.**Safe reset** — Automatic backups mean resets are never destructive
49
+
4.**Full recovery** — Restore from backups for corruption or accidents
0 commit comments