Summary
removeUserPrefix: true is documented/intended to make the user peer ID match the sibling claude-honcho plugin's peer ID (per the comment in src/index.ts right above deriveUserPeerId), but it doesn't actually achieve parity, because normalizeId unconditionally lowercases the value:
const normalizeId = (value: string) =>
trimHyphenEdges(value.toLowerCase().replace(/[^a-z0-9_-]+/g, "-")) || "default"
const deriveUserPeerId = (settings: Pick<HonchoSettings, "peerName" | "removeUserPrefix">) => {
const name = settings.peerName || currentUserName()
// removeUserPrefix=true drops the `user-` prefix to match the sibling
// claude-honcho / hermes-honcho plugins; false (the legacy-safe default)
// keeps the historical `user-<name>` peer and its accumulated memory.
return settings.removeUserPrefix ? normalizeId(name) : normalizeId(`user:${name}`)
}
claude-honcho preserves the exact case of peerName as the peer ID (e.g. "Stefano"). Since Honcho peer IDs are case-sensitive, opencode-honcho with removeUserPrefix: true and peerName: "Stefano" still produces "stefano" ,a brand new, empty peer, disjoint from the one claude-honcho has been writing to.
Repro
- Use
claude-honcho with peerName: "Stefano" for a while, it creates/writes to Honcho peer "Stefano" in some workspace.
- Install
opencode-honcho, set the same peerName: "Stefano", same workspace, and hosts.opencode.removeUserPrefix: true.
- Query Honcho (
GET /v3/workspaces/{workspace}/peers/list) , instead of one shared peer "Stefano", there are two: "Stefano" (from claude-honcho) and "stefano" (from opencode-honcho, all lowercase).
- Any
honcho_chat/dialectic query in OpenCode comes back with "no memory yet" even though the Claude Code peer has substantial history, because it's reading a different peer.
Expected
With removeUserPrefix: true, the resulting peer ID should exactly match what claude-honcho would produce for the same peerName, so the two hosts genuinely share state as the shared ~/.honcho/config.json file (and the docs) imply. Given claude-honcho doesn't lowercase, deriveUserPeerId shouldn't run peerName through normalizeId's .toLowerCase() when removeUserPrefix is true (or at minimum, this case-folding behavior should be documented, since it silently breaks the "shared config across hosts" promise).
Suggested fix
Something like:
const deriveUserPeerId = (settings: Pick<HonchoSettings, "peerName" | "removeUserPrefix">) => {
const name = settings.peerName || currentUserName()
if (settings.removeUserPrefix) {
// Preserve exact casing to match claude-honcho's peer id derivation.
return trimHyphenEdges(name.replace(/[^a-zA-Z0-9_-]+/g, "-")) || "default"
}
return normalizeId(`user:${name}`)
}
(or expose an explicit preserveCase / raw peerId override in hosts.opencode config as an escape hatch.)
Environment
@honcho-ai/opencode-honcho: latest (resolved 0.1.3 at time of filing)
- opencode: 1.18.9
Summary
removeUserPrefix: trueis documented/intended to make the user peer ID match the siblingclaude-honchoplugin's peer ID (per the comment insrc/index.tsright abovederiveUserPeerId), but it doesn't actually achieve parity, becausenormalizeIdunconditionally lowercases the value:claude-honchopreserves the exact case ofpeerNameas the peer ID (e.g."Stefano"). Since Honcho peer IDs are case-sensitive,opencode-honchowithremoveUserPrefix: trueandpeerName: "Stefano"still produces"stefano",a brand new, empty peer, disjoint from the oneclaude-honchohas been writing to.Repro
claude-honchowithpeerName: "Stefano"for a while, it creates/writes to Honcho peer"Stefano"in some workspace.opencode-honcho, set the samepeerName: "Stefano", sameworkspace, andhosts.opencode.removeUserPrefix: true.GET /v3/workspaces/{workspace}/peers/list) , instead of one shared peer"Stefano", there are two:"Stefano"(from claude-honcho) and"stefano"(from opencode-honcho, all lowercase).honcho_chat/dialectic query in OpenCode comes back with "no memory yet" even though the Claude Code peer has substantial history, because it's reading a different peer.Expected
With
removeUserPrefix: true, the resulting peer ID should exactly match whatclaude-honchowould produce for the samepeerName, so the two hosts genuinely share state as the shared~/.honcho/config.jsonfile (and the docs) imply. Givenclaude-honchodoesn't lowercase,deriveUserPeerIdshouldn't runpeerNamethroughnormalizeId's.toLowerCase()whenremoveUserPrefixis true (or at minimum, this case-folding behavior should be documented, since it silently breaks the "shared config across hosts" promise).Suggested fix
Something like:
(or expose an explicit
preserveCase/ rawpeerIdoverride inhosts.opencodeconfig as an escape hatch.)Environment
@honcho-ai/opencode-honcho: latest (resolved0.1.3at time of filing)