From d742512181b8e8616f21bfddbf27c6a8cd2358e2 Mon Sep 17 00:00:00 2001 From: ismeth Date: Sun, 1 Mar 2026 19:38:49 +0100 Subject: [PATCH] fix(council-continuation): increment nudge count only after successful dispatch Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- .../background-agent/council-continuation-enforcer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/background-agent/council-continuation-enforcer.ts b/src/features/background-agent/council-continuation-enforcer.ts index bd29652e9..a730b34c4 100644 --- a/src/features/background-agent/council-continuation-enforcer.ts +++ b/src/features/background-agent/council-continuation-enforcer.ts @@ -59,7 +59,6 @@ export function sendCouncilContinuationNudge( } nudgeCountByTask.set(task.id, count + 1) - const resumeModel = task.model ? { providerID: task.model.providerID, modelID: task.model.modelID } : undefined @@ -90,6 +89,7 @@ export function sendCouncilContinuationNudge( parts: [createInternalAgentTextPart(CONTINUATION_PROMPT)], }, }).catch((error) => { + nudgeCountByTask.set(task.id, count) log("[council-continuation] Nudge prompt error:", { taskId: task.id, error: String(error), @@ -101,4 +101,4 @@ export function sendCouncilContinuationNudge( } return true -} +} \ No newline at end of file