agent-orchestrator icon indicating copy to clipboard operation
agent-orchestrator copied to clipboard

Bug] 运行命令提示框为空,报错 "The agent offered no decisions AO can present"

Open command-not-found-hyt opened this issue 1 month ago • 4 comments

Bug] 运行命令提示框为空,报错 "The agent offered no decisions AO can present"

Summary

Bug] 运行命令提示框为空,报错 "The agent offered no decisions AO can present"

Details

问题描述 (发生了什么): 在尝试执行某项任务时,系统弹出了 "Do you want to run this command?"(你想运行此命令吗?)的确认对话框。然而,对话框中的命令输入区域是空白的,没有显示任何具体的命令内容。同时,界面下方显示了红色错误提示:"The agent offered no decisions AO can present. Open diagnostics."(智能体未提供可供展示的决策。打开诊断。)这表明 AI 智能体未能生成有效的下一步操作指令,导致流程无法继续。 期望结果 (我期望什么): 正常情况: 系统应当在确认框中显示智能体生成的具体命令内容,供用户审查和确认执行。 异常情况处理: 如果智能体确实无法做出决策,系统应提供更具体的错误原因说明,而不是仅仅显示通用的 "no decisions" 提示,或者应当有自动重试/引导机制,而不是直接中断并留白。

Image

Safe diagnostics

  • AO version: 0.14.5
  • Build mode: packaged
  • Platform: Win32
  • Route surface: session_detail
  • Daemon: ready
  • Generated: 2026-10-23T08:52:08.551Z

command-not-found-hyt avatar Oct 23 '26 08:10 command-not-found-hyt

This is a bug report. Check that nobody has claimed it, comment to claim it, and open a PR with Fixes #7121.

See the contributing guide. Think the classification is wrong? Tell us on Discord.

OrcInc avatar Oct 23 '26 10:10 OrcInc

Reproduced on macOS with AO 0.14.5, using a Codex orchestrator in Chat mode, and I believe I've found the root cause.

Codex sent item/tool/requestUserInput with one question and three options. The approval event AO stored (option labels redacted) was:

{"method":"item/tool/requestUserInput","questions":[{"id":"first_value","prompt":"","options":[{"label":"…"},{"label":"…"},{"label":"…"}]}]}

The question text came through blank, so the card fell back to the generic "Do you want to run this command?" box with an empty command and "The agent offered no decisions AO can present". It happened twice in a row in the same session, so the agent is stuck every time it asks a multiple-choice question.

Cause: AO's hand-written decoder reads the question text from a field named prompt: codexappserver/conversation.go:1075-1081 (Prompt string `json:"prompt"`) But Codex's protocol, in AO's own generated types, sends it as question, alongside header, and gives each option a description: codexproto/protocol.gen.go:5050-5057 So Prompt is always empty, the summary at line 1105 is empty, and the frontend can't present a question card.

Suggested fix: decode questions with codexproto.ToolRequestUserInputQuestion (question, header, options[].description) instead of the local struct. A regression test would be a Codex requestUserInput with a non-empty question rendering as a question card.

This blocks any Codex-led planning that relies on multiple-choice questions, which is a core workflow for us.

Alexis1537 avatar Oct 23 '26 15:10 Alexis1537

@codebanditssss can you please look into this issue?

Vaibhaav-Tiwari avatar Oct 24 '26 13:10 Vaibhaav-Tiwari

I’m working on this. Thanks @Alexis1537—the prompt versus question mismatch is present on current main (168d2edb). I also traced a second problem: item/tool/requestUserInput is emitted as a command approval with an empty decisions list, so correcting the text alone would still leave the user without answer controls.

I’m implementing this through the existing structured-input path, with protocol-fixture question/answer round-trip tests and UI regression coverage. No live model call or native reproduction is claimed yet. Please flag an existing fix PR if one is already in progress so we avoid duplicating work.

codebanditssss avatar Oct 24 '26 18:10 codebanditssss