fix: harden queue retry debounce and add regression tests

This commit is contained in:
Peter Steinberger
2026-02-24 03:52:31 +00:00
parent a216f2dabe
commit 6c1ed9493c
9 changed files with 257 additions and 6 deletions

View File

@@ -221,6 +221,13 @@ export async function resolvePromptBuildHookResult(params: {
};
}
export function resolvePromptModeForSession(sessionKey?: string): "minimal" | "full" {
if (!sessionKey) {
return "full";
}
return isSubagentSessionKey(sessionKey) ? "minimal" : "full";
}
function summarizeMessagePayload(msg: AgentMessage): { textChars: number; imageBlocks: number } {
const content = (msg as { content?: unknown }).content;
if (typeof content === "string") {
@@ -494,7 +501,7 @@ export async function runEmbeddedAttempt(
},
});
const isDefaultAgent = sessionAgentId === defaultAgentId;
const promptMode = isSubagentSessionKey(params.sessionKey) ? "minimal" : "full";
const promptMode = resolvePromptModeForSession(params.sessionKey);
const docsPath = await resolveOpenClawDocsPath({
workspaceDir: effectiveWorkspace,
argv1: process.argv[1],