Newly installed Python skill is unavailable to child kernels of an older session #1925
Closed
pcarielo
started this conversation in
Bug reports
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
prime-agent 0.8.1, Linux, forkserver on (default).
Problem
Install a Python-backed skill while a session is already running. Children of that session fork from a kernel template that predates the install, so the skill arrives pre-imported as a placeholder and the import fails. Verbatim from inside an rlm child:
A fresh root session started afterwards loads the same skill directory natively:
So the skill works or not depending on which kernel asks, and the child has no way to know it got a stale environment. The system prompt still advertises the skill, which makes it worse: the child believes the capability exists and fails at call time instead.
Reproduction
Observed twice: with a real skill we use daily (the placeholder text was <unavailable Python skill 'advisor': No module named 'advisor'>) and with the throwaway probe above.
Likely mechanism
The editable install for Python skills lands in the kernel venv at kernel startup (skill-creator docs: install is editable, keyed on a hash of pyproject.toml; we confirmed the .pth appears only after a kernel start). The forkserver template process started before the install, its site processing already ran, and forked children inherit the stale sys.path. New root kernels process the new .pth and work.
A template refresh on skill install (or on pyproject hash change) would close it. Restarting the session or daemon clears it, which is the current workaround.
Related
#1507 shows the same placeholder symptom with a different trigger (compaction and kernel restore). #298 introduced the forkserver.
This surfaced while building an advisor skill; the field report is here: #1924
All reactions