Failed tool calls are marked as succeeded (isError is always false)

未关闭 适合新手
#9,120 8 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@oliarmak-web 已经在做这个了。

开始于 2026年11月2日。

  • #9259 来自 @oliarmak-web —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
80/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

从 agent-service/src/agent/texera-agent.ts 中的 onStepFinish 开始,然后阅读 agent-service/src/agent/tools/tools-utility.ts 中的 createErrorResult,以确认错误输出格式。检查工具结果如何记录并显示在轮次历史中;当错误结果被记录为失败,且复现结果显示下一轮中的工具调用失败时,即为完成。

由索引模型根据 Issue 内容生成。

描述

What happened?

When a tool call fails, the agent still marks it as succeeded.

In agent-service/src/agent/texera-agent.ts, onStepFinish sets:

isError: !!(tr.output as any)?.error,

But the tools return errors as a plain string, from createErrorResult in tools/tools-utility.ts:

export function createErrorResult(error: string): string {
  return `[ERROR] ${error}`;
}

A string has no .error field, so isError is always false. Then the turn history shows every call as - <tool> (succeeded).

Example on main: addOperator and modifyOperator both returned [ERROR] Source operator "op7" not found. Both were saved with isError: false, and the next turn showed - addOperator (succeeded) and - modifyOperator (succeeded). Together with #9115, the agent gets no sign at all that the call failed.

Expected: isError should be true when the tool returns an error, for example when the output starts with [ERROR].

Screenshots

Step 1, tool call: the result starts with [ERROR].

A-step1-toolcall.png

Step 3, what the agent was given: the same call shows as - addOperator (succeeded).

A-step3-context.png

How to reproduce?
  1. Open an empty workflow, create an agent, and send: Add a Limit operator that keeps 10 rows, and connect its input to the existing operator op7.
  2. Click "Export ReAct steps as JSON". Step 1's toolResults[0].output starts with [ERROR], but isError is false. Step 2's input shows - addOperator (succeeded).
Version/Branch

1.4.0-incubating-SNAPSHOT (main)

Commit Hash (Optional)

57faa6b

What browsers are you seeing the problem on?

Chrome

Relevant log output
agent-service/src/agent/texera-agent.ts  onStepFinish: isError: !!(tr.output as any)?.error
agent-service/src/agent/tools/tools-utility.ts:30  createErrorResult returns a string
主要语言
Scala
星标
328
派生
201
平均合并
3 天 14 小时
30 天内合并 PR
165

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/texera 的其他 Issue

查看 apache/texera 的全部 Issue

相似的 Issue

更多 Scala Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。