Skip to content

G19 Hard budgets and a loop detector: unattended work stops itself #860

Open

Description

@scuttletoby

Why: the owner wants to leave work running and trust it will not waste usage, loop, or burn hours of CI.

Today: usage pacing only warns (the "enforce" mode exists but is off); review rounds are capped in prose plus a gate; nothing detects "the same failure again and again with no progress"; there is no CI-minutes budget; a sub-agent stuck on an approval prompt can sit for hours.

Done when:

  • usage pacing runs in enforce mode by default: low-priority work is held, not started, when an account is ahead of pace;
  • each task has a usage and CI-minutes budget; going over stops it and tells the orchestrator;
  • a loop detector stops a task that hits the same failure N times or pushes N times without the diff getting closer (same test red, same lens finding);
  • a stall detector flags a child with no progress for N minutes (pending approval, hung command);
  • each stop says why, in plain words, and what would let it continue.

🤖 Generated with Claude Code

Activity

  1. added
    area:agents
    size:big
    type:feature
    on Nov 29, 2026
  2. scuttletoby commented on Nov 29, 2026

    @scuttletoby
    OwnerAuthor

    Working on the loop detector, part 1 as pure logic: for one task's pushed heads in order (each green, red with its failures, or pending), it says continue or stop, with the reason in plain words and what lets it continue. Stop when the same failure (a check, a test file or a lens finding) is red on 3 heads in a row, or when 3 pushes after the fewest failures bring no fewer. A green head starts over; a re-run of one head is one push; the parent can let a stopped task go on past a head. Where the history comes from and who is told is part 2. One fork PR.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentssize:bigtype:feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions