fix(agents): preserve run-mode keep subagents past session sweep TTL (#83132)#83226
Conversation
The sweeper applied SESSION_RUN_TTL_MS (5 minutes) to any registry entry without archiveAtMs. Run-mode subagents spawned with cleanup:"keep" also have archiveAtMs=undefined by design, so they were pruned five minutes after cleanup completed — directly contradicting the keep semantic the user requested. Gate the absolute-TTL prune on spawnMode === "session" so run-mode keep entries stay registered. Session-mode runs retain the existing five-minute window. Refs #83132
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. Current main source shows a run-mode keep entry has no Real behavior proof Next step before merge Security Review detailsBest possible solution: Land this focused agents fix once the normal automerge checks pass; no new config knob or broader registry migration is needed. Do we have a high-confidence way to reproduce the issue? Yes. Current main source shows a run-mode keep entry has no Is this the best way to solve the issue? Yes. The PR changes the smallest implicated branch by exempting non-session keep entries before the session TTL logic, while leaving delete-mode archive cleanup and session-mode TTL behavior intact. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 800a0d316636. |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…(#83132) (#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5cf329f41a5aa00bff25eda8904dfca231b. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5cf329f41a5aa00bff25eda8904dfca231b Review: openclaw/openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…(#83132) (#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5cf329f41a5aa00bff25eda8904dfca231b. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5cf329f41a5aa00bff25eda8904dfca231b Review: openclaw/openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
…penclaw#83132) (openclaw#83226) Summary: - The PR exempts run-mode `cleanup: "keep"` subagent registry entries from the session-mode sweep TTL, adds focused regression coverage, and records the fix in the changelog. - Reproducibility: yes. Current main source shows a run-mode keep entry has no `archiveAtMs` and then matches ... ; the linked source PR also provides before/after terminal proof against a real persisted `runs.json` path. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): preserve run-mode keep subagents past session sweep TTL … Validation: - ClawSweeper review passed for head 32faf5c. - Required merge gates passed before the squash merge. Prepared head SHA: 32faf5c Review: openclaw#83226 (comment) Co-authored-by: yetval <yetvald@gmail.com> Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Makes #83168 merge-ready for the ClawSweeper automerge loop.
The edit pass should inspect the live PR diff, review comments, and failing checks; rebase if needed; keep the contributor branch credited; and stop only when validation is green or an external blocker is proven.
ClawSweeper 🐠 replacement reef notes:
Co-author credit kept:
fish notes: model gpt-5.5, reasoning high; reviewed against 32faf5c.