Critical bug: claude-bot only ignored its OWN messages and text explicitly
addressed to @hermes — it did not ignore Hermes's own replies appearing in
the room. A single @hermes mention cascaded into claude-bot replying to
Hermes's thread messages ('Hermes says: ...'), which could itself cascade
further. Fixed with an OTHER_AGENT_USER_IDS allowlist of sender IDs to
always ignore, not just a text-prefix check.
Also point Hermes's model provider at the local litellm gateway
(OPENAI_BASE_URL/OPENAI_API_KEY) instead of OpenRouter directly, matching
claude-agent's own chat path — one place to hold the OpenRouter credential.
This does NOT grant Hermes access to the Claude subscription; that's an
Anthropic-side restriction unrelated to which proxy sits in front of it,
already proven earlier in this session.
Separately (not a code fix): the 'Billing or credits exhausted: HTTP 402'
error Hermes hit is real — the OpenRouter account currently has 0 credits.
Code Review: Fix cross-agent reply cascade, route Hermes through LiteLLM
Correctness bugs:
docker-compose.yml:64 — hermes now points OPENAI_BASE_URL at http://litellm:4000/v1 but has no depends_on: litellm, unlike claude-agent which does. On a full stack restart (e.g. GitOps redeploy), Hermes could start before LiteLLM is listening and fail its first API call.
agent/src/matrixBot.js:65 — OTHER_AGENT_USER_IDS was introduced as a generic mechanism to ignore other agents' own messages, but the separate "don't reply if message is addressed to another agent" guard is still hardcoded to the literal "@hermes". If another agent gets added later via OTHER_AGENT_USER_IDS, claude-bot will correctly ignore that agent's messages but will still incorrectly answer human messages addressed to it (e.g. "@assistant2 ...").
Minor:
agent/src/matrixBot.js:80 — leftover debug console.log on every successful chat reply; not a bug but noisy in production logs.
Want me to fix these (add the depends_on, generalize the @hermes check, drop the stray log)?
## Code Review: Fix cross-agent reply cascade, route Hermes through LiteLLM
**Correctness bugs:**
1. **`docker-compose.yml:64`** — `hermes` now points `OPENAI_BASE_URL` at `http://litellm:4000/v1` but has no `depends_on: litellm`, unlike `claude-agent` which does. On a full stack restart (e.g. GitOps redeploy), Hermes could start before LiteLLM is listening and fail its first API call.
2. **`agent/src/matrixBot.js:65`** — `OTHER_AGENT_USER_IDS` was introduced as a generic mechanism to ignore other agents' own messages, but the separate "don't reply if message is addressed to another agent" guard is still hardcoded to the literal `"@hermes"`. If another agent gets added later via `OTHER_AGENT_USER_IDS`, claude-bot will correctly ignore that agent's messages but will still incorrectly answer human messages addressed *to* it (e.g. `"@assistant2 ..."`).
**Minor:**
3. **`agent/src/matrixBot.js:80`** — leftover debug `console.log` on every successful chat reply; not a bug but noisy in production logs.
Want me to fix these (add the `depends_on`, generalize the `@hermes` check, drop the stray log)?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Details in the commit message.
Critical bug: claude-bot only ignored its OWN messages and text explicitly addressed to @hermes — it did not ignore Hermes's own replies appearing in the room. A single @hermes mention cascaded into claude-bot replying to Hermes's thread messages ('Hermes says: ...'), which could itself cascade further. Fixed with an OTHER_AGENT_USER_IDS allowlist of sender IDs to always ignore, not just a text-prefix check. Also point Hermes's model provider at the local litellm gateway (OPENAI_BASE_URL/OPENAI_API_KEY) instead of OpenRouter directly, matching claude-agent's own chat path — one place to hold the OpenRouter credential. This does NOT grant Hermes access to the Claude subscription; that's an Anthropic-side restriction unrelated to which proxy sits in front of it, already proven earlier in this session. Separately (not a code fix): the 'Billing or credits exhausted: HTTP 402' error Hermes hit is real — the OpenRouter account currently has 0 credits.Code Review: Fix cross-agent reply cascade, route Hermes through LiteLLM
Correctness bugs:
docker-compose.yml:64—hermesnow pointsOPENAI_BASE_URLathttp://litellm:4000/v1but has nodepends_on: litellm, unlikeclaude-agentwhich does. On a full stack restart (e.g. GitOps redeploy), Hermes could start before LiteLLM is listening and fail its first API call.agent/src/matrixBot.js:65—OTHER_AGENT_USER_IDSwas introduced as a generic mechanism to ignore other agents' own messages, but the separate "don't reply if message is addressed to another agent" guard is still hardcoded to the literal"@hermes". If another agent gets added later viaOTHER_AGENT_USER_IDS, claude-bot will correctly ignore that agent's messages but will still incorrectly answer human messages addressed to it (e.g."@assistant2 ...").Minor:
agent/src/matrixBot.js:80— leftover debugconsole.logon every successful chat reply; not a bug but noisy in production logs.Want me to fix these (add the
depends_on, generalize the@hermescheck, drop the stray log)?View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.