Skip to content

[bug] BTW 模型与第三方执行器返回错误后工作状态仍显示已完成 #154

Description

@BegoniaHe

Preflight

  • I searched open and closed Issues and PRs.
  • I tested the current master branch or the exact commit.
  • This report contains no secrets, tokens, or private data.
  • This is not a security vulnerability (those use a private advisory).
  • I filled exactly one of Human note or Agent note, matching who wrote this Issue.

Affected area

Providers / agent runners

What happened

P2 / medium · AUD-20260910-agent-003

WorkLoop 仅从异常和 btw_work_failed 推断失败;run_agent 的 err 响应与第三方 _third_party_runner_error 都不会触发它。离线实验确认本地 err 和第三方异常转换后的错误都记录为 completed;会话 AI 禁用而执行器直接返回也是同类误报。

Minimal reproduction

启用 BTW 和 work loop。给真实 run_agent 连接测试 runner,令其返回 type=err;第二组使用真实 ThirdPartyAgentSubStage._handle_non_streaming_response,令测试 runner 抛出服务不可用异常;分别交给 WorkLoop 并查询状态。另以真实 AgentRequestSubStage + 禁用会话 AI 重现未执行也报完成的变体。

Expected: 本地和第三方执行错误应记为 failed;被会话准入拒绝的请求不能报告已成功执行。

Actual: 本地 err → completed;第三方 _third_party_runner_error=true → completed;会话 AI 禁用且执行器直接返回 → completed。

Impact: 用户看到错误或根本未执行模型,却从 /work status 得到任务已完成。

Code evidence

Suggested acceptance criteria

  • 传递明确的执行结果,统一处理本地错误、第三方错误与准入跳过,勿把生成器正常结束等同任务成功。
  • 在当前真实控制流上增加失败路径组合回归,不能只断言测试替身抛异常或手工设置工作状态。
  • 保持 BTW 默认关闭、现有授权和原请求身份;如调整用户行为,同步中英文文档。

Validation and limits

真实 Agent 控制流和工作状态机组合,远端 provider/runner 与会话服务使用内存替身。

本次审计运行:首轮 BTW/入口/状态/能力路由相关测试 173 passed;Agent、工具、历史、配置与导入边界测试 327 passed;pipeline/WebChat/生命周期测试 108 passed;两套循环选择器测试 3 passed。另运行上述确定性组合探针,并完成独立只读反证。现有测试通过不代表已覆盖此缺陷。未改动产品代码。

已检索全部 61 条 Issue 与 89 条 PR(含关闭/合并状态,审计开始时快照),未发现本缺陷的重复报告。关联已完成的功能跟踪 #125#126#127,以及总跟踪 #122;自动分类器实验 #133#135 不属于此缺陷。

Commit or version

037994ea4c8c289e4d5c8e7611a835ced93eeddd (master)

Environment

Linux,源码 checkout;Python 3.14.6;Node.js v26.8.1。后端探针使用内存/临时目录,不访问开发者数据或真实 IM、付费模型。

Author

Agent

Agent note

Codex 按用户授权结合代码审查与仓库 audit-product 技能报告此问题,并使用独立只读 AI agent 反证。目标是修复 BTW 工作循环的实际行为;涉及路径见上方证据,已运行检查与剩余限制如上。本 Issue 按 bug_report.yml 填写;本次只审计、建单,没有修改产品代码或声称修复已完成。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions