fix(core): harden unified tool runtime (#31171)

This commit is contained in:
Kit Langton
2026-06-06 21:55:34 -04:00
committed by GitHub
parent 48c26fa039
commit eb9a683b40
35 changed files with 435 additions and 237 deletions
+16
View File
@@ -2955,6 +2955,22 @@ describe("SessionRunnerLLM", () => {
expect(yield* session.resume(sessionID).pipe(Effect.catchDefect(Effect.succeed))).toBe("unexpected tool defect")
expect(requests).toHaveLength(1)
expect(yield* session.context(sessionID)).toMatchObject([
{ type: "user", text: "Call defect" },
{
type: "assistant",
content: [
{
type: "tool",
id: "call-defect",
state: {
status: "error",
error: { type: "unknown", message: "Tool execution failed: unexpected tool defect" },
},
},
],
},
])
}),
)