fix: propagate max-step failures and unify task transcripts (#874)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-02-09 14:49:38 -08:00
committed by GitHub
parent 101fc6f874
commit 8e5bc3956f
6 changed files with 198 additions and 48 deletions

View File

@@ -53,8 +53,12 @@ export async function packageSkills(
continue;
}
// Check if skill exists in known repos (prefer source_url over embedding)
const sourceUrl = await findSkillSourceUrl(entry.name);
// Check if skill exists in known repos (prefer source_url over embedding).
// When an explicit skillsDir is provided, skip network lookup and always
// package local files for deterministic behavior (especially in tests).
const sourceUrl = skillsDir
? null
: await findSkillSourceUrl(entry.name);
const skill: SkillSchema = { name: entry.name };

View File

@@ -685,12 +685,15 @@ async function executeSubagent(
}
}
const propagatedError = state.finalError?.trim();
const fallbackError = stderr || `Subagent exited with code ${exitCode}`;
return {
agentId: state.agentId || "",
conversationId: state.conversationId || undefined,
report: "",
success: false,
error: stderr || `Subagent exited with code ${exitCode}`,
error: propagatedError || fallbackError,
};
}