{"record":{"id":"567bde7c63698293","repo":"langgenius/dify","slug":"the-build-session-is-no-longer-active","errorCode":null,"errorMessage":"The Build session is no longer active.","messagePattern":"The Build session is no longer active\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"web/features/agent-v2/agent-detail/configure/use-agent-configure-session-controller.ts","lineNumber":104,"sourceCode":"  const waitForPendingBuildDraftPreparation = useCallback(async () => {\n    const pendingBuildDraftPreparation = pendingBuildDraftPreparationRef.current\n    if (!pendingBuildDraftPreparation) return\n\n    await pendingBuildDraftPreparation.catch(() => undefined)\n  }, [])\n\n  const runBuildPreparation = useCallback(\n    async <T>({\n      generation,\n      markBuildChatStarted = false,\n      prepare,\n    }: {\n      generation: symbol\n      markBuildChatStarted?: boolean\n      prepare: () => Promise<T>\n    }) => {\n      if (!isBuildCallbackCurrent(generation))\n        throw new Error('The Build session is no longer active.')\n\n      if (markBuildChatStarted) {\n        setHasStartedBuildChat(true)\n        setBuildDraftActionsDisabled(true)\n      }\n\n      const preparation = (async () => {\n        const result = await prepare()\n        if (!isBuildCallbackCurrent(generation))\n          throw new Error('The Build session is no longer active.')\n        return result\n      })()\n      pendingBuildDraftPreparationRef.current = preparation\n\n      try {\n        return await preparation\n      } catch (error) {\n        if (markBuildChatStarted && isBuildCallbackCurrent(generation)) {","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/langgenius/dify/blob/ef8544b173fd6cd7a8e71df2cab576e52bebbfbc/web/features/agent-v2/agent-detail/configure/use-agent-configure-session-controller.ts#L86-L122","documentation":"Error \"The Build session is no longer active.\" thrown in langgenius/dify.","triggerScenarios":"Thrown at web/features/agent-v2/agent-detail/configure/use-agent-configure-session-controller.ts:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ef8544b173fd6cd7a8e71df2cab576e52bebbfbc","analyzedAt":"2026-08-12T05:15:17.394Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}