Skip to content

fix(loop): re-register with mesh after skill reload for dashboard refresh#540

Open
bicced wants to merge 1 commit intomainfrom
fix/skill-reload-dashboard-refresh
Open

fix(loop): re-register with mesh after skill reload for dashboard refresh#540
bicced wants to merge 1 commit intomainfrom
fix/skill-reload-dashboard-refresh

Conversation

@bicced
Copy link
Copy Markdown
Contributor

@bicced bicced commented Mar 24, 2026

Summary

  • After an agent hot-reloads skills via reload_skills, the dashboard didn't update the capabilities panel until a full page navigation. The root cause: _maybe_reload_skills in loop.py called self.skills.reload() but never re-registered with the mesh, so no agent_state/registered WebSocket event reached the dashboard.
  • Made _maybe_reload_skills async and added a mesh_client.register() call after reload. The dashboard already handles agent_state/registered events (app.js:1103), so no dashboard changes were needed.
  • Registration failure is caught and logged as a warning to avoid breaking the tool execution flow.

Test plan

  • tests/test_loop.py — 137 tests pass (includes test_skills_reload_rebuilds_system_prompt)
  • tests/test_chat.py — 54 tests pass
  • tests/test_builtins.py — 91 tests pass
  • tests/test_skills.py — 93 tests pass (skill reload mechanics)
  • tests/test_chat_workspace.py — 19 tests pass
  • All 394 tests across the 5 files pass with no regressions

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant