{"record":{"id":"0414674585754979","repo":"paperclipai/paperclip","slug":"runner-goal-stop-unsupported","errorCode":"runner_goal_stop_unsupported","errorMessage":"runner_goal_stop_unsupported: The live agent goal cannot be stopped safely.","messagePattern":"runner_goal_stop_unsupported: The live agent goal cannot be stopped safely\\.","errorType":"error_code","errorClass":"RunnerGoalActionError","httpStatus":null,"severity":"error","filePath":"server/src/services/runner-goals.ts","lineNumber":963,"sourceCode":" * session. Codex-style sessions pause; providers that only advertise clear\n * (currently Claude ACP) are cleared. The caller must not interrupt the process\n * until this function confirms the resulting projection.\n */\nexport async function settleLiveRunnerGoalBeforeInterrupt(\n  db: Db,\n  binding: { companyId: string; issueId: string; agentId: string },\n): Promise<\"paused\" | \"cleared\" | \"none\"> {\n  const goals = runnerGoalService(db);\n  const current = await goals.projection(binding.companyId, binding.issueId, binding.agentId);\n  if (!current?.goal || current.goal.status === \"complete\") return \"none\";\n  if (current.goal.status === \"paused\") return \"paused\";\n  const action = current.capability.actions.includes(\"pause\")\n    ? \"pause\" as const\n    : current.capability.actions.includes(\"clear\")\n      ? \"clear\" as const\n      : null;\n  if (!action) {\n    throw new RunnerGoalActionError(\n      \"runner_goal_stop_unsupported\",\n      \"The live agent goal cannot be stopped safely.\",\n    );\n  }\n\n  const requestId = `interrupt_${randomUUID()}`;\n  const adapterControl = dispatchLiveRunnerGoalControl(binding, { requestId, action });\n  const nativeControl = adapterControl\n    ? null\n    : queueLiveRunnerPrpCommand({\n        ...binding,\n        type: action === \"pause\" ? \"session.goal.set\" : \"session.goal.clear\",\n        payload: action === \"pause\"\n          ? { requestId, status: \"paused\" }\n          : { requestId },\n        commandId: `goal_${requestId}`,\n      });\n  const completion = adapterControl?.completion ?? nativeControl?.completion ?? null;","sourceCodeStart":945,"sourceCodeEnd":981,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/server/src/services/runner-goals.ts#L945-L981","documentation":"settleLiveRunnerGoalBeforeInterrupt throws RunnerGoalActionError(runner_goal_stop_unsupported) when a live goal exists and is not complete/paused, but the provider capability list advertises neither the pause nor the clear action. Without one of those actions the service cannot safely stop the running goal before the agent process is interrupted, so it refuses rather than orphaning a live run.","triggerScenarios":"Calling settleLiveRunnerGoalBeforeInterrupt() for an issue whose current.capability.actions array contains neither \"pause\" nor \"clear\" while a non-complete, non-paused goal is active. This happens with adapters/providers that expose no goal-stop control surface.","commonSituations":"Using an agent adapter whose provider does not implement goal pause/clear (capability not yet implemented for that adapter type); a capability negotiation change after an adapter upgrade; calling the interrupt path on a session type that only supports implicit completion.","solutions":["Upgrade or fix the adapter so its capability declaration includes \"pause\" or \"clear\" and the corresponding control handler is implemented.","Check the adapter's reported capability (current.capability.actions) to confirm what stop actions the provider actually supports.","Wait for the goal to reach \"complete\" or \"paused\" status before interrupting, since the stop path is skipped in those states.","Use a different provider/adapter that supports live goal control if safe interruption is required."],"exampleFix":"// before (capability without stop actions)\nconst capability = { actions: [\"set\"] };\n// after\nconst capability = { actions: [\"set\", \"pause\", \"clear\"] }; // adapter must implement the pause/clear handler","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":["adapter","capability","control-plane"],"backgroundTag":"unsupported-operation","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}