Tool runtime scheduler key becomes unavailable after HMR reload #7015
Closed
zhang-guo-wen
started this conversation in
General
Replies: 1 comment
|
This is the HMR-triggered form of the same symbol-identity failure reported in #7011. I added the Windows reproduction, |
0 replies
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.
Runtime failure
In the Web development profile, rebuilding packages while the app is running can cause the next tool call to fail with:
The failing access is in
packages/core/agent-loop/src/tool-calls.ts:Cause
ToolRuntimecan survive an HMR/module reload whilepackages/core/tools/src/index.tsis re-evaluated.TOOL_RUNTIME_SCHEDULERcurrently usesSymbol(...), so the reloaded consumer gets a different symbol identity and cannot find the scheduler installed under the previous key.Local fix
I also added a regression assertion:
Validation completed locally:
packages/core/toolsVitest test passespnpm exec tsc -b packages/core/tools packages/core/agent-loop --pretty falsepassesThe original
Symbol(...)declaration is present in commita2d0f7f.All reactions