1.4 KiB
1.4 KiB
可持续对话 · 对话框不结束(v1.6.67)
卡若要求:等待输入阶段,Cursor/Codex 对话框不能收工,要一直处于 wait Running。
物理事实
| 层 | 行为 |
|---|---|
| Cursor MCP | 单工具 call 有 ~30–100s 硬上限;超了 → interrupted → 对话框像「结束」 |
| Hub | 可永久 connectionHeld + steerQueue |
| Agent turn | 末 tool 是 wait 时 UI 显示 Running Wait For User Input |
「对话不结束」= wait 工具尽量一直 Running,不是一次 poll 占满到被强杀。
v1.6.67 解法(链式 wait)
wait(≤22s 内 poll)→ [RENEWAL] → 同 turn 零正文 → renewalOnly wait → 循环
↑ Running 态 ↑ 立刻再 Running
| 禁止 | 改为 |
|---|---|
| 单次 wait 无限 poll(v1.6.65) | 每段 22s 软上限 |
| RENEWAL 后「下轮再 wait」 | 同 turn 立刻 renewalOnly wait |
| 复盘后不收工 | 末 tool 必须 wait |
Agent 铁律
- 收到
[RENEWAL]→ 同 turn、零正文 →wait(renewalOnly=true)→ 再链 - 收到用户/面板消息 → 执行 → 可选一句 → wait
- 禁止说「对话结束」「已停止等待」
- interrupted → 当轮续 wait,不当任务结束
验收
- wait 后 UI 显示 Running(非 2s 闪退、非 100s interrupted)
- Reload Window 后
grep 1.6.67 ~/.persistent-chat-local/server.js