NousResearch/hermes-agent
TUI freeze caused by blocking completion RPCs
Cluster 21123 · hermes cli. Data as of
Nothing open on GitHub. Fix merged in #53895 on 28 Jun 2026. Check it covers your case.
The short answer
0open issues
0open PRs
3items grouped
- Known?
- Yes. 3 related items grouped here, 1 issue already closed.
- Fix event
- A fix was merged to main in PR #53895. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
resolved, deciding PR #53895. That is separate from the fix event. - Still open
- Nothing open on GitHub.
A bug where typing '@' in the TUI triggers a completion RPC that blocks the stdio pipe and freezes the interface. The fixes route or skip these RPCs to prevent the freeze.
Open issues0
Open PRs0
Fixes on record
-
#53895 fix(tui): route completion RPCs to the pool so they can't freeze the TUI
files:
tests/tui_gateway/test_protocol.py,tui_gateway/server.pyShow the diff
-
tests/tui_gateway/test_protocol.py@@ -1736,3 +1736,37 @@ def test_dispatch_unknown_long_method_still_goes_inline(server): resp = server.dispatch({"id": "r4", "method": "some.method", "params": {}}) assert resp["result"] == {"ok": True} + + [redacted:email]("completion_method", ["complete.path", "complete.slash"]) +def test_completion_handlers_are_pool_routed(completion_method, server): + """complete.path/complete.slash must run on the pool, never the reader thread. + + Regression for #21123: completion ran inline, so a slow git ls-files / + skill-scan blocked prompt.submit and froze the TUI for the 120s RPC timeout. + """ + assert completion_method in server._LONG_HANDLERS + + [redacted:email]("completion_method", ["complete.path", "complete.slash"]) +def test_slow_completion_does_not_block_fast_handler(completion_method, server): + """A slow completion RPC must not block a concurrent fast handler (#21123).""" + released = threading.Event() + + def slow_completion(rid, params): + released.wait(timeout=5) + return server._ok(rid, {"items": []}) + + server._methods[completion_method] = slow_completion + server._methods["fast.ping"] = lambda rid, params: server._ok(rid, {"pong": True}) + + t0 = time.monotonic() + assert server.dispatch({"id": "slow", "method": completion_method, "params": {}}) is None + + fast_resp = server.dispatch({"id": "fast", "method": "fast.ping", "params": {}}) + fast_elapsed = time.monotonic() - t0 + + assert fast_resp["result"] == {"pong": True} + assert fast_elapsed < 0.5, f"fast handler blocked for {fast_elapsed:.2f}s behind {completion_method}" + + released.set() -
tui_gateway/server.py@@ -178,6 +178,16 @@ def _thread_panic_hook(args): "billing.step_up", "browser.manage", "cli.exec", + # Completion RPCs run inline on the reader thread by default, but both + # can block it for seconds: complete.path spawns `git ls-files` and + # fuzzy-ranks the whole repo (slow on large repos / WSL2 mounts), and + # complete.slash does first-call prompt_toolkit imports + a skill-dir + # scan. While either runs inline, prompt.submit / session.interrupt sit + # unread in the stdin pipe — the TUI appears frozen until the 120s RPC + # timeout fires (#21123). Routing them to the pool keeps the fast path + # responsive; completion is read-only and write_json is lock-guarded. + "complete.path", + "complete.slash", "llm.oneshot", # Pet RPCs hit the network (manifest fetch / spritesheet download) or do # per-frame PNG decode/encode (pet.cells): inline they serialize on the
-
1 PR closed without merging
From the close comments: done elsewhere 1
-
#21142 fix: skip bare @ completion RPC in TUI · done elsewhere →
#21123,#53895
Closed issues · 1
- Closed#21123TUI freezes when typing @ character — complete.path RPC timeout blocks stdio pipe
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.67: 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 LabAt a glance
- Subsystem
- hermes cli
- Merged PRs
- #53895
- Closed issues
- 1
- Attempts
- 1 PR closed without merging
- Fix link checked
- 28 Jun 2026