boardx / boardx/workspacex

P0: devapp 审批弹窗点了没反应,用户被锁死——write_todos 落默认 L2,且注释声称它是 L0

Open
#3,186 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
Avg merge
1h 7m
Merged PRs (30d)
969

Description

## 现象(人类 2026-09-09 在 devapp 实测)

chat 里弹出「agent 请求执行一个高风险操作 **L2·高风险**」对话框,「想做什么:调用工具 `write_todos`」,展示 `{"todos":[{"content":"推演 HMW 头脑风暴画布","status":"in_progress"},…`。

四个按钮(仅本次允许 / 本 run 内都允许 / 以后都允许 / 拒绝)**点了没有任何反应,会话卡死**。

## coordinator 已取证的两件事

**① `write_todos` 落进默认 L2,而同一个文件的注释声称它是 L0。**

`apps/api/src/domain/agent-run/tool-risk-tier.ts` 第 24-25 行逐字写着:

> L0:只读、无副作用。`list_org_skills`(deep-agent-service 内置的技能枚举工具)与 `write_todos`(deepagents `TodoListMiddleware` 的规划记账工具)都在这一档

但下面真正的 `L0_READ_ONLY_TOOLS` 集合是:

```
"wx_run_status", "browser_snapshot",
"read_file", "grep", "web_fetch", "list_org_skills", "glob", "ls",
"wx_memory_search", "wx_project_list", "wx_project_read", "wx_knowledge_search", "wx_knowledge_read", "wx_canvas_read",
```

**没有 `write_todos`。** 于是它走到末尾的 `return "L2"`(未登记一律最保守)。

**② 它从来没在里面过。** `git log -S'"write_todos"' -- <该文件>` 在 origin/main 上**零条记录**。所以这不是昨夜 #3136 改的——注释从写下来那天起就与代码不符。

⚠ 连带订正:#3132 的根因叙述里「`write_todos` 在 `tool-risk-tier.ts` 里是 L0」这句**是照着注释写的,而注释是错的**。后来人不要再引用它。

## 两个独立缺陷,别混成一个

- **A(阻塞级)**:L2 审批弹窗的按钮**点了没反应**——resume 链路断在某一环。这是把用户锁死的那条。
- **B(分级错误)**:`write_todos` 是规划记账工具、无副作用,本就该是 L0;现在每写一次计划都要人工批准。注释与集合两处声明同一事实且已漂移,正是本仓禁止的形态。

**修 B 不能替代修 A**——把 `write_todos` 挪回 L0 只是让这一个工具不再弹窗,任何真正的 L2 工具仍然会把用户锁死。

## 要求

修 A 时两个方向都要证:① 审批点击后 run 真的恢复;② B7 的计划确认门仍然生效(不要为了修这个把 B7 弄回自动放行)。
修 B 时把「注释与集合不得各说各话」机械化,否则会再漂。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with apps/api/src/domain/agent-run/tool-risk-tier.ts to compare the L0 comment with the actual collection, then trace the approval dialog click through the run-resume path. Verify that an approval click resumes the run while B7's plan-confirmation gate still applies; separately verify that the risk-tier declaration is mechanically consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.