What happened?
/reload picks up changes to an extension's entry .ts but not to its imported .mjs/.cjs dependencies. The stale dependency module is reused, so a new entry referencing a newly-added dependency export sees undefined.
Steps to reproduce
- Create
~/.pi/agent/extensions/reload-test/dep.mjs with export const VAL = "old";
- Create
index.ts next to it that imports VAL and exposes it (e.g. a /reproval command that notifies its value).
/reload -> /reproval -> reports old.
- Edit only
dep.mjs -> export const VAL = "new";.
/reload -> /reproval -> still reports old.
- Restart pi ->
/reproval -> reports new.
Expected behavior
/reload re-evaluates the full extension module graph, or at least have this gap mentioned in the docs.
Version
pi 0.78.1, macOS 26.5.1, Node v24.15.0, iTerm2 3.6.10
What happened?
/reloadpicks up changes to an extension's entry.tsbut not to its imported.mjs/.cjsdependencies. The stale dependency module is reused, so a new entry referencing a newly-added dependencyexportseesundefined.Steps to reproduce
~/.pi/agent/extensions/reload-test/dep.mjswithexport const VAL = "old";index.tsnext to it that importsVALand exposes it (e.g. a /reproval command that notifies its value)./reload->/reproval-> reportsold.dep.mjs->export const VAL = "new";./reload->/reproval-> still reportsold./reproval-> reportsnew.Expected behavior
/reloadre-evaluates the full extension module graph, or at least have this gap mentioned in the docs.Version
pi 0.78.1, macOS 26.5.1, Node v24.15.0, iTerm2 3.6.10