MoonshotAI / MoonshotAI/kimi-code

ACP adapter: AskUserQuestion 的多问题与多选被静默降级,host 无法拿回完整答案

Open
#3,288 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

你运行的 Kimi Code 版本是?

kimi 0.31.1,以 kimi acp 作为 ACP agent 运行

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

kimi

你使用的是哪个模型?

kimi-for-coding

你的电脑平台是?

windows

你遇到了什么问题?

AskUserQuestion 在 ACP 通道上有两处能力缺失,都表现为静默降级——host 侧看不到任何协议层信号,模型侧也拿不到用户其实已经给出的答案:

单个问题不支持多选:multiSelect: true 的问题仍按单选呈现,用户只能选一个。
一次调用不支持多个问题:questions 数组长度 > 1 时,只有 questions[0] 会被问出去,其余问题被直接丢弃,不会以任何形式补问或告知 host。
对使用者的实际影响是:模型明明按 SDK 的 schema 生成了一次性的多问题/多选提问,但用户实际只被问到第一题、且只能单选;剩余问题的信息在这一轮里永久丢失。

复现步骤?

用任意 ACP client 连接 kimi acp。
引导模型一次调用 AskUserQuestion,带 3 个问题、其中一个 multiSelect: true。
观察 host 收到的 session/update(tool_call 通知)与 session/request_permission。
实际:tool_call 通知里携带完整的 3 个问题输入,但 session/request_permission 只透传第一题、且只有单选选项;Q2/Q3 不会再被问,模型最终收到的 tool_result 只有一条 {"answers": {"": ""}}。

期望的行为是什么?

把降级变可见(最低成本):降级发生时在 tool_result 里明确告知模型「仅第一题被问出/多选已降级为单选」,让模型有机会自行补问;同时在协议层给 host 一个可观测信号,而不是只有 agent 侧 telemetry。
多问题顺序展开:questions.length > 1 时不丢弃,而是自动排成 N 次连续的 session/request_permission,把 N 个答案合并成完整的 QuestionAnswers 再返回模型。这不需要改 ACP 协议,只需 adapter 内部循环。
agent 侧支持 elicitation/create:把多问题/多选表单整体交给 host 渲染、答案整体回传。这是我们认为最干净的长期方案,也和现有 acp-server 的 host 侧能力对称。
或在 permission 响应上约定扩展字段(例如 _meta 里携带 questionIndex → optionIds[]),由 outcomeToQuestionAnswer 解析回多键 QuestionAnswers。对已有 client 向后兼容。

补充信息

我们这边有现成的 ACP host 与探针脚本,可以配合验证任何一个方向的改动,需要更详细的抓包日志也可以提供。

Contribution
  • 我愿意自己提交修复此 bug 的 PR(请先等待维护者在本 issue 中批准)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ACP adapter paths handling session/update, session/request_permission, and outcomeToQuestionAnswer, then compare them with the acp-server host capability for elicitation/create. Reproduce the three-question, multiSelect case using the available ACP host and probe scripts. Done means the adapter no longer silently loses questions or multi-select answers, with the chosen behavior observable to the host and complete answers returned to the model.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.