Skip to content

Stop repeated tool calls and enforce per-task budgets #133

Closed

Description

@itsskofficial

An 8B model made 25 identical malformed calls in 330 seconds. A summarizer made 14,000 redundant calls costing $437. An OpenClaw user reported about $131 a day. Practitioners say spend-rate breakers and iteration caps are what actually stop runaways.

Idea:

  • the same tool called with the same arguments 3 times stops the run and asks the user
  • each task gets a maximum number of steps, wall-clock time and tokens or dollars, plus a spend-rate circuit breaker
  • a breach pauses the task and asks (using ask_user); it never kills silently

Status in Sentient today: Partial. models.max_tool_rounds and tasks.max_tool_rounds cap rounds, but there is no detection of identical calls and no time or money budget.

Where: Loop detection in sentient/agent/loop.py; budgets in sentient/tasks/executor.py and the tasks section of sentient/config/schema.py; cost data from sentient/llm/events.py; pause via sentient/tasks/ask.py.

Done when:

  • three identical calls in a run trigger a pause with a clear question
  • step, time and cost budgets pause the task when exceeded
  • tests cover each breaker

Sources:

Roadmap ID: LOCAL-3 · Priority: P0 · Size: M

Activity

  1. added
    enhancement
    area: engine
    area: tasks
    on Oct 9, 2026
  2. self-assigned this
    on Oct 9, 2026
  3. added
    priority: P0
    size: M
    on Oct 9, 2026
  4. added a commit that references this issue on Oct 9, 2026
    13f2a8a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: enginearea: tasksenhancementpriority: P0size: M

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions