11---
22name : openclaw-autonomous-issue-sweep
3- description : " Orchestrate 64 autonomous OpenClaw issue workers newest-to-oldest; find existing PRs, deeply investigate bugs, simplify or refactor, live-test, independently review, land verified fixes, close already-fixed issues, and add only meaningful new evidence."
3+ description : " Orchestrate 64 autonomous OpenClaw issue workers newest-to-oldest with isolated issue worktrees and resource-bounded parallelism; investigate bugs, simplify or refactor, review, land verified fixes, close already-fixed issues, and add meaningful evidence."
44---
55
66# OpenClaw Autonomous Issue Sweep
@@ -17,9 +17,15 @@ subagents. Keep parent-thread updates to concise progress and clickable URLs.
1717- Use full-history forks so every subagent inherits the orchestrator's model
1818 and ** xhigh reasoning effort** . Never print, record, or disclose model
1919 identifiers; redact subprocess banners and diagnostics before reporting.
20- - Treat a request to run this workflow as authority to review, fix, refactor,
21- commit, push, create/update PRs, land eligible changes, comment, and close
22- issues individually. Do not ask for routine confirmation again.
20+ - Begin every full-history child assignment with its explicit role and agent
21+ identity, require inherited ** xhigh reasoning effort** , and forbid
22+ ` create_goal ` , visualizations, ` spawn_agent ` , or nested agents. Children
23+ return evidence to the orchestrator; never downgrade their model or effort.
24+ - Treat a request to run this workflow as authority to create lightweight,
25+ issue-scoped isolated Git worktrees and ` codex/issue-<id> ` branches, review,
26+ fix, refactor, commit, push, create/update PRs, land eligible changes,
27+ comment, and close issues individually. Do not ask for separate worktree or
28+ routine-operation confirmation again.
2329- Never treat sweep authority as permission to publish releases, bump protocol
2430 or SQLite schema versions, weaken security, break shipped compatibility,
2531 change another owner's protected product surface, or execute untrusted code
@@ -36,30 +42,53 @@ subagents. Keep parent-thread updates to concise progress and clickable URLs.
3642## Coordinate 64 workers safely
3743
38441 . Assign one subagent to maintain the live open-issue queue in descending
39- ` createdAt ` order, one to coordinate landing/proof capacity, and the rest to
40- issue investigations. Coordinator agents also investigate when idle.
45+ ` createdAt ` order, one to coordinate landing/proof capacity, and no more
46+ than ** 3** to live issue closures or other GitHub mutations. Assign the
47+ remaining slots to issue investigations; idle coordinators also investigate.
41482 . Claim issues from the newest unclaimed end only; replenish workers as they
4249 finish. Parallel completions may arrive out of order, but never knowingly
4350 start an older unclaimed issue ahead of a newer available issue.
44513 . Deduplicate by canonical root cause, not merely by issue number. Let one
4552 owner fix a shared defect and link related issues/PRs to that outcome.
46- 4 . Freeze the reviewed source SHA for each wave. Designate a single fetch owner;
47- pause shared-ref refreshes while repo-native PR prepare/merge runs.
48- 5 . Never switch a shared checkout branch or edit it while sibling agents use it.
49- Use an existing agent-owned checkout, a repo-native isolated PR worktree, or
50- an explicitly user-authorized new worktree. Otherwise serialize write
51- access; parallel read-only investigations may continue.
52- 6 . Sample checkout/temp-volume free disk, CPU/load, memory pressure, process
53- count, operator-gateway health, actual worker count, and Octopool capacity
54- before each wave and periodically thereafter. Throttle expensive work for
55- sustained pressure or low disk; never kill unrelated operator processes.
56- 7 . Serialize merge operations and each Testbox lease. A lease has one owner and
57- one active command; never reclaim, sync, or change its head during a run.
53+ 4 . Freeze the reviewed source SHA for each wave. Serialize only shared Git/ref
54+ mutations: fetches, branch/ref changes, ` git worktree add ` /remove, PR
55+ preparation and merges, and main-targeted pushes. Give each mutation a brief
56+ coordinator-owned exclusive slot; do not hold it across coding, proof,
57+ reviews, remote waits, or other independent issue work.
58+ 5 . Give every independent root-cause fix its own isolated, issue-scoped
59+ lightweight worktree and ` codex/issue-<id> ` branch. Create it from the
60+ frozen SHA, for example:
61+
62+ ``` bash
63+ git worktree add -b " codex/issue-$issue_id " \
64+ " $campaign_worktrees /issue-$issue_id " " $frozen_main_sha "
65+ ```
66+
67+ Reuse a repo-native isolated PR worktree when repairing an existing PR;
68+ duplicate issues sharing one root cause share its single owner/worktree.
69+ Share Git objects; do not clone the repository or install dependencies per
70+ worktree merely for isolation. Never edit, switch, reset, or otherwise
71+ mutate the shared checkout while sibling workers are active. Once isolated
72+ worktrees exist, independent issue owners edit, inspect, and verify in
73+ parallel within their own checkout.
74+
75+ 6 . Keep all ** 64** inherited high-effort agents available, but distinguish idle
76+ agents from active local tool users. Start with bounded waves of ** 4–8**
77+ concurrently active code/test workers and continuously reduce or expand that
78+ limit according to usable CPU/load, memory/swap pressure, checkout and temp
79+ free disk, process count, operator-gateway health, and remote-pool capacity.
80+ Reserve capacity for the operator; count heavyweight proof proportionally,
81+ stop admitting new commands under sustained pressure, and resume in small
82+ waves after recovery. Never kill unrelated operator processes.
83+ 7 . Serialize merges and each Testbox lease, not independent worktree edits. A
84+ lease has one owner and one active command; never reclaim, sync, or change
85+ its head during a run.
58868 . Respect GitHub rate limits, active assignees, repository ownership, and
5987 existing contributor work. Do not auto-assign broad-discovery candidates.
60889 . Replace finished workers while the queue remains. Record actual active,
61- completed, failed, fixed, landed, closed, commented, and skipped counts;
62- never report launched or finished workers as still running.
89+ parked, completed, failed, fixed, landed, verified-closed, queued-for-close,
90+ commented, and skipped counts. Persist that campaign checkpoint for resumed
91+ workers; never report launched, parked, or finished workers as still running.
6392
6493## Conserve GitHub capacity and host resources
6594
@@ -79,10 +108,17 @@ subagents. Keep parent-thread updates to concise progress and clickable URLs.
79108 merge decisions, or a stale/contradictory cached result. Rate-limit and
80109 deduplicate worker requests instead of having 64 agents independently fetch
81110 the same issue, PR, author profile, or CI rollup.
82- - Keep disk, load, memory pressure, active lease IDs, provider trust class,
83- checkout ownership, and pool capacity in the orchestration ledger. Slow new
84- assignments, serialize builds/tests, clean only campaign-owned artifacts,
85- and offload heavy proof before resource pressure threatens the host.
111+ - Keep disk, CPU/load, memory pressure, active lease IDs, provider trust class,
112+ issue-worktree ownership, active local tool count, frozen heads, and pool
113+ capacity in the orchestration ledger. Dynamically cap concurrent code/test
114+ workers instead of serializing every independent fix. Pause or interrupt only
115+ campaign-owned work under host pressure, preserve each issue's claim and
116+ isolated checkout, then resume from that recorded state when capacity returns.
117+ Offload heavy proof before resource pressure threatens the host.
118+ - Worktree checkout and dependency use must respect free-disk headroom. Reuse
119+ shared Git objects and existing trusted dependency installs where safe; route
120+ dependency-missing or heavyweight proof to the selected remote box instead
121+ of multiplying local installs across issue checkouts.
86122- The parent may prewarm a trusted Crabbox/Testbox lease when a concrete heavy
87123 proof is imminent, then hand its verified lease ID and checkout ownership to
88124 one subagent at a time. Avoid speculative fleets, respect path-scoped lease
@@ -154,6 +190,74 @@ Choose outcomes in this order:
154190- Do not edit ` CHANGELOG.md ` ; capture user impact, issue/PR references, and
155191 human credit in the PR body or commit message.
156192
193+ ## Hard issue-closure gate
194+
195+ An issue stays open unless every step below passes. Similar wording, adjacent
196+ tests, merged PR dates, contributor suggestions, and confident review summaries
197+ are not closure proof.
198+
199+ 1 . Write down the reporter's exact ** primary symptom** , desired user-visible
200+ outcome, every separately affected surface, reported version/build SHA, and
201+ all proposed alternatives. An optional mitigation or diagnostic suggestion
202+ does not replace the reported primary outcome.
203+ 2 . Personally trace both shipped and current behavior end to end: entry point,
204+ canonical owner, caller, callee, dependency contract, sibling surfaces, and
205+ existing tests. Reproduce the exact reported failure on the affected build
206+ and prove the same user action succeeds on current ` main ` . Use a runnable
207+ product or boundary-level regression; a nearby unit test, revised error text,
208+ or an unexecuted source inspection is insufficient.
209+ 3 . Prove Git ancestry rather than inferring it from dates:
210+
211+ ``` bash
212+ git merge-base --is-ancestor " $fix_sha " " $current_main_sha "
213+ git merge-base --is-ancestor " $fix_sha " " $reported_build_or_tag_sha "
214+ git tag --contains " $fix_sha "
215+ ```
216+
217+ The fix must be an ancestor of current ` main ` . Compare it against ** each**
218+ affected exact build/tag, account for diverged release branches, and identify
219+ the first containing release when known. A merge before a release date does
220+ not prove inclusion in that release. If the fix was already in an affected
221+ build, assume the report still reproduces until a later causal fix is proved.
222+
223+ 4 . Classify the candidate honestly: root-cause repair, mitigation, diagnostic
224+ improvement, unsupported contract, workaround, or product decision. Never
225+ close because a suggested fallback landed if the primary action still fails,
226+ any reported surface remains broken, an owner hold exists, or documented
227+ behavior requires an unresolved maintainer/security/product decision.
228+ 5 . Require a ** different, independent subagent with inherited xhigh reasoning**
229+ to challenge the investigator's closure packet. The challenger personally
230+ verifies the primary outcome, every affected surface, runtime owner and
231+ contract, release ancestry, and before/after proof. The investigator cannot
232+ self-approve; only a separate authorized closure coordinator may grant the
233+ mutation after both reviewers agree. Any disagreement means ** leave open** .
234+ 6 . Immediately recheck live GitHub state, labels/owner holds, current ` main ` ,
235+ and exact proof. Do not close on stale state, an incomplete source map, an
236+ indirect main-only test, changed wording without changed behavior, or any
237+ unresolved facet. In ** one sentence** , the closure comment must state the
238+ exact fixed behavior, fix SHA/PR, first containing version when known, and
239+ before/after evidence.
240+ 7 . If a closure is challenged or an incorrectly closed issue is reopened,
241+ ** pause all closure mutations** . Audit earlier closures, correct the public
242+ record, reopen proven mistakes, and resume only after explicit root
243+ authorization. Continue safe investigation and verified code-fix work.
244+
245+ Required evidence map:
246+
247+ ``` text
248+ Primary symptom -> expected outcome -> every reported surface -> affected build/tag
249+ Entry -> caller -> canonical owner -> callee -> dependency -> sibling -> boundary proof
250+ Fix SHA -> current-main ancestry -> each affected-build ancestry -> containing release
251+ Affected-build failure -> current-main success -> independent challenge -> coordinator grant
252+ ```
253+
254+ Reject example: a remote command fails because its explicit working directory
255+ does not exist on the target host. A merged change that only replaces a vague
256+ spawn error with an accurate invalid-directory diagnostic is useful, but the
257+ command still fails. If the primary expected outcome is successful execution,
258+ leave the issue open; changing that explicit-directory contract may need an
259+ owner decision.
260+
157261## Verify behavior and obtain two independent reviews
158262
159263For every non-trivial production change:
@@ -222,9 +326,9 @@ moves:` item with real evidence or an explicit reason for skipping it.
222326- Keep owner/security/auth/config/public-SDK/protocol/persistent-state/product
223327 decisions outside autonomous landing when the relevant guide requires owner
224328 judgment. Continue with the next issue instead of blocking the whole sweep.
225- - Close a fixed issue only after live rechecking its open state and matching
226- the original symptoms to current-main proof. Cite the merged PR/commit and
227- ask the reporter to reopen if it still reproduces on the current version .
329+ - Close a fixed issue only after the complete ** Hard issue-closure gate ** ,
330+ independent challenger sign-off, coordinator grant, and fresh live recheck.
331+ Cite the exact causal PR/commit and first containing release when known .
228332- Never close merely because a repro is difficult, the report is inconvenient,
229333 the behavior might be intentional, or the PR is stale. Product-decision and
230334 won't-implement closures require maintainer judgment.
@@ -235,6 +339,10 @@ moves:` item with real evidence or an explicit reason for skipping it.
235339- Recheck live state immediately before every mutation; avoid redundant,
236340 speculative, noisy, or duplicate comments. Handle closures individually and
237341 follow repository limits on bulk operations.
342+ - After verifying the canonical landed SHA and preserving contributor credit,
343+ remove only that campaign-owned isolated worktree during a brief serialized
344+ Git mutation slot. Delete its campaign-owned branch only when no unlanded
345+ work depends on it; never prune unrelated worktrees, refs, or user files.
238346
239347## Parent-thread reporting
240348
0 commit comments