Plugin-origin tool calls hang indefinitely while built-in tools work #4551
Replies: 2 comments 2 replies
|
I reproduced the hang against current master (
Root cause: The patch validates the merge-extensible minimum at the renderer boundary: an array of plain JSON records with string Verification:
Deliberate scope: this does not close the block vocabulary or validate tag-specific payload fields; it only enforces the minimum container/shape contract needed to keep the execution bridge live. |
|
Independent confirmation of @Jstn-1g's root cause, plus a check you can run today without waiting for a core fix. Where the shape is lostReading const detached = snapshotToolValue(tool.name, candidate)
const violations = validateJsonSchemaValue(tool.output.schema, detached, 'value')
if (violations.length > 0) throw new ToolOutputError(tool.name, violations) // value IS schema-validated
const value = deepFreeze(detached)
let rendered: ContentBlock[]
try {
rendered = tool.output.render(exec.arguments, value)
} catch (error: unknown) {
throw projectionError(tool.name, 'render', error) // a THROWING render settles cleanly
}
const content = snapshotProjection(tool.name, 'render', rendered) // <-- only checks lossless JSON
That explains each of your observations:
The checkLook at what // hangs — JSON-lossless, wrong shape, passes snapshotProjection
render: (_args, value) => value.summary
// also hangs
render: (_args, value) => ({ type: 'text', text: value.summary })
// correct
render: (_args, value) => [{ type: 'text', text: value.summary }]Returning the string directly is the easy mistake to make, because For a working reference, output: {
schema: { /* ... */ },
render: (_args, value) => [{
type: 'text',
text: value.lines.length === 0 ? 'You look, and nothing much is stirring.' : value.lines.join('\\n'),
}],
}Four plugin-registered tools, called from Code Mode, no hang. On the core fixValidating the container shape at the renderer boundary is the right call — a wrong |
Uh oh!
There was an error while loading. Please reload this page.
Environment
Steps to reproduce
From a run_code program, call any plugin-registered tool, e.g.:
Expected
The call settles within the tool declared timeoutMs (8000 ms) - either a result or a timeout error, like every built-in tool.
Actual
The call never settles. The run_code execution is interrupted with no result recorded. This happens for every plugin-origin tool, on both plugin versions, while all built-in tools (pwsh, read, write, edit, glob, grep, web_search, skill) work normally in the same session.
Observations
Additional check
Diffed the published npm tarballs: dsh-tools, dsh-code-runtime-worker-thread, dsh-skill, dsh-session, dsh-web-app lib code is unchanged or only unrelated changes between 0.1.0-rc.7 and 0.1.1-rc.2, so this is still present in the latest published version. Happy to provide more detail or run diagnostics.
All reactions