AltimateAI / AltimateAI/altimate-code

Doom loop circuit breaker allows infinite loops in headless mode

Đang mở
#657 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
811
Fork
134
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
50

Mô tả

## 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.