Replies: 1 comment 2 replies
|
#7079 |
2 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.
Summary
Every tool call fails immediately with
Cannot read properties of undefined (reading 'prepare')on a completely fresh, vanilla profile with zero third-party plugins. Plain chat (no tools) works fine every time; the moment the model calls any tool — a third-party plugin's tool or a shipped built-in one — the run crashes.Reproduction (minimal, no third-party plugins involved)
Output:
The model's reasoning shows it correctly decided to call the built-in read tool; the crash happens at the moment of actually dispatching that call. A prompt with no tool need (
"你好,用一句话回复即可") completes normally (exit 0, correct reply) every time.What I ruled out
dsh.profile.bundlesentry, no home-levelcordis.patch.ymlrow).pnpm install --frozen-lockfile && pnpm run build(clean exit, no errors) did not change the symptom.Likely crash site
packages/core/agent-loop/src/tool-calls.ts:ToolRuntime(packages/core/tools/src/index.ts) assigns[TOOL_RUNTIME_SCHEDULER]as an unconditional class-field initializer:Since that assignment can't be skipped once the constructor runs,
ctx.tools[TOOL_RUNTIME_SCHEDULER]reading asundefinedat the pointtool-calls.tsuses it points atctx.toolsnot being the sameToolRuntimeinstance/module-identity that defined the symbol — the shape of a dual-package-instance / symbol-identity mismatch, not a missing-property bug. I haven't traced further into the Loader/host-runner internals to confirm exactly where the two copies would come from.Environment
ddefc45fbc7f8e46dd73185e68295696d1297887(repo has local uncommitted changes — see below — but they're confined topackages/web/web-fetch-http/*and unrelated docs/lockfile, notagent-loop/core/tools)dshlaunched from source (pnpm dsh ...), bothwebandheadlessprofiles affectedNote on the local checkout
This checkout has an unrelated in-progress local change (an HTML-decoding fix under
packages/web/web-fetch-http) that I can't rule out interacting with this somehow, though the touched files don't overlap with the tool-execution code path above. If anyone can reproduce (or not) on a cleangit cloneat this same commit, that would help separate "real regression at this commit" from "something specific to one local tree."Happy to run additional diagnostics against this reproduction if useful — this currently blocks all tool-calling, which is a pretty core piece of functionality.
All reactions