fix(loop): re-register with mesh after skill reload for dashboard refresh#540
Open
fix(loop): re-register with mesh after skill reload for dashboard refresh#540
Conversation
…resh After an agent hot-reloads skills via `reload_skills`, the dashboard didn't show new tools until a full page navigation because no `agent_state`/`registered` WebSocket event was emitted. The root cause was that `_maybe_reload_skills` called `self.skills.reload()` but never re-registered with the mesh. Make `_maybe_reload_skills` async and add a `mesh_client.register()` call after reload so the mesh emits the event the dashboard already handles. Registration failure is caught and logged as a warning to avoid breaking the tool execution flow.
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.
Summary
reload_skills, the dashboard didn't update the capabilities panel until a full page navigation. The root cause:_maybe_reload_skillsinloop.pycalledself.skills.reload()but never re-registered with the mesh, so noagent_state/registeredWebSocket event reached the dashboard._maybe_reload_skillsasync and added amesh_client.register()call after reload. The dashboard already handlesagent_state/registeredevents (app.js:1103), so no dashboard changes were needed.Test plan
tests/test_loop.py— 137 tests pass (includestest_skills_reload_rebuilds_system_prompt)tests/test_chat.py— 54 tests passtests/test_builtins.py— 91 tests passtests/test_skills.py— 93 tests pass (skill reload mechanics)tests/test_chat_workspace.py— 19 tests pass