AltimateAI / AltimateAI/altimate-code

Doom loop circuit breaker allows infinite loops in headless mode

Abierto
#657 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
811
Forks
134
Merge medio
3 d 2 h
PR fusionados (30 d)
50

Descripción

## Problem

When `doom_loop` permission is auto-accepted (headless mode or `doom_loop: "allow"` in config), the per-tool repeat counter resets to 0 every 30 calls and loops run indefinitely. Observed in production telemetry: a single session made 10,943 `apply_patch` calls and 1,791 `todowrite` calls in 4 hours, consuming ~98.8M input tokens.

## Root Cause

The existing doom loop detection asks permission every 30 calls of the same tool, then resets the counter. In headless/automated environments where permission is auto-accepted, the counter resets and the loop continues with no upper bound.

## Expected Behavior

Sessions should escalate and eventually force-stop when the same tool is called excessively, regardless of permission configuration.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.