NousResearch/hermes-agent · error

Could not rename ${slug}

Error message

Could not rename ${slug}

What it means

Error "Could not rename ${slug}" thrown in NousResearch/hermes-agent.

Source

Thrown at apps/desktop/src/store/pet-gallery.ts:484

  const prev = $petGallery.get()?.pets.find(p => p.slug === slug)?.displayName ?? ''

  // Optimistic: paint the new name now (slug reconciles when the RPC returns).
  patchGallery(g => ({
    ...g,
    pets: g.pets.map(p => (p.slug === slug ? { ...p, displayName: trimmed } : p))
  }))
  $petGalleryError.set(null)

  return (async () => {
    try {
      const res = await petRpc<{ ok: boolean; slug: string; displayName: string }>(request, 'pet.rename', {
        slug,
        name: trimmed
      })

      if (!res?.ok) {
        throw new Error(fallback)
      }

      const newSlug = res.slug || slug

      if (newSlug !== slug) {
        thumbCache.delete(slug)
        patchGallery(g => ({
          ...g,
          active: g.active === slug ? newSlug : g.active,
          pets: g.pets
            .filter(p => p.slug !== newSlug || p.slug === slug)
            .map(p => (p.slug === slug ? { ...p, slug: newSlug, displayName: res.displayName || trimmed } : p))
        }))
      }

      return true
    } catch (e) {
      // Roll the optimistic name back so the list reflects on-disk truth.

View on GitHub (pinned to c896c09c42)

Solutions

  1. Choose a new slug that does not collide with an existing pet.
  2. Verify the pet exists and the gallery store is writable, then retry.

When it happens

Trigger: Thrown at apps/desktop/src/store/pet-gallery.ts:484 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14). Data as JSON: /api/errors/3297062bdb5bdede. Report an issue: GitHub.