Skip to content

feat: design durable, evidence-verified agent loops - #377

Merged
saucam merged 8 commits into
mainfrom
docs/loop-engineering-design
Oct 21, 2026
Merged

saucam merged 8 commits into
mainfrom
docs/loop-engineering-design

Conversation

@saucam

@saucam saucam commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Proposal

Adds docs/loop-engineering-design.md, a design for durable agent loops built on codeoid's existing pipeline, findings, dispatcher, session, and checkpoint infrastructure.

The initial workflow takes a failing check and produces a verified repair or an explicit blocker within declared limits. The proposal defines evidence tied to the exact candidate revision, lifecycle ownership, cancellation and crash recovery, provider capability limits, and staged delivery. Existing pipeline human boundaries remain the default.

The document includes a cited research comparison and an evaluation plan. It distinguishes proposed guarantees from existing capabilities and treats claims of superiority as something to measure.

Implementation tracked in #376. Merging this PR records the proposal; it does not implement the feature or close that issue.

Validation

  • Documentation only; no runtime or configuration changes.
  • Checked all 12 relative document links, balanced Markdown fences, and whitespace.
  • git diff --check passes.

Review Focus

Confirm the first repair workflow, lifecycle ownership between controller/pipeline/dispatcher, verifier integrity boundaries, and the guarantees feasible across different provider adapters.

Revision: codeoid's own levers in the first loops

The first draft reached parity on reliability. The revision makes the first repair recipe carry the things codeoid can do that other loop tools don't:

  • Hidden checks: acceptance checks the worker never sees, required to finish.
  • cannot_satisfy outcome: the worker can report that the objective conflicts with its checks, and the run ends blocked instead of in edited tests.
  • Feedback policy: what the worker is and isn't told after each check.
  • Escalation to another backend when an attempt stalls, with exact loop detection from checkpoint snapshots.
  • Candidates across backends, chosen by evidence, built on session.compare (feat: compare backends side by side — one prompt, 2–4 forks, keep the best #364).
  • CI-failure and review-comment triggers in the first milestone, since they are where loops are most used.
  • Learning across runs, kept as advice that never counts as evidence.
  • The measurements a "best" claim has to win at matched model and spend.

🤖 Generated with Claude Code

saucam and others added 2 commits October 11, 2026 22:37
Reliability alone reaches parity with existing check-and-repair loops.
This revision makes the first repair recipe carry the things codeoid is
placed to do better, instead of deferring them:

- contract fields with hidden checks and protected inputs
- a first-class `cannot_satisfy` worker outcome, so a conflict between
  objective and checks ends `blocked` rather than in altered checks
- a written feedback policy: visible-check diagnostics yes; hidden-check
  and integrity-detection detail no
- an approval profile so attempts wait and notify instead of parking
- an escalation ladder ending in a different backend, and exact
  oscillation detection from checkpoint tree digests
- evidence-selected candidates across backends via session.compare (#364)
- learned per-repository run records, as advice never evidence
- CI-failure and review-comment triggers in the first milestone
- per-attempt `maxBudgetUsd` on the Claude SDK as a real spend bound
- the sandbox spike moved into milestone A
- the measurements a "best" claim must earn, at matched model and spend

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@saucam
saucam merged commit d105f4d into main Oct 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants