{"record":{"id":"1b7f829ae6a10b67","repo":"NousResearch/hermes-agent","slug":"adopt-failed","errorCode":null,"errorMessage":"adopt failed","messagePattern":"adopt failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/desktop/src/store/pet-generate.ts","lineNumber":621,"sourceCode":"    let adoptSlug = preview.slug\n\n    if (finalName && finalName !== preview.displayName) {\n      const renamed = await request<{ ok: boolean; slug: string }>('pet.rename', {\n        slug: preview.slug,\n        name: finalName\n      }).catch(() => null)\n\n      if (renamed?.slug) {\n        adoptSlug = renamed.slug\n      }\n    }\n\n    const result = await request<{ ok: boolean; slug: string; displayName: string }>('pet.select', {\n      slug: adoptSlug\n    })\n\n    if (!result?.ok) {\n      throw new Error('adopt failed')\n    }\n\n    // pet.select already set the active mascot (disk + config). Reflect it\n    // locally — no remote petdex manifest fetch — and close immediately.\n    resetPetGen()\n    void applyAdoptedPet(request, result.slug, result.displayName)\n\n    return { ok: true, slug: result.slug, displayName: result.displayName }\n  } catch (e) {\n    $petGenStatus.set('preview')\n    $petGenError.set(e instanceof Error ? e.message : 'Could not adopt the pet.')\n\n    return { ok: false }\n  }\n}\n\n/**\n * Throw away the previewed pet (`pet.remove`) and return to the draft picker so","sourceCodeStart":603,"sourceCodeEnd":639,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/apps/desktop/src/store/pet-generate.ts#L603-L639","documentation":"Error \"adopt failed\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at apps/desktop/src/store/pet-generate.ts:621 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the adopt action; the store write failed.","Verify the generated preview still exists and the pet store directory is writable.","Re-hatch and adopt again if the intermediate files were cleaned up."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}