v1.11.6: doom-loop guard (3 identical tool calls aborts recursion)

This commit is contained in:
2026-05-20 20:28:45 +00:00
parent 4ec196273b
commit f92b0810c3
8 changed files with 1050 additions and 176 deletions

View File

@@ -9,6 +9,7 @@ import { api } from '@/api/client';
import { sessionEvents } from '@/hooks/sessionEvents';
import { sendToTerminal, terminalsRegistry, type TerminalRegistration } from '@/lib/events';
import { CapHitSentinel } from './CapHitSentinel';
import { DoomLoopSentinel } from './DoomLoopSentinel';
import { CodeBlock } from './CodeBlock';
import { Button } from '@/components/ui/button';
import {
@@ -622,6 +623,13 @@ export function MessageBubble({ message, sessionChats, capHitInfo }: Props) {
);
}
// v1.11.6: doom-loop sentinel. No Continue affordance — retrying with the
// same tools would just re-loop. The card explains what tripped and
// suggests next steps (new message angle / switch agents).
if (message.role === 'system' && message.metadata?.kind === 'doom_loop') {
return <DoomLoopSentinel message={message} />;
}
// v1.8.2: tool messages and assistant tool_calls are now rendered by
// MessageList via ToolCallLine / ToolCallGroup. Tool-role messages reach
// this point only if MessageList didn't consume them (shouldn't happen,