fix(tui): /skills browse no longer blocks the whole gateway#13661
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents the TUI gateway’s JSON-RPC dispatcher from stalling during /skills browse (and other slow skills.manage actions) by routing skills.manage through the existing long-handler thread pool, keeping other RPCs responsive.
Changes:
- Add
skills.manageto_LONG_HANDLERSso it is dispatched via the thread pool. - Reformat
_LONG_HANDLERSdeclaration to a multilinefrozensetliteral for readability.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
`/skills browse` is documented to scan 6 sources and take ~15s, but the gateway dispatched `skills.manage` on the main RPC thread. While it ran, every other inbound RPC — completions, new slash commands, even `approval.respond` — blocked until the HTTP fetches finished, making the whole TUI feel frozen. Reported during TUI v2 retest: "/skills browse blocks everything else". `_LONG_HANDLERS` already exists precisely for this pattern (slash.exec, shell.exec, session.resume, etc. run on `_pool`). Add `skills.manage` to that set so browse/search/install run off the dispatcher; the fast `list` / `inspect` actions pay a negligible thread-pool hop.
506f3b0 to
48f8244
Compare
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…-manage-async fix(tui): /skills browse no longer blocks the whole gateway
aj-nt
pushed a commit
to aj-nt/hermes-agent
that referenced
this pull request
May 1, 2026
…-manage-async fix(tui): /skills browse no longer blocks the whole gateway
Luminet2023
pushed a commit
to Luminet2023/hermes-agent
that referenced
this pull request
May 1, 2026
…-manage-async fix(tui): /skills browse no longer blocks the whole gateway
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…-manage-async fix(tui): /skills browse no longer blocks the whole gateway
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…-manage-async fix(tui): /skills browse no longer blocks the whole gateway
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…-manage-async fix(tui): /skills browse no longer blocks the whole gateway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From TUI v2 retest: "when /skills browse happens i cant do anything. /skills browse blocks everything else."
Root cause
`skills.manage` action=`browse` / `search` / `install` calls `hermes_cli.skills_hub` which fetches 6 remote sources and can take ~15s. The handler ran on the main RPC dispatcher thread in `tui_gateway/server.py`, so while the network calls were in flight every other inbound RPC — completions, new slash commands, `approval.respond`, `session.interrupt` — sat queued in stdin. The TUI looked frozen.
The gateway already has a thread pool (`_pool`) for exactly this pattern, gated by the `_LONG_HANDLERS` set (covering `slash.exec`, `shell.exec`, `session.resume`, `session.branch`, `cli.exec`).
Fix
Add `skills.manage` to `_LONG_HANDLERS`. One-line set extension.
The fast actions (`list`, `inspect`) pay a negligible thread-pool hop; the slow ones stop blocking the main loop.
Test plan