Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Web UI 停止按钮无法真正打断回合:仅中止当前 step,skill_activation 重放续跑,用户消息排队 ~10 分钟且送达后重复注入(2.0.2 回归)

Abierto
#3,997 0 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bash, javascript, shell, typescript

Línea de trabajo

Look at the turn cancellation logic in the Web UI and server, focusing on how skill_activation prompts are replayed. Examine the wire logs for turn.cancel events and the subsequent turn creation. Check the message queueing mechanism in the prompt submission flow. The goal is to ensure a stop button cancels the entire turn and its tool calls, not just the current step, and that queued messages are handled correctly without duplication.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

你运行的 Kimi Code 版本是?

2.0.2(上一个版本为 0.4.x,具体小版本不记得了)

你使用的客户端是?

Kimi TUI 中通过 /web 启动的 Web UI,浏览器为 Chrome(非终端直开的 TUI 界面)

你使用的是哪个开放平台/订阅?

第三方自建网关(公司内部 OpenAI 兼容接口,非官方订阅)

你使用的是哪个模型?

kimi-k3

你的电脑平台是?

macOS (Darwin 27.0.0 arm64)

你遇到了什么问题?

长任务执行期间,回合(turn)几乎无法被用户打断,共观察到四个相互关联的问题(回归:在 Web UI(/web,Chrome)中,停止按钮在此前的版本(0.4.x)中可正常打断回合,2026-09-23 自动更新到 2.0.2 后失效):

  1. 回合运行中发送的用户消息不会打断当前回合,而是被静默排队。 我在 agent 操作浏览器执行发布流程时,于 14:42:57 发送「停 发git tag 别折腾master」,server 事件记录为 prompt.submitted status=queued;14:44:37 再发一条,同样入队。两条消息分别等了约 10 分钟,直到回合自然结束后才被执行。期间 agent 完全看不到「停」,继续完成了 33 步操作。
  2. Web UI 的停止按钮只中止当前 step,不打断整个任务。 14:42:41.377 wire 记录了 turn.cancel (reason: user_cancelled),当前 step 以 finishReason: interrupted 结束——但约 3ms 后,框架把挂起的 skill_activation prompt 重放为一个新的 turn.prompt(内容是一整段 <skill-loaded name="application-deploy" ...>,origin 为 skill_activation),随即开启 turn 2。agent 毫无停顿地继续同一发布流程又跑了 10 分钟。
  3. 在途的工具调用(含浏览器操作)不受停止影响。 本次浏览器操作是通过内置浏览器桥接(kimi-webbridge:本地 HTTP 服务,由 Bash curl 驱动 navigate/click/fill/snapshot 等 action)完成的。按停止后,后续 33 步浏览器操作(点击发起构建、定位发布页、确认发布、推进部署单等)全部继续执行完毕——框架无法取消正在运行的 Bash 工具调用,用户没有任何有效的紧急停止手段。
  4. 排队消息送达后被双重注入,UI 出现复读/重复气泡。 同一条排队消息(promptId msg_01M36G4N7...)在 wire 里被追加了两遍:先作为 agent.message.appended(user 消息,14:54:00.865),同毫秒又作为 turn.prompt + context.append_message(14:54:00.868/.869)。UI 上「不是你在干嘛」渲染了两个一模一样的用户气泡(截图可见 14:53、14:54 各一个)。同时框架注入了一条 origin: {kind: injection, variant: interruption} 的 system-reminder,声称「previous turn was interrupted by the user before completion; any partial output shown above is incomplete」——但实际上任务无缝继续到了完成。而当排队 ~10 分钟的「停」终于被执行时,工作早已做完,模型只能回一段对已完成操作的长篇复述(recap),「停止」的语义彻底丢失。
复现步骤?
  1. 让 agent 执行一个长任务链:后台任务通知触发 → 模型调用 Skill → 通过内置浏览器桥接(kimi-webbridge)在网页上执行多步发布操作(本次:单回合 33 步、约 10 分钟,每步为 curl 本地 webbridge 的 Bash 调用)。
  2. 回合运行中点击 Web UI 停止按钮:观察到 wire 记录 turn.cancel (reason: user_cancelled) + 当前 step interrupted,但挂起的 skill_activation 被重放为新 turn,任务继续。
  3. 回合运行中再发送用户消息(如「停」):观察到 server 事件 prompt.submitted status: queued,消息直到回合结束才执行;且同一 promptId 被 agent.message.appended 和 context.append_message 各追加一次,UI 渲染出重复气泡。
  4. 关键事件时间线(本地时间 UTC+8,来自 wire.jsonl 与 ~/.kimi-code/server/events/<session>.jsonl):
时间 事件
14:37:09 用户初始 prompt(turn 0):挂 IM 群监听,有发版需求用 deploy skill 处理
14:38:27 后台任务完成通知触发 turn 1(origin: task),模型调用 Skill
14:38:52–14:42:30 turn 1 执行发布流程 20 步
14:42:41.377 turn.cancel turnId=1 reason=user_cancelled(用户点击 Web UI 停止按钮)
14:42:41.385–.389 step 20 finishReason=interrupted;随即 turn 2 以 origin=skill_activation 启动,任务无缝继续
14:42:57.764 prompt.submitted status=queued「停 发git tag 别折腾master」——入队
14:44:37.256 prompt.submitted status=queued「不是你在干嘛」——入队
14:42:41–14:53:01 turn 2 继续执行 33 步浏览器操作,全程无打断点
14:53:01.208 turn.ended turn 2 reason=completed (durationMs=619820)
14:53:01.210 排队 10 分钟的「停」才作为 turn 3 执行,模型只能复述已完成工作
14:54:00.865/.868 「不是你在干嘛」同一 promptId 被两次追加(复读气泡)

完整 wire.jsonl / server events 可应要求私下提供(内含内部标识符,不便直接贴出)。

期望的行为是什么?
  • Web UI 的停止按钮应终止整个当前回合:取消在途工具调用(含 Bash/MCP/浏览器桥接)、丢弃模型已发出但尚未执行的工具调用,而不是只杀当前 step 后把挂起 prompt 重放进新回合继续跑。
  • 回合运行中发送用户消息,应提供「打断当前回合并立即处理」的语义(或至少明确提示消息已排队、且排队状态对用户可见)。
  • 排队消息送达后只应注入一次;取消时注入的 interruption 元数据应与实际行为一致(任务实际继续时不应声称 previous turn was interrupted、partial output incomplete)。
补充信息
  • 回归确认:上一个版本为 0.4.x(具体小版本不详),当时 Web UI 的停止按钮可正常打断回合;2026-09-23 自动更新到 2.0.2 后出现本 issue 描述的行为(基于用户体验确认,无旧版本 wire 佐证)。
  • 客户端为 TUI 中 /web 启动的 Web UI(Chrome 浏览器)。可能与 #2827(VSCode 插件要求停止无效)、#2949(无打断按钮)相关,但本 issue 针对 Web UI 2.0.2 的回合级打断语义,根因链(step 级 abort → skill_activation 重放 → prompt 排队至回合结束 → 重复注入)未见于现有 issue。
  • 权限模式为 auto,无 approval 拦截,agent 全程自动执行。安全影响:对发布/部署这类变更生产系统的长任务,用户没有任何有效的紧急停止手段。
Lenguaje dominante
TypeScript
Estrellas
8k
Forks
1.3k
Merge medio
20 h 35 min
PR fusionados (30 d)
150

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MoonshotAI/kimi-code

Todos los issues de MoonshotAI/kimi-code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.