openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Skills: retract uninstalled skills from the mid-session catalogue (symmetric to install announcement)

Open sanil-23 opened this issue 5 months ago • 1 comments

Follow-up tracked from review of #3722.

Context

#3722 added a mid-session skill refresh: installing a skill mid-conversation surfaces it to the model via a one-shot [skills update] user-turn announcement (the system-prompt ## Installed Skills block is frozen at turn 1 for KV-cache stability, so the announcement is the surfacing mechanism — mirroring the integration/MCP pattern).

Gap

The path is asymmetric: install is announced, but uninstall is not retracted. After a mid-session uninstall:

  • the frozen ## Installed Skills block still advertises the removed skill, and
  • run_skill against it fails at the worker (skill_executor can't load a SKILL.md that's gone).

refresh_workflows already detects removals (the id-set diff shrinks); it just doesn't queue a retraction note. This matches the current integration/MCP announcements, which also only announce additions — so a shared fix could cover all three.

Proposed

Queue a one-shot [skills update] removed: <id> note on the next user turn when refresh_workflows sees an id drop (parallel to pending_skill_announcement for adds), telling the model the skill is no longer available and not to call run_skill against it. Consider generalizing to the integration/MCP announcement helpers.

Acceptance

  • Uninstalling a skill mid-session produces a removal note on the next user turn.
  • A unit test asserts the removal note fires (mirror of the install-announcement test).

sanil-23 avatar Jun 17 '26 07:06 sanil-23

Picking this one up. Going to mirror the install-side announcement so uninstalled skills get retracted from the live catalogue on the next turn too.

obchain avatar Jun 17 '26 13:06 obchain