Skip to content

Bug: Honcho SDK double-prefixing causes 404 errors for self-hosted instances #20688

@MwC-Trexx

Description

@MwC-Trexx

Bug: Honcho SDK double-prefixing causes 404 errors for self-hosted instances

Problem Description

When using Hermes Agent with a self-hosted Honcho instance, the SDK incorrectly concatenates URL components, resulting in double-prefixing of /v3 and 404 errors when initializing peers and sessions. This causes recurring timeout/delay warnings in logs.

Root Cause

The Honcho SDK's route builders (e.g., routes.workspaces()) return paths that already include the version prefix (/v3/workspaces). However, when users configure a self-hosted instance with base_url = "http://localhost:38000/v3", the SDK concatenates them:

base_url + routes.workspaces() = "/v3/v3/workspaces" (incorrect!)

This results in 404 Not Found errors during peer/session initialization.

Expected Behavior

For self-hosted Honcho instances, the SDK should:

  1. Use base_url as-is for domain+port (e.g., http://localhost:38000)
  2. Append route paths that include versioning (e.g., /v3/workspaces)
  3. Result in correct URLs like http://localhost:38000/v3/workspaces

Actual Behavior

The SDK produces malformed URLs with double /v3 prefixes:

  • POST /v3/v3/workspaces → 404
  • GET /v3/v3/workspaces/hermes/peers/hermes → 404

Environment

  • Hermes Agent version: Latest (tested with current main branch)
  • Honcho SDK version: 2.1.1
  • Honcho deployment: Self-hosted via Docker Compose
  • Base URL configuration: http://localhost:38000/v3

Proposed Fix

In plugins/memory/honcho/client.py, strip the /v3 prefix from resolved_base_url for local/self-hosted instances before passing to the Honcho constructor:

# Strip /v3 prefix from base_url for local instances to avoid double-prefixing
if _is_local and resolved_base_url:
    resolved_base_url = resolved_base_url.replace("/v3", "", 1).rstrip("/")

This ensures base_url is domain-only (http://localhost:38000) while routes handle versioning internally.

Impact

  • Severity: High - Blocks Honcho memory functionality entirely for self-hosted users
  • Scope: All users running Hermes Agent with local/self-hosted Honcho instances
  • Workaround: None currently available without code patching

References

  • Issue affects: ~/.hermes/hermes-agent/plugins/memory/honcho/client.py
  • Related code: Honcho SDK route definitions in honcho.http.routes

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/pluginsPlugin system and bundled pluginstype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions