fix(agents): stop param shadowing in auth failure marker

This commit is contained in:
Ayaan Zaidi
2026-02-22 21:00:17 +05:30
parent ace8357149
commit 6268ed57ea

View File

@@ -500,11 +500,11 @@ export async function runEmbeddedPiAgent(
let lastRunPromptUsage: ReturnType<typeof normalizeUsage> | undefined;
let autoCompactionCount = 0;
let runLoopIterations = 0;
const maybeMarkAuthProfileFailure = async (params: {
const maybeMarkAuthProfileFailure = async (failure: {
profileId?: string;
reason?: Parameters<typeof markAuthProfileFailure>[0]["reason"] | null;
}) => {
const { profileId, reason } = params;
const { profileId, reason } = failure;
if (!profileId || !reason || reason === "timeout") {
return;
}
@@ -513,7 +513,7 @@ export async function runEmbeddedPiAgent(
profileId,
reason,
cfg: params.config,
agentDir: params.agentDir,
agentDir,
});
};
try {