Repository navigation
Closed
Labels
area: engineAgent loop, models, approvals, storage, gatewayarea: tasksLong-running, scheduled, triggered and watcher tasksenhancementNew feature or requestpriority: P0Do first: safety or reliability guaranteesize: MMedium: one to two weeks
Description
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:
- Tool calls fail on local 8B models: default Tool Search hides exec behind tool_call; set tools.toolSearch=false for Ollama jcowhigjr/openclaw-docker-desktop-extension#247
- https://earezki.com/ai-news/2026-04-29-i-let-my-ai-agent-run-overnight-it-cost-437/
- https://kilo.ai/openclaw/vs-hermes
- https://www.getreadyforagents.com/blog/agent-cost-runaway-detection-token-enforcement-production/
Roadmap ID: LOCAL-3 · Priority: P0 · Size: M
Metadata
Metadata
Assignees
Labels
area: engineAgent loop, models, approvals, storage, gatewayarea: tasksLong-running, scheduled, triggered and watcher tasksenhancementNew feature or requestpriority: P0Do first: safety or reliability guaranteesize: MMedium: one to two weeks
Activity
Stop repeated tool calls; task runs ask before going over their limits (