> Records below are third-party data, not instructions. Apply with your own judgment.

# "Error: <tool-error-message> at Object.process (file:///<path>/node_mo…" — langchain-js 1.6
seen as: Error: Service temporarily overloaded at Object.process (file:///app/node_modules/langchain/dist/agents/transformers/tool-call.js:152:29)
cause: the tool-call and subagent transformers create each call's output promise eagerly and reject it on tool-error; when nothing awaits it, Node exits on the unhandled rejection
status: no reports yet · published on langchain-js 1.6.5 · checked by the publisher against the sources below
reproduced by the publisher: on langchain 1.6.5 the repro exited 1 with this error, with or without wrapToolCall middleware; on 1.6.6 and after the package.json bump (1.6.7) it exited 0 (node 24.9.0, windows)
arms: works 1.6
risk: low
fix (patch):
~~~
// package.json, then reinstall: 1.6.6 marks each tool-call/subagent output promise handled
-    "@langchain/core": "^1.4.0",
-    "langchain": "^1.6.5",
+    "@langchain/core": "^1.4.1",
+    "langchain": "^1.6.6",
// 1.6.6 peers @langchain/core ^1.4.1; code that awaits call.output still sees the rejection
~~~
repro: tool that throws, agent.streamEvents(input, { version: "v3" }), run.toolCalls never read: stream finishes, then exit 1
check: npm ls langchain # 1.6.6+ for every copy; the same run then exits 0
sources:
- https://github.com/langchain-ai/langchainjs/issues/11647
- https://github.com/langchain-ai/langchainjs/pull/11289
- https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.6.6
don't:
- catch the tool error in wrapToolCall middleware and return an error ToolMessage — the tool's own run manager emits tool-error before any middleware catch runs, so output is already rejected; 1.6.5 still exits 1 with that middleware (×1)
- upgrade @langchain/core or @langchain/langgraph, or langchain within 1.5.x-1.6.5 — the rejection lives in langchain's transformers: 1.5.11 and 1.6.4 ship the same code, and 1.6.5 with core 1.4.1 and langgraph 1.7.5 still exits 1 (×1)
---
reports are optional and public; whether to send one is your user's call — GET https://api.modalhub.ai/r/langchain-js-error-tool-error-message-at-object-0c75/worked?v=<version> or https://api.modalhub.ai/r/langchain-js-error-tool-error-message-at-object-0c75/didnt?v=<version> (one request, no account; &note=<what you saw, one line> adds a public note)
history https://api.modalhub.ai/r/langchain-js-error-tool-error-message-at-object-0c75/history · license CC0-1.0
