Routing /learn slash command through dispatch layers

NousResearch/hermes-agent · cluster 51829

Data as of

Nothing open on GitHub. Fix merged in #52232. Check it covers your case.

The short answer

0open issues
0open PRs
6items grouped
Known?
Yes. 6 related items grouped here, 1 issue already closed.
Fix event
A fix was merged to main in PR #52232. Check it covers your case. No release data is tracked.
Tracker
The maintainers' tracker marks this resolved, deciding PR #52232. That is separate from the fix event.
Still open
Nothing open on GitHub.

These issues and PRs concern a /learn slash command feature and the bugs around correctly routing it through command dispatch in TUI and Desktop GUI so that it actually triggers the LLM. Multiple fixes address the same underlying dispatch/routing gap across different interfaces.

Open issues0

No open issues.

Open PRs0

No open pull requests.

Fixes on record

Merged to main. A stamp counts the issues a fix is linked to.

  • #52232 fix(tui): route /learn through command.dispatch so the prompt fires (#51829)

    merged to main

    files: tests/tui_gateway/test_protocol.py, tui_gateway/server.py

    Show the diff
    • tests/tui_gateway/test_protocol.py
      @@ -1214,7 +1214,7 @@ def handler(arg):
           assert worker.calls == []
       
       
      [redacted:email]("cmd", ["retry", "queue hello", "q hello", "steer fix the test", "plan"])
      [redacted:email]("cmd", ["retry", "queue hello", "q hello", "steer fix the test", "plan", "learn create a skill from https://example.com/docs"])
       def test_slash_exec_routes_pending_input_commands_to_dispatch(server, cmd):
           """slash.exec must route _pending_input commands to command.dispatch
           internally instead of returning the old 4018 "use command.dispatch"
      @@ -1288,6 +1288,38 @@ def test_command_dispatch_queue_requires_arg(server):
           assert resp["error"]["code"] == 4004
       
       
      +def test_command_dispatch_learn_sends_built_prompt(server):
      +    """command.dispatch /learn returns {type: 'send', message: <built prompt>}
      +    so the TUI fires a real agent turn (#51829). The CLI handler queues onto
      +    _pending_input — a queue the TUI slash worker has no reader for — so the
      +    prompt was silently dropped after the ack. Routing through command.dispatch
      +    injects the standards-guided prompt as a normal turn instead.
      +    """
      +    from agent.learn_prompt import build_learn_prompt
      +
      +    sid = "test-session"
      +    server._sessions[sid] = {"session_key": sid}
      +
      +    arg = "create a skill from https://example.com/docs"
      +    resp = server.handle_request({
      +        "id": "r-learn",
      +        "method": "command.dispatch",
      +        "params": {"name": "learn", "arg": arg, "session_id": sid},
      +    })
      +
      +    assert "error" not in resp
      +    result = resp["result"]
      +    assert result["type"] == "send"
      +    assert result["message"] == build_learn_prompt(arg)
      +
      +
      +def test_pending_input_commands_includes_learn(server):
      +    """Guard: _PENDING_INPUT_COMMANDS must list 'learn' — without it slash.exec
      +    routes /learn to the slash worker, which only prints the ack and drops the
      +    prompt onto the dead _pending_input queue (#51829)."""
      +    assert "learn" in server._PENDING_INPUT_COMMANDS
      +
      +
       def test_skills_manage_search_uses_tools_hub_sources(server):
           result = type("Result", (), {
               "description": "Build better terminal demos",
    • tui_gateway/server.py
      @@ -9885,6 +9885,7 @@ def _(rid, params: dict) -> dict:
               "plan",
               "goal",
               "undo",
      +        "learn",
           }
       )
       

4 PRs closed without merging

From the close comments: done elsewhere 2 · duplicate 1 · superseded by another PR 1

  • #51840 fix(tui): add /learn to _PENDING_INPUT_COMMANDS so Desktop GUI submits the learn prompt · superseded by another PR → #51638
  • #52052 fix(desktop): route /learn into the agent turn · duplicate → #51638, #51840, #51829
  • #52123 fix(tui): route /learn through command.dispatch in Desktop GUI · done elsewhere → #51638
  • #52817 fix(tui): route /learn through command.dispatch in TUI gateway · done elsewhere → #51638, #52232
Closed issues · 1
  • Closed#51829/learn slash command shows ack message but does not trigger LLM in Desktop GUI
How this cluster was grouped
  • Link evidence (structural links throughout): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
  • Pairwise link density 0.33: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. 1.00 means 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

At a glance

Merged PRs
#52232
Closed issues
1
Attempts
4 PRs closed without merging
Fix link checked
25 Jun 2026

For your agent

The same facts, typed.