'/compress' command not routed correctly in Desktop TUI
NousResearch/hermes-agent · cluster 44456 · apps/desktop
Data as of
Nothing open on GitHub. Fix merged in #60921. Check it covers your case.
The short answer
- Known?
- Yes. 13 related items grouped here, 4 issues already closed.
- Fix event
- A fix was merged to main in PR #60921. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
partially resolved, deciding PRs #60921, #68229. That is separate from the fix event. - Still open
- Nothing open on GitHub.
Multiple bug reports and fix attempts address the same issue: the /compress command in the Desktop/TUI interface fails because command.dispatch does not route it to the correct handler, instead returning a 'not a quick/plugin/skill command' error. The members represent the bug and various proposed or competing fixes for this routing gap.
Open issues0
Open PRs0
Fixes on record
-
#60921 fix(desktop): register /compress in TUI gateway command.dispatch (salvage #60644)
files:
tui_gateway/server.pyShow the diff
-
tui_gateway/server.py@@ -11428,6 +11428,8 @@ def _(rid, params: dict) -> dict: "moa", "undo", "learn", + "compress", + "compact", } ) @@ -12013,6 +12015,72 @@ def _(rid, params: dict) -> dict: }, ) + if name in {"compress", "compact"}: + if not session: + return _err(rid, 4001, "no active session to compress") + if session.get("running"): + return _err( + rid, 4009, "session busy — /interrupt the current turn before /compress" + ) + sid = params.get("session_id", "") + try: + from agent.manual_compression_feedback import summarize_manual_compression + from agent.model_metadata import estimate_request_tokens_rough + + with session["history_lock"]: + before_messages = list(session.get("history", [])) + history_version = int(session.get("history_version", 0)) + before_count = len(before_messages) + _agent = session["agent"] + _sys_prompt = getattr(_agent, "_cached_system_prompt", "") or "" + _tools = getattr(_agent, "tools", None) or None + before_tokens = ( + estimate_request_tokens_rough( + before_messages, system_prompt=_sys_prompt, tools=_tools + ) + if before_count + else 0 + ) + removed, usage = _compress_session_history( + session, + arg.strip() or None, + approx_tokens=[redacted:secret-assignment] + before_messages=before_messages, + history_version=history_version, + ) + with session["history_lock"]: + after_messages = list(session.get("history", [])) + after_count = len(after_messages) + _sys_prompt_after = ( + getattr(_agent, "_cached_system_prompt", "") or _sys_prompt + ) + _tools_after = getattr(_agent, "tools", None) or _tools + after_tokens = ( + estimate_request_tokens_rough( + after_messages, + system_prompt=_sys_prompt_after, + tools=_tools_after, + ) + if after_count + else 0 + ) + _sync_session_key_after_compress(sid, session) + summary = summarize_manual_compression( + before_messages, after_messages, before_tokens, after_tokens + ) + _emit("session.info", sid, _session_info(session.get("agent"), session)) + return _ok( + rid, + { + "type": "exec", + "output": "\n".join( + filter(None, [summary["headline"], summary["token_line"], summary.get("note")]) + ), + }, + ) + except Exception as exc: + return _err(rid, 5009, f"compress failed: {exc}") + return _err(rid, 4018, f"not a quick/plugin/skill command: {name}")
-
-
#68229 fix(desktop): salvage /compress cluster — session.compress RPC + dedicated RPC routing
files:
apps/desktop/src/app/session/hooks/use-prompt-actions/index.test.tsx,apps/desktop/src/app/session/hooks/use-prompt-actions/index.ts,apps/desktop/src/app/session/hooks/use-prompt-actions/slash.ts,apps/desktop/src/app/session/hooks/use-prompt-actions/utils.test.ts,apps/desktop/src/app/session/hooks/use-prompt-actions/utils.ts,apps/desktop/src/app/settings/toolset-config-panel.test.tsx,apps/desktop/src/app/settings/toolset-config-panel.tsx,apps/desktop/src/app/types.ts,apps/desktop/src/lib/desktop-git.test.ts,apps/desktop/src/lib/desktop-git.ts,apps/desktop/src/lib/desktop-slash-commands.test.ts,apps/desktop/src/lib/desktop-slash-commands.ts,apps/shared/src/json-rpc-gateway.ts,tests/test_tui_gateway_server.py,tests/tui_gateway/test_compute_host_phase1.py,tui_gateway/compute_host.py,tui_gateway/host_supervisor.py,tui_gateway/server.py
7 PRs closed without merging
From the close comments: superseded by another PR 3 · closed without comment 1 · done elsewhere 1 · merged via another change 1 · stale or abandoned 1
-
#44462 fix(desktop): route /compress via session.compress and stop masking slash.exec errors behind "not a quick/plugin/skill command" · stale or abandoned →
#44456 -
#44464 fix(tui-gateway): route /compress through command.dispatch for Desktop/TUI · superseded by another PR →
#44462 -
#44554 fix(tui): route /compress command to session.compress handler (#44456) · superseded by another PR →
#44462,#44456 - #53664 fix(desktop): route /compress through session.rpc (superseded) · closed without comment
-
#60644 fix(desktop): register /compress command in TUI gateway dispatch so Desktop can invoke it · merged via another change →
#60921,#60834,#60603
Closed issues · 4
- Closed#44456[Bug]: Desktop /compress returns "not a quick/plugin/skill command: compress" — TUI command.dispatch doesn't redirect built-ins to slash.exec
- Closed#46556Desktop GUI: /compress command not recognized (routed to quick/plugin/skill handler)
- Closed#60603[Bug]: When using Hermes Desktop, if you want to actively compress the context during a conversation, you can use the '/compress' command, but it will display '/compress·error: not a quick/plugin/skill command: compress'
- Closed#60705Desktop: /compress fails with 'not a quick/plugin/skill command: compress'
How this cluster was grouped
-
Link evidence (
partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text. - Members outside that structural core may belong to a different underlying problem.
-
Pairwise link density
0.14: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.
Pick up a Lab task
Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.
Open the Lab