Dashboard › opencode › Distillation
1d699423-08a7-43bf-8bd5-df687dd78017["lore_tm_v1_I4jq4qKf_sNuaK8ngj5ZrFCJHsm5EHiH5z1ny-idpxU","lore_tm_v1_INRQz45d9qU4PBF8hgcFafONRZ4dF1swWAtviuSvXws","lore_tm_v1_tQjDymnT16F7SRGwdgI-rIr4CWSoI7vuTMTbAgJZEqA","lore_tm_v1_WTUEUiINMoJLhG8MQ_XSj6b32O80ysFElyLyaNZCjw0","lore_tm_v1_ZoF4634jBu8vi91AHNWL88kETACUqlnZNrva6f9cPZw","lore_tm_v1_n_nXHp-SQtT1Y3toLiTTjRhl5C8Q7xfIjqTRqOzvWWM","lore_tm_v1_vPSW2iSvN2hQToucgwguXnbZ3J5Oe4E2CyFEHpJ0lZw","lore_tm_v1_re-lKFVlVGSTHrj6YTGNxgexTnbYBvwaBGsfGRZMySg","lore_tm_v1_P3L4HLl99AP5ctBH53AOkoSUWbOX7-HD-oh7b4kXvyg","lore_tm_v1_qqeyE9UXvhsTn4En24gst-SxN1cqJMVkqPk4azD2Jzk","lore_tm_v1_n4-RNKwiW25yH7s7Zu1mmz-n2btIXnmGZDE7kmdYCLg","lore_tm_v1_JZUrA5w1OkZAN9S_-Gas4GDaFwXV1-q5yaid6obm0u0","lore_tm_v1_it7GZPsS0V-WnxujkPv6Qu0GmwUoxCCkFlPGOIAsKJQ","lore_tm_v1_WQHslKE04ZCNbMTxV5ooxFWPWIy1zKr_-8RvB9iwbwc","lore_tm_v1_UP5EZUpbFboBGa3iF59KDOkpgNfmjASIAkJjSfNsCSA","lore_tm_v1_T_In82V3FXWLfI12KVX1zhRISXz3Z6yh4N3KdAUMBxA","lore_tm_v1_2QMNEuCjwiTMehcBIbYt_znEtU1fm0FbQU1tUaLkDLc","lore_tm_v1_seKQ93debKiEVH2vugMANrkW8Dg2c5HRTbxAZKguGc8","lore_tm_v1_X6xs0LjAdsg1PAGV-sGe3gaP6AuDhncd16KMJT3Ghnw","lore_tm_v1_Ds92Kw6ES513rcqt-oQnklvYQw95GNTKmbsZQvj1IoQ","lore_tm_v1_ZLf64whslimTe5suuPpKlcsiQUfPOOPc3TGCB9EvJeM","lore_tm_v1_6aPmVuLM-YqvPWO1TCFgZtm57wokFJCevLx5LgvkPyA","lore_tm_v1_ei6RH6a5NpkDtlm57aSvfHuDUZgV6zkfOcMoiMVOIa8","lore_tm_v1_KNgXRlxLqfp0BwO28D5WcVmUEKG9WIOnFUdowqz9184","lore_tm_v1_-I2VaLAuoLYOhqRiqD8pQoiAatMc-s_Mj3g5Q_tpO6Q","lore_tm_v1_RZcLRc5audvoxrDwagS6Av3Upa76UUz-4At4UfQkh-g","lore_tm_v1_L6qV3JV2Tmafo-p0x2_OwA5sJ7aF9SmRk2IDlBp8zy8","lore_tm_v1_r7j57RiZ9jfoU9W7g9Kf19kcYD7AtPFHGD6ddHZ7wFw","lore_tm_v1_HkjSGatIAW3MEeUbff0WcO07eBuU4PRHtMgS_2T1aPg","lore_tm_v1_wN2bDW8oOpH-LQYOkv3tvW60up4ck9r_-l0UntNeJQo","lore_tm_v1_vhZ7qSIs61w_mmjy9g9bKyPwNs7VdAKBiNCo4HZspJQ","lore_tm_v1_ZRkieKpUImd-nFwm3tOZ1RWeA7l79a5OutjrSV-e8JA","lore_tm_v1_OwHSEMAY-YTHC6ILtAH8iK5PWZL-_4AnDoseiz4USto","lore_tm_v1_WfmtMCLK2S3vbXdqdg4GjdYnZqJYC3_ss0MyyDqUZ4o","lore_tm_v1_BVsyfZ4Vjf0NHfpaEQa0fSiFHq-eMNwJueMByA4gdtQ","lore_tm_v1_K_tY51ksOihS9NuX8PALqqmLEql-HyaH7PEUHafcv0Q","lore_tm_v1_B3jSFub0i3-THu-bwMeQd5hv7U79mMd7q3jgdnq05tc","lore_tm_v1_M0836WlSLou65gyho_tYtIeMRrtzwFkun-eY82u9KY8","lore_tm_v1_ONB79WAKpdQ_-KR8ICOXuJkXc_I5r5wtY3Uadx54qhA","lore_tm_v1_SBZskrP4R2A5QbW89J9XQNNudM6dyo3ylff6caFJTIU","lore_tm_v1_-8Hvgmf8Pfcq7d1dl-bi4P5-r124uL13EBddiNwJKNE","lore_tm_v1_NWJkPnKhhnD9k-AlEQqmed2exAe3eF3408MvXIpZFwo","lore_tm_v1__8UXANzRxsIcNPEhK47g_7mk-Bb_BpbmGOJHUgx6tbA","lore_tm_v1_DodkwCTPgD6GnXWxJxyZbn6g0pnQK-_m7nzm5rWTBQg","lore_tm_v1__zIDUGffoU_LojFFS_KyVq2xYrjgLyJwCpifFR-epxE","lore_tm_v1_EbwMduC_EIRaJcH-Df3241d2g5Cp4LaLJcogbi_jXOM","lore_tm_v1_hR_Xg7nRyI32p0IhHNuwjH_ZX8q79BXoPkD6CeyxfJ0","lore_tm_v1_09X4aeRnxSm6jPqwEy7j7Dz-3yZJOyQlve41tStiR8Y","lore_tm_v1_FN4GnJ-cZVo2Oahhx1Vxh9CVblNqiD8UFo_UfGxCtzI","lore_tm_v1_0uRz9rC2XnJFJW3dXQ_4nI4EfVPzd0G7WAVleA4RMag","lore_tm_v1_b689LIy9Ri11AOY7l9r9MafpCPvvpIf5_IIRJaey0lo","lore_tm_v1__uLVpH7n2Oi62Lt4P0bJUNMH9gsr0HyDMkx6gpsJlW8","lore_tm_v1_MOnEHyVM3CvBeQy4gewL_p6sbOEre8j1SMk7h7SCQc8","lore_tm_v1_UR-mxHPe8nAAcXmUJwN-rf7I4eeqExc310Bbjru3xPM","lore_tm_v1_ky5FDJrraCsTqh17Y-ItkBHco0PBJ43wx0V19BcKYGE","lore_tm_v1_o2B72laJXNnnNpMTF43FXBij1h4knl1xGRdsQfhTYOU","lore_tm_v1_L2a1rxPylG1fKOPjFkm5JmyEs6lAA4Ve2yrcPS6BuNM","lore_tm_v1_T021oyMtz2jZ1V2KvoPLg7iIpftCyg3U64fe1S2sCHw","lore_tm_v1_AA3SbYaaQY1aQ7GxCRI6d3v8LKkKqrLTLyuUiI5IK0A","lore_tm_v1_l7IAWUpbrIfsH_R5FsRR4sHrWQ1Fbb06LaQO01bRa4Q","lore_tm_v1_V9xUzDIQkhxCZcqgJaC1jtLXXXeklOA1iGUCkaQTD-k","lore_tm_v1_VZlTS7tuHYc2jJOGqcgZTx5bUknFPhs6dquGeHtXNE0","lore_tm_v1_I1tjn4EI51jlaKiX46hSw0gie_aWrw1aNZYwZLYbouI","lore_tm_v1_LwetbZZ8AAsXZ4mmcgd68X-kWqGvOV_LDqNllNoWVSI","lore_tm_v1_I469v7EPj2nyjdcBoyr1WU2FRNy25wmRLzf3l_f2fac","lore_tm_v1_vk-IXquYtILv0fCI0QWDg_l9WYIz7Forqgud14IHKMo","lore_tm_v1_5Z28-yz3ENP7KiePpELKHjASEV_7b3JFG3_ejFMRiPU","lore_tm_v1_OE-G201Q3JDCj_Q7E6xPISIqjhsuMwica-v1FA0jxS4","lore_tm_v1_ILkyC5nNtAysXHdU6S2zQ2JYD6jRiC7e_DeWFSTf_HI","lore_tm_v1_tZ46sx1ZDwt8exYWmXO52JvdPM__v-XRRjq2-jH78Sw","lore_tm_v1_GgdBU_F9PNsIfmBdmyj5GR97OkXW0xOw-qqiXxuBrOo","lore_tm_v1_PqBm8jy4jFRkDkEcJDTK9xsDR1plkSg_1hZHsq9aoiE","lore_tm_v1_a6jgSRZBanyOHZjXbzBOwMHQ7CBB6-k_GC6WFYpTvtM","lore_tm_v1_BzvjuOBQoFQsT4pQY34m-58X91JZC7KfJk5qxvg4rx4","lore_tm_v1_96-7mrXtoplDTwcqB0tdhKSIootApPERNQSIZwOF0JU","lore_tm_v1_tmC_Zs-A7oISK9ElY7cd8l7s_0Saphciuw-sgFT-eJw","lore_tm_v1_buGM55kF1W-NgR6Hi0ckb4bWOoqnxlb_a5mxQggzowo","lore_tm_v1_DdfrdqlNUruddpzOy9bs49VYifIIBfa3XbmuGtBOFhI","lore_tm_v1_0BBo-81I9o4yLpDgLX5HuvWQmJfBmk46lJtmFUItYZs","lore_tm_v1_Honv1n1oigVowSuenBzG78lq8iodE3DsYwPoenIb640","lore_tm_v1_xt2luhAc0YZQPi236I20iKXfvSE-zYNmO1-AbvKw-_c","lore_tm_v1_BPbfdEnxehMMvAdFeUcQ0mwi_G11D1hUK56ReVZ29XY","lore_tm_v1_AOTNeu1LnKijBF5Itb-9MwhuZ-Rewct-lVPAP5ToMUU","lore_tm_v1_eh4zS9HYlKSlgJ3N3-yeg6-3pwvrTlZ-wzyGvTpuRM0","lore_tm_v1_uARTR70P1hOEzdo9uUWNBsYM8i6m_ko8DnYBW5Ch1X0","lore_tm_v1_ngMe-2Xy9NWvmxaKlQdmcqoEAW7dYdOGpPoX0cwXcSs","lore_tm_v1_008_X3V0vOKvP4TQoLWAordsJ31S4gEGE77vHo-vUJc","lore_tm_v1_bkCCMrudIKu5SAkJxKAx1O9d0queqF4bnZvD7HaCYIg","lore_tm_v1_mdo2VsYRGquzdqudEvt51YBVyy4Y61GcoXDPdbXruA4","lore_tm_v1_Gr5tYOCp4Z9PJxAUc7qjicNVED1gux5dszQryw47sUs","lore_tm_v1_IcP0OZ6-wauL6Sq9lyQtIbr6qriLAlFPJq8jJBX1bkY","lore_tm_v1_WZnVq3esKuwZyXZXlKEMFtRbXbjXG7THy8fiK9Ts29M","lore_tm_v1_zvO4P73Rhpl2fJ5hxZn5dPcd_GJ43YTavoiBQY-UMMA","lore_tm_v1_JKCiOCu-Kt1uKuHgXBglitazPiVkctCuoO-kdgwhfFE","lore_tm_v1_3K8BU9SfNlwxH35sJrnXWoAvjVqgZa7RomYappYq2tc","lore_tm_v1__Jxtd8vJoXEWoWOKwLEG7ejmziOrmo5hZpNEdDMU0Pk","lore_tm_v1_SXPf2Ui3XMLc0eyeQqRxuGvNucZCBnao0cTyFcQZa_4","lore_tm_v1_FDPyusYuP6zE7ub8CqY-aZRrwT9krXgpaTWcpazzS40","lore_tm_v1_jZABRHotpmG15YT2eFMgQ3QORXRwiUbrY2GsLhv3C7E","lore_tm_v1_KWOnpVjxknajQro9X3SkcA6xClOxj5sO9LQpaA31SDo","lore_tm_v1_5jKbBFyr7sbZd0zJBkF3HiE_HcljW9JcqPRSP-tJ1pk","lore_tm_v1_mirS4SvvCJezY_6EwvaFCj2bFo056WN2BCVWsGHdcW0","lore_tm_v1_RGLsY-ijht35qoRsfenvLm0fwrOIjdoc4gaNY4Knufo","lore_tm_v1_LIS3qNTAAXgsS3arykhojbXG3bHkmCut3b8oWWULA88","lore_tm_v1_tqj-7ZrhChJ7nvaMvr04w63ah7CjX5jKdCp31rnDzj8","lore_tm_v1_sGObwgtPb632PRGmpCo2lKwpdmbJJ1BFnsIpGeFhPyU","lore_tm_v1_c6k7WLKNMC9YBlPeIXpxu9PG98SvGRtHOEZ57byXBRs","lore_tm_v1_juGexfkQ8Vibm6GXlDdjI90NQhke52rKlfS5ExsTOPI","lore_tm_v1_rDyxolwPW9IxIbFcWtFROE629AzP17KaiO2_KDRgAPY","lore_tm_v1_6Ia-mMZlhT5Mkj-eSaRh7XdBmNLW6GlB6S9QWiLi3dw","lore_tm_v1_9vhgOGSFnAEfAaTnMHxnOnjyW2gUz7_qwaGO2n5uTV0","lore_tm_v1_A0lcWQiyJdRQ2arSJ9OHfyYNX2Ete8c8H9qGhFc6aaA","lore_tm_v1_jkSvqlKF_M_Mbc7gSAU7sv8BkZVwRaSBToDWf6d4G2g","lore_tm_v1_9uwy8naOVK-Cu9cM_o1M43RDJwpwg-pGbiY1t4tGOlg","lore_tm_v1_yZtXvfTS9iLR5b8LwUyr7rHlPuzdTlzLvCQzE-eJ3W8","lore_tm_v1_j0F6WYJua2VrQO598FiRDmC26pJYdLKdlwf9g6aZlUU","lore_tm_v1_WMILPgRjnD0VfiEvsdrCcrkNZEupZnCzzFHv6nerbZo","lore_tm_v1_ytDSS910Y8bgH_SVGr0OxZdwO3K4UudJzNBt_vB7KUs","lore_tm_v1_um3bKapdKCfvFpn7qGvKBOSjT5QS7v-5809VJtdiW9A","lore_tm_v1_zAnB1iSvCXG0U-shZnoUYCoaOhG3X0clRCkCQiSwL7k","lore_tm_v1_k4ezM-tgOusWVlQcO_BmZp_EEjKQ_pK0-_397weEQEQ","lore_tm_v1_CwrUj3ROnX3Ian3ONqV3qhjRymFulvz8ArFJ0sR4si0","lore_tm_v1_gx6ptkfQrnKdVA_naXrTgD-THNxPVIkyiq-jxP2CItM","lore_tm_v1_80l2eD4pp_3IeLBt2wMqOhafsHtAVNqyBQ6eBhE3mFQ","lore_tm_v1_ZowLDqhCZtPbuh5Tc6kUxXaeavtQL8NGeg6EVKoxQAM","lore_tm_v1_AtfpKFsodj2F1tEf4k2pnc7Grn0d--ltl_9E5yU8hbg","lore_tm_v1_TBdsgydSERi1xvC_MS3IIuOOvhPbzSpfkelFCFw5CvI","lore_tm_v1_qR-3CxPhmN2ZT6zIc5dXVoR8JjsvH7TaCjSfMl6U0O8","lore_tm_v1_y_2LNubHxeh7fECIGGyHVOAP-fDqTAaV1KHRxX5KOLM","lore_tm_v1_D-cqLMPw2VceXdICt7h9XXAbDkDpTFQFKD8BwcL4Vhw","lore_tm_v1_hMbjgfaVVfH1sP9eMyJdj2NZMYyuqkMrwVZUsdCYlgc","lore_tm_v1_lUWGQkPVrRRP_Zr8CtI92rvVGE8yj1_5cJjzzQ8zNUc","lore_tm_v1_BHH4vk39dFLEAHsotvaDwPt6wP7mXG_AfqLZ9mtXcRk","lore_tm_v1_cHWGGaum8hX5JYITiWg-QlVZrNd72d-eREas-OydqSI","lore_tm_v1_JXywW6FeUmzlgiXBOejfdvxV_XZ4043HwKvWs96oG1k","lore_tm_v1_dvLU91pNIP9LzpdUd2_vulaGeBBwdh10Fh8w0OifzX0","lore_tm_v1_sbhd7Cz_ntiNb50RZ5oKoEX-iI4LRk3dDh4xNdYKQeU","lore_tm_v1_vZ5UhGXzm0jBXV2QX_aVUWHrpVPofPIUULF5vXkZ7p4","lore_tm_v1_ioAEu3j9IPGvFbYnHE5_p8bSRIUBTOTURi73IIBmxj8","lore_tm_v1_PvsAWaEYSxAcO-408wSHQiaJfykIaY6dweHKCAxre6g","lore_tm_v1_-J6TCPmHZXDSUqWD87wT0bZZNz0Yz6vBHbsBRTF0a9M","lore_tm_v1_nqqIwI6aPxGnVDRu9P5dJHhWE4Tz1tBjFc4Md1pyKms","lore_tm_v1_vOEnZ3Re0aB_HnF2LsEAL7cBQbhq8O931LV0xXvgxJQ","lore_tm_v1_TDktw9yTNh2m7su-XFfXbJHF2fsC4uwB3IX8nuJ7vtk","lore_tm_v1_aee6f82Kbp-GSqpYticJHai31VtcNo6ZMUArb9jK5rU","lore_tm_v1_9QrhLTZfOwGKWzsdAYw8jAu8PPz86HPP0eUgGKvgwvE","lore_tm_v1_Gw8o1b_xPZX7sGNdcQT5GiE8XmmbffIPWTTVGk6hOMk","lore_tm_v1_hzuEzfDA9es60WQhdumLb-p_6q1mfHKExoNRI5hzMnc","lore_tm_v1_8RM0jdur6w_gOuVp7LM96OLXuvbMFVRyotDyfx4vAOg","lore_tm_v1_8eRKF8teJu-BNHsvDpzywls4prmNd19LgvxhwXrzB9w","lore_tm_v1_vTpY5lJ7866aXyHN8_KMrxXa5zhKJQWAuOzU4REnTrY","lore_tm_v1_TYEu2E9ZUjVFoAjh1aNm-uEYIYXLMr7016F6Ihm67kk","lore_tm_v1_x76Vx5AlmU3_AtXxePSq3XvlWEIwwburwGrvv3XTufo","lore_tm_v1_NCbD0352CdN1ZlrBOnKPDWtszZ-0Y6hNJ1D0aaoQcR0","lore_tm_v1_0HWRViB6X9H9hNm546txg59b_k6wri2NeZXUZTgMqIw","lore_tm_v1_puhda5VOY5iFXJlQgsukgc4leznP0u2CJeZygSNr0yA","lore_tm_v1_HlNvGlMUtrFiCMlpv-9LZVtL5Su3NYIjcmKaBRqs2WA","lore_tm_v1_h5cG9JoxFomm-KaxSZQ7i5aOM_rdK8KmzVo9YAJbsY0","lore_tm_v1_0WAJt7U__oGDjc9Q_6GMLljDx95pSp5hNhy_g1kxRIk","lore_tm_v1_c4cizUV9H93KB7UVRCmsovQmJsTFA7J2jOQwDypYfvw","lore_tm_v1_Xo46OCJ4xjq2M6dpamz9dN6k8TSj96iZkQvPnwNZPro","lore_tm_v1_YiYXSHnbWJmU-TsyQKROEE4TyzP5gJUp1EupWxilqaA","lore_tm_v1_VKtrK4VSt00Jta7CNCIFUwMASJM6YjdtZ6KO6aWQWo8","lore_tm_v1_D4MRwvewPiYvpuFMB2mcuvw95yNkPA1BOGPoixdabfA","lore_tm_v1_nAgL7W9RBjbXzV9W9WgnuhgrxcqpvZYzx1CkJMmPZTs","lore_tm_v1_IoZtxwQqqAqvVZL-ZxX8fX7avjVkYsCYNczD_3kHzAc","lore_tm_v1_W6JF_gvvUAngU0e69CqZpvckz6-ApFWvvzQPFx2HMck","lore_tm_v1_fsCvXzJYwYwTFOXu2-CmRUAxmtpyK-jb9PxTr5BeU3g","lore_tm_v1_mXIiEAhugFMatDNZg-WsTYcbYXsWsQVLrwgzGF0DfZ0","lore_tm_v1_Paip9ond5b1IDMo4k-7j5mQvk_ktPAqQZDuJ8mGotfk","lore_tm_v1_i94b0yLVxlvI26VV4qK-KjJSi9V6zLx3UKz8r-DRVFE"]
/home/byk/Code/opencode, focused only on V2 interrupted-session recovery after the latest fixes.file:line evidence and a concrete failure sequence. If no defect exists, explicitly say PASS and provide evidence-backed residual risks/testing gaps. If blocked, quote the exact tool/error and affected scope."continue" after Step.Ended and Compaction.Ended.step-finish.resume:false, lease expiry/takeover, supported pre-feature-to-final migration, fresh schema, and replay./home/byk/Code/opencode; branch was reported as byk/cumulative. One status reported HEAD dc661f30cb2055ad6248fdc59b14998d834497be (dc661f30cb, feat(core): recover interrupted sessions), while another reported revision was 631f67a9f330e2e0b1c064db358e67133a053655; this discrepancy was not resolved.packages/core/src/session/execution/claim.tspackages/core/src/session/recovery-id.tsperf.dataperf.data.oldpackages/core/src/database/migration/20260914170650_session-recovery.tspackages/core/src/database/migration/20260914214636_session-execution.tspackages/core/src/database/migration/20260914222526_session-execution-phase.tspackages/core/src/database/migration/20260915193000_session-recovery-fencing.tspackages/core/src/session/recovery.tspackages/core/src/session/input.tspackages/core/src/session/projector.tspackages/core/src/session/execution/local.tspackages/core/src/session/execution/claim.tspackages/core/src/session/runner/llm.tspackages/core/src/session/runner/publish-llm-event.tspackages/core/src/session/sql.tspackages/core/test/session-runner.test.tspackages/core/test/session-projector.test.tspackages/core/test/session-prompt.test.tspackages/core/test/database-migration.test.tsNo files found, so inspection proceeded directly from repository files and instructions.session_id, execution id, owner_id, and a live lease."continue" represents a committed Step/compaction that still requires another provider turn.Step.Ended commits "continue" when a settled tool or other condition requires continuation; otherwise it commits "safe".Compaction.Ended similarly commits "continue" before the next provider turn."ready" | "unknown" | "continue"; execution-only "safe" is cleared without recovery."safe".msg_recovery_continue_${executionID}.execution_id, have unique continuation_message_id, store phase, wake_pending, and nullable recovery_error.SessionEvent.Prompted projection settles the exact recovery wake by matching both session_id and continuation_message_id, making projection replay safe.Step.Recovered.step-finish halts continuation rather than converting the decision into model-facing tool output.SessionEvent.Step.Interrupted; interruption must clear the exact active claim so later recovery cannot resume it.SessionV2.prompt(...) durably admits one session_input row before advisory SessionExecution.wake(sessionID).resume:false is admit-only and must leave wake_pending=false.20260915193000_session-recovery-fencing.ts to transform the earlier table forms into the final schema.sdk-next composes Client, Core, and Server.SessionExecution remains process-global and Session-ID-based. Local implementation owns the process-local coordinator and resolves placement only when a drain begins.SessionRunner, model resolution, tools, permissions, and filesystem remain Location-scoped.llm.stream(request) per provider turn; reload projected history before continuation. Do not bridge through legacy SessionPrompt.loop(...).export namespace; use flat exports and self-reexports.src/session/ must not add barrel index.ts files.Effect.gen, Effect.fn, Effect.fnUntraced, Effect.callback, Effect.void, DateTime.nowAsDate, Effect services, Effect.cached, and scoped background fibers.Effect.fork or Effect.forkDaemon; use Effect.forkIn(scope).effect-smol source, not v2/v3 memory.try/catch, any, unnecessary destructuring/reassignment/else, premature helpers, and obvious comments.snake_case directly.packages/core.bun typecheck/package tsgo --noEmit, never direct tsc.globalThis.* unless unavoidable; tests should exercise actual implementation and real failure windows.dev; use dev or origin/dev for diffs.type(scope): summary, with type among feat, fix, docs, chore, refactor, test.packages/core/src/session/execution/claim.ts:25-66
session_id, execution id, owner_id, and expires_at > now.update() renews to now + SESSION_EXECUTION_LEASE_MS.clear() deletes only a still-live matching claim.SessionExecutionClaim.Lost if no row matches.transaction() starts an immediate DB transaction, renews first, then performs the supplied Effect.packages/core/src/session/execution/local.ts:23-99
ownerID and per-drain random executionID."ready" row with expires_at = now + 30_000 using onConflictDoNothing().wake_pending=true and recovery_error IS NULL, ordered by time_created, then execution_id.input.run(...)."unknown" or "continue".interrupt(sessionID) clears the exact active claim before coordinator interruption and suppresses only SessionExecutionClaim.Lost.packages/core/src/session/sql.ts:141-225
SessionInputTable: primary-key id, session_id, JSON prompt, delivery, admitted/promoted sequence, wake_pending DEFAULT false, creation time, and pending-wake index.SessionRecoveryTable: execution_id primary key; nullable assistant_message_id; unique continuation_message_id; phase "ready" | "unknown" | "continue"; wake_pending DEFAULT true; nullable recovery_error.SessionExecutionTable: primary-key id; unique session_id; owner; nullable assistant ID; phase "ready" | "safe" | "unknown" | "continue" with SQL check; creation/expiry; nullable recovery error.SESSION_EXECUTION_LEASE_MS = 30_000.packages/core/src/session/recovery-id.ts
message(executionID, assistantMessageID?) returns the supplied assistant ID or msg_recovery_${executionID}.continuation(executionID) returns msg_recovery_continue_${executionID}.packages/core/src/session/recovery.ts
BATCH_SIZE = 100."ready", "safe", "unknown", and "continue".Invalid execution phase: ${String(claim.phase)}."safe" claims and claims superseded by a newer assistant are cleared without recovery.SessionEvent.Step.Recovered; commit conditionally deletes the unchanged claim.wake_pending=true and recovery_error IS NULL.Invalid recovery continuation identityInvalid recovery continuation inputInvalid recovery projection identitysession_input rows with wake_pending=true.10 seconds in a scoped fiber; top-level failures log Failed to recover Sessions (recovery.ts:286-298).packages/core/src/session/input.ts:43-122
admit() checks existing-row equivalence before requesting wake.requestWake() updates only matching unpromoted input.SessionInput.LifecycleConflict.packages/core/src/session/input.ts:159-229
projectPrompted() atomically assigns promoted_seq, clears input wake_pending, supports exact replay, and calls settleRecoveryWake().settleRecoveryWake() clears only the exact recovery row matching both session_id and continuation_message_id.packages/core/src/session/input.ts:277-380
admitted_seq.promoteExact() requires exact message ID, Session, unpromoted state, and queue delivery; otherwise dies with Pending recovery input not found: ${messageID}.packages/core/src/session/projector.ts:357-448
Prompted projects through SessionInput.projectPrompted() before common event projection.PromptAdmitted projects through SessionInput.projectAdmitted().Step.Recovered:
"continue";Recovery target is not the latest assistant: ...Recovery target is not an assistant: ...Step.Started, Step.Ended, Step.Failed, Step.Interrupted, and Compaction.Ended route through common projection.SessionEvent.Retried remains commented out around line 460.packages/core/src/session/runner/llm.ts
"continue".{ phase: "ready", assistant_message_id: null }.SessionInput.promoteExact(...).{ phase: "unknown", assistant_message_id: null }.terminalCommit can set phase "safe" (llm.ts:285).Step.Ended commits phase: needsContinuation ? "continue" : "safe" (llm.ts:426).publisher.interruptAssistant("Tool execution declined").packages/core/src/session/runner/publish-llm-event.ts
step-finish flushes fragments, makes assistant inactive, rejects duplicate settlement, and stores finish/tokens (:441-452 in one inspection, :421-468 in latest layout).failAssistant() publishes Step.Failed through terminalCommit.interruptAssistant() publishes Step.Interrupted through interruptedCommit (:220-256).failUnsettledTools() marks matching unsettled tools failed before publishing.Tool input name changed for ${event.id}: ${tool.name} -> ${event.name}Tool call name changed for ${event.id}: ${tool.name} -> ${event.name}Duplicate tool call: ${event.id}Duplicate tool result: ${event.id}Duplicate step finishpackages/core/src/session/message-updater.ts:251-297
"continue" recovery performs no assistant error mutation."unknown" uses Provider Step outcome unknown after server restart.Session execution interrupted by server restart.packages/schema/src/session-event.ts:207-217
Step.Recovered event type is "session.next.step.recovered"."ready" | "unknown" | "continue"; "safe" is intentionally execution-table-only.packages/core/src/database/migration/20260914170650_session-recovery.ts
(session_id, assistant_message_id).packages/core/src/database/migration/20260914214636_session-execution.ts
execution_id, and indexes.packages/core/src/database/migration/20260914222526_session-execution-phase.ts
packages/core/src/database/migration/20260915193000_session-recovery-fencing.ts:4-53
session_input.wake_pending integer DEFAULT false NOT NULL.session_execution and session_recovery forms.expires_at, recovery_error, PK, session FK, and phase check for ready/safe/unknown/continue.execution_id as PK; nullable assistant; required phase; wake_pending DEFAULT true; nullable recovery_error.session_execution_session_idxsession_execution_owner_idxsession_input_wake_pending_promoted_time_created_id_idxsession_recovery_continuation_message_idxpackages/core/src/database/migration.gen.ts:36-47
20260914170650_session-recovery.packages/core/schema.jsonpackages/core/src/database/schema.gen.ts"7" / SQLite.packages/core/script/migration.ts --check succeeded at 20:03:
No schema changes, nothing to migrate./tmp/opencode-core-migration-check-kktghk/full/20260915200156_schema/migration.sql.packages/core/test/database-migration.test.ts
ses_existing, msg_existing, and msg_input.wake_pending defaults false;"invalid" fails.packages/core/test/session-projector.test.ts
BATCH_SIZE + 1 poison rows before later valid work.SessionRecovery.BATCH_SIZE + 1 poison rows and verifies bounded progress on a later scan.packages/core/test/session-prompt.test.ts:293-404
resume:true leaves original wake_pending:false, makes no advisory wake, and remains unwoken after SessionRecovery.recover().packages/core/test/session-runner.test.ts:1511-1560
Compaction.Ended commits phase "continue", expires claim, runs recovery, and verifies the recovery model receives "continue" while preserving compacted context.packages/core/test/session-runner.test.ts:1942-2000
Step.Ended commits "continue", expires claim, recovers, verifies tool ran exactly once and recovered request contains ["Recover settled tool continuation", "continue"].packages/core/test/session-runner.test.ts:3235-3288
step-finish produces interruption-only failure, exactly one provider request, Step.Interrupted, empty execution table, no later recovery row, and no extra provider request.packages/core/test/session-runner.test.ts:3340-3394
packages/core/test/session-execution-local.test.ts
SessionProjector > atomically reconciles one abandoned execution into one continuationSessionInput.LifecycleConflictmsg_recovery_continue_executionpackages/core/src/session/input.ts:141SessionInput.projectAdmitted in packages/core/src/session/projector.ts:414SessionMessageTable.expect() callstsgo --noEmit succeeded at 19:57.tsgo --noEmit succeeded at 19:59.At 16:52, the earlier dirty worktree had seven substantive findings:
Step.Ended could lose required continuation.
"continue" phase and real crash-window test."continue" phase and real crash-window test.settleRecoveryWake() during Prompted projection."unknown" claim that recovery resumed.
Step.Interrupted/exact claim cancellation and post-recovery test.BATCH_SIZE + 1 progress test.Effect.repeat, schedules, and scoped background-fiber usage matched inspected effect-smol APIs.20260915193000_session-recovery-fencing.ts.SessionInput.LifecycleConflict.tsgo --noEmit runs.