Skip to content

[Bug]: /compact slash command name collision causes "Duplicate slash command alias" error #57133

Description

@Chongtc

Bug Description

Summary
Three separate components in Hermes Agent all register the /compact slash command, causing a "Duplicate slash command alias: /compact" error at startup when running alongside Claude Code in VS Code.

Affected Version
Latest main as of 2026-07-02 (commit pulled via hermes update — 1357 new commits).

Components Involved
Component File Registration Purpose
Command registry hermes_cli/commands.py:92 /compress with aliases=("compact",) Context compression
ACP adapter acp_adapter/server.py:459,488 "compact" in _SLASH_COMMANDS and _ADVERTISED_COMMANDS IDE command palette
TUI gateway tui_gateway/server.py:11125 ("/compact", "Toggle compact display mode", "TUI") in _TUI_EXTRA Display density toggle
TUI frontend ui-tui/src/app/slash/commands/core.ts:279 name: 'compact' Display density toggle

Three different commands all use the name /compact:

commands.py — /compress has aliases=("compact",), so /compact resolves to context compression (inspired by Claude Code's /compact). This is the canonical registration.

acp_adapter/server.py — advertises a standalone "compact" command to the IDE via ACP. When the ACP host (Claude Code) already has its own /compact, this produces a duplicate registration error.

tui_gateway/server.py + ui-tui/.../core.ts — registers /compact as a TUI display density toggle (on/off/toggle for compact transcript layout). This is an entirely different function from context compression.

When all three are active simultaneously (VS Code + Hermes ACP adapter + TUI), the name collision triggers the error.

Steps to Reproduce

Install Hermes Agent at latest main
Have Claude Code VS Code extension installed
Start Hermes (TUI or desktop app) with ACP adapter enabled
Observe: Duplicate slash command alias: /compact
Suggested Fix
ACP adapter — rename "compact" → "compress" in _SLASH_COMMANDS, _ADVERTISED_COMMANDS, and _cmd_compact method. This matches the CLI canonical name and avoids colliding with Claude Code.

TUI — rename /compact → /density (or similar) since it controls display layout, not context compression. The internal config key (display.tui_compact) can remain unchanged.

Long-term — consider adding duplicate-name validation at command registration time, so collisions surface as clear errors during development rather than runtime failures for users.

Expected Behavior

Expect Hermes Deskstop app can work as per normal

Actual Behavior

The Duplicate slash command alias: /compact keep appearing and not allow to proceed to go app like chat

Affected Component

Tools (terminal, file ops, web, code execution, etc.)

Messaging Platform (if gateway-related)

No response

Debug Report

I already temprorily fixed and no error 

--- hermes dump ---
version:          0.18.0 [30e947e0] (2026-07-02)
os:               Windows 10 AMD64
python:           3.11.15
openai_sdk:       2.24.0
profile:          default
hermes_home:      ~/AppData\Local\hermes
model:            deepseek-v4-flash
provider:         custom
terminal:         local

Operating System

Window 11

Python Version

No response

Hermes Version

V0.18.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

Patch
A working patch is available — the following 3-file change resolves the issue:

acp_adapter/server.py — 6 occurrences: compact → compress
tui_gateway/server.py — 3 occurrences: /compact → /density in _TUI_EXTRA and completion extras
ui-tui/src/app/slash/commands/core.ts — 3 occurrences: compact → density as command name

Proposed Fix (optional)

A working patch is available — the following 3-file change resolves the issue:

acp_adapter/server.py — 6 occurrences: compact → compress
tui_gateway/server.py — 3 occurrences: /compact → /density in _TUI_EXTRA and completion extras
ui-tui/src/app/slash/commands/core.ts — 3 occurrences: compact → density as command name

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsbugcomp/acpAgent Communication Protocol adaptercomp/tuiTerminal UI (ui-tui/ + tui_gateway/)type/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions