Skip to content

feat(roadmap): a step stops at its budgets and records attempts #3568

Closed

Description

@dan-petty

Problem or Motivation

Part 1 of #3053. A step of the implement job has no bound on the tokens it uses or the time it takes: one step used 10 million input tokens before it stopped (#2554), and a stop names no limit. The trace shows model calls, tool calls and checks, but not the attempts, so a reader cannot see that a second attempt passed.

Proposed Solution & Architectural Design

  • Four settings in roadmap.implement: step_token_budget (8,000,000 input tokens), item_token_budget (20,000,000), step_time_limit_seconds (5400) and item_time_limit_seconds (12600). The defaults come from the measured spend of done and stopped steps. The 300,000 default in the text of feat(roadmap): every step repairs before it gives up, in bounded rounds #3053 would stop every step that works today (done steps used up to 5.9 million).
  • A step stops before a model request when a limit is spent. The stop has the new class limit_reached (action raise_limit), and its reason names the setting and its value.
  • A step that used all its repair rounds names roadmap.implement.repair_rounds in its reason.
  • A group that changes no file (plan_defect) gets no repair round, and a test holds it.
  • A new trace event attempt with the outcome, the class and the evidence of each attempt, printed by devops roadmap explain --trace.

Target Subsystem

The implement step, src/devops_cli/roadmap/implement_step.py, and the new implement_limits.py.

Existing Tool Considered

pydantic-ai covers UsageLimits and bounded retries. Its limit error holds a message and no field, so a stop cannot name its setting without a text match, and it has no wall-clock limit. The change builds a Hooks capability of about 120 lines: about 90,000 tokens to build, 4,000 each quarter to keep, 10,000 to fix one miss, about 5 hours.

Source: #3053

Activity

  1. added
    source/agent
    on Nov 5, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/high
    effort/medium
    on Nov 5, 2026
  3. dan-petty commented on Nov 5, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. Prevents unbounded token spend that already cost 10 million tokens, but it is a feature, not a critical defect.
    • Value: High. Stops runaway spend on a single step and makes each attempt visible in the trace.
    • Effort: Medium. Four settings, a new stop class, a new trace event, and about 120 lines of Hooks capability.
    • Related: feat(roadmap): cost and token budgets per item and per day #3066, which asks for a different change. Both add token and time budgets, but the candidate scopes them to the implement step with a new stop class and attempt trace, while #3066 covers per-day and per-repo budgets with alerts.
  4. added
    priority/p2-medium
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 5, 2026
  5. removed
    status/in-review
    on Nov 5, 2026
  6. devops-cli-service commented on Nov 5, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-05 03:28 UTC

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

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions