Replies: 2 comments 1 reply
|
Update: this does not reproduce on the I switched the checkout from So this looks like a regression introduced somewhere between Two incidental CLI differences noticed between the versions while testing, in case they're relevant:
|
|
Your bisect boundary is right, and it is one commit wide — the answer is not a range. The regression is a single line, and only
|
Uh oh!
There was an error while loading. Please reload this page.
Environment:
deepseek-harnesscloned frommain,pnpm@11.7.0, Node v22.23.1, Windows 10,deepseek-officialprovider /deepseek-flashmodel.Symptom: The first tool call of a session can fail immediately with:
This showed up in the Web GUI (
dsh web) on the first message of a session shortly after the server had (re)started.Update: this is not a brief transient race. Retrying the same failed message in the same session did not recover. Starting a brand-new session and waiting a full minute before sending the first prompt also did not recover — same crash. So whatever left
ctx.tools(see root cause below) unpopulated appears to persist for the remaining lifetime of that server process, not just for a short warm-up window.Reproduction (100% reliable):
dsh --profile headless "what is the content of the file test.txt"run in a fresh workspace directory containingtest.txtfails on essentially every invocation, because headless mode goes from process boot straight to the first LLM call/tool call with almost no warm-up time.Root cause: Traced the real stack trace (by temporarily logging the caught error in
packages/core/agent-loop) to:which is:
TOOL_RUNTIME_SCHEDULERis areadonlyinstance field always present on thedsh-toolsplugin object (packages/core/tools/src/index.ts:798), so it can only read asundefinedifctx.toolsitself hasn't been registered into the context. Given it doesn't self-resolve even after a minute and a fresh session, this looks less like a slow-warm-up race and more like thedsh-toolsplugin silently failing to initialize/register for the rest of that process's life (possibly swallowing an error during its own startup) rather than merely being delayed.Impact: Once triggered, every session against that running
dsh webprocess seems to hit the same failure on its first tool call. The only untested next step on our end would be fully restarting thedsh webprocess — haven't confirmed whether that clears it or whether it's more deeply state-dependent (e.g. tied to something in~/.dsh).Happy to share the full stack trace, the session logs, or a minimal repro script if useful.
All reactions