Merge branch 'dev' into llm-centralization
generate / generate (push) Has been cancelled
test / test (push) Has been cancelled

This commit is contained in:
Aiden Cline
2025-12-14 15:18:00 -08:00
committed by GitHub
6 changed files with 19 additions and 16 deletions
+1
View File
@@ -783,6 +783,7 @@ export namespace Config {
.array(z.string())
.optional()
.describe("Tools that should only be available to primary agents."),
continue_loop_on_deny: z.boolean().optional().describe("Continue the agent loop when a tool call is denied"),
})
.optional(),
})
+3 -1
View File
@@ -12,6 +12,7 @@ import { SessionStatus } from "./status"
import { Plugin } from "@/plugin"
import type { Provider } from "@/provider/provider"
import { LLM } from "./llm"
import { Config } from "@/config/config"
export namespace SessionProcessor {
const DOOM_LOOP_THRESHOLD = 3
@@ -40,6 +41,7 @@ export namespace SessionProcessor {
},
async process(streamInput: LLM.StreamInput) {
log.info("process")
const shouldBreak = (await Config.get()).experimental?.continue_loop_on_deny !== true
while (true) {
try {
let currentText: MessageV2.TextPart | undefined
@@ -219,7 +221,7 @@ export namespace SessionProcessor {
})
if (value.error instanceof Permission.RejectedError) {
blocked = true
blocked = shouldBreak
}
delete toolcalls[value.toolCallId]
}