Engine: run findings ledger, findings gate, loop continuation, larger memory, loop lint, retry partial work, resume_session

- Runner-owned findings ledger per run: stages report a # findings section
  (new items and F<n> status changes); stable IDs, persisted (run_loop_state),
  in RunDetail.findings, findings.md, memory.md, inspect.
- type=findings gate stage routes open/clear on the ledger mechanically.
- retry --extra-visits N [--stage KEY] continues an exhausted loop; limits
  on_exhausted=decide parks the run on accept/continue/abort.
- Essential memory cap 20 KB, task never truncated, handoff and open findings
  ahead of the outcome ledger.
- Lint rejects limits.on outcomes on forward edges; warns on ineffective
  limits and resume_session.
- A resumed retry carries the failed visit's output.md and private/ under
  previous-attempt/.
- resume_session=true resumes a Claude stage's previous session on loop visits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 14:22:28 +00:00
parent c4de1de27b
commit 34b8b94223
39 changed files with 2314 additions and 132 deletions
+19
View File
@@ -898,6 +898,25 @@ Retry replays the entire workflow; earlier edits or notifications are not undone
and may happen again. A missing original directory blocks retry rather than
silently using your current directory.
`pipelines retry <run-id> --extra-visits N [--stage KEY]` (wire fields
`retry_extra_visits` 1-5 and `retry_extra_stage`) continues a run whose loop
exhausted its visits (`max_visits`, the five-visit or 30-step cap) where it
stopped instead of re-running the visit that hit the cap: N extra visits go to
every exhausted stage, or with `--stage` to that stage only. Grants are
recorded on the run (`visit_grants`) and inherited by later retries; each
granted visit also lets the 30-step cap grow by one pass over the graph
(bounded at 120). It cannot be combined with `--mode=restart` or `--visit`.
A resumed retry also inherits the run's findings ledger as it stood before the
retried visit, and receives the failed visit's `output.md` and `private/`
files (bounded: 200 files, 1 MiB each, 8 MiB total) under
`previous-attempt/` in its turn directory, listed in its `input.md`'s
`# Previous attempt` section.
`pipelines inspect` lists the run's findings ledger (counts, open findings
most severe first, closed IDs) and its extra-visit grants; `--json` carries the
whole ledger (`findings`, with every status change) and `visit_grants`.
Retry is hidden and rejected while a run is executing or agent cleanup remains
active, even if a terminal status was already persisted. Run RPCs report
`executing` alongside status so clients can distinguish cleanup from completion.