{"record":{"id":"02e4acbaa7a3321f","repo":"paperclipai/paperclip","slug":"wakeresult-message-the-assignee-wake-was-ski","errorCode":null,"errorMessage":"${wakeResult.message ?? \"The assignee wake was skipped.\"}","messagePattern":"\\$\\{wakeResult\\.message \\?\\? \"The assignee wake was skipped\\.\"\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ui/src/components/SidebarRecentTasks.tsx","lineNumber":201,"sourceCode":"      if (state.activePauseHold?.isRoot) {\n        const restartIssue = await issuesApi.get(entry.id);\n        setRestartWakeRetryPending(restartRetryStorageKey, entry.id, true);\n        await issuesApi.releaseTreeHold(entry.id, state.activePauseHold.holdId, {\n          reason: \"Restarted from Recent Tasks.\",\n        });\n        if (restartIssue.assigneeAgentId) {\n          const wakeResult = await agentsApi.wakeup(\n            restartIssue.assigneeAgentId,\n            {\n              source: \"assignment\",\n              triggerDetail: \"manual\",\n              reason: \"recent_task_restart\",\n              payload: { issueId: restartIssue.id },\n            },\n            restartIssue.companyId,\n          );\n          if (!(\"id\" in wakeResult)) {\n            throw new Error(wakeResult.message ?? \"The assignee wake was skipped.\");\n          }\n        }\n        setRestartWakeRetryPending(restartRetryStorageKey, entry.id, false);\n        toastActions?.pushToast({ title: \"Task restarted\", tone: \"success\" });\n      } else if (state.activePauseHold) {\n        throw new Error(\"This task is paused by a parent task. Restart it from the pause root.\");\n      } else if (readRestartWakeRetryIssueIds(restartRetryStorageKey).has(entry.id)) {\n        const restartIssue = await issuesApi.get(entry.id);\n        if (restartIssue.assigneeAgentId) {\n          const wakeResult = await agentsApi.wakeup(\n            restartIssue.assigneeAgentId,\n            {\n              source: \"assignment\",\n              triggerDetail: \"manual\",\n              reason: \"recent_task_restart_retry\",\n              payload: { issueId: restartIssue.id },\n            },\n            restartIssue.companyId,","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/ui/src/components/SidebarRecentTasks.tsx#L183-L219","documentation":"In SidebarRecentTasks' toggleTaskPause, after restarting a paused recent task the code wakes the assignee agent via agentsApi.wakeup. If the wake result does not contain an `id` (wake was skipped/failed), it throws with the result's `message` or the fallback 'The assignee wake was skipped.'","triggerScenarios":"agentsApi.wakeup returns a non-wake result object (e.g. { skipped: true, message }) because the agent cannot be woken: agent paused, agent missing credentials, or the runner rejected the wake during a recent-task restart.","commonSituations":"Restarting a task whose assignee was deactivated, agent API key revoked, runner offline so the wake is skipped, agent in an error state blocking wake.","solutions":["Inspect wakeResult.message for the agent-specific skip reason","Verify the assignee agent exists, is active, and has valid credentials","Retry the restart via the retry-pending storage key flow","Check the runner/agent adapter health before restarting"],"exampleFix":"// before\nthrow new Error(wakeResult.message ?? \"The assignee wake was skipped.\");\n// after\nif (!(\"id\" in wakeResult)) {\n  toastActions?.pushToast({ title: wakeResult.message ?? \"Agent wake skipped\", tone: \"warning\" });\n  return;\n}","handlingStrategy":"try-catch","validationCode":"const wakeable = entry.assigneeAgentId && agents.some(a => a.id === entry.assigneeAgentId && a.status === 'active');","typeGuard":"function isWakeResult(r: unknown): r is { id: string } { return typeof r === 'object' && r !== null && 'id' in r; }","tryCatchPattern":"try { await toggleTaskPause(entry); } catch (e) { if (/wake was skipped/i.test(e.message)) showToast('Agent could not be woken: ' + e.message); else throw e; }","preventionTips":["Verify the assignee agent is active with valid credentials before restart","Distinguish wake-skip results from hard API failures","Offer manual 'open agent settings' on skip","Log wakeResult fully for diagnosis"],"tags":["agent","wake","ui-state"],"backgroundTag":"unexpected-api-response-shape","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}