eca icon indicating copy to clipboard operation
eca copied to clipboard

Broken ask_user tool in subagents

Open zikajk opened this issue 7 months ago • 8 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

I've noticed that this can happen (in subagent). When options are empty then there is no way how to provide the answer and there is nothing I can do to continue.

Image

zikajk avatar Apr 20 '26 16:04 zikajk

@ericdallo
Simillar problem. I just accepted the tool (by a shortcut and a mistake basically) and now I am stuck and I need to STOP and cancel subagent. Also the Question / Option is very strange, no? So some prompt modification might be needed. But the main problem here was that I accepted the tool by a shortcut and it stucks in waiting state.

Tool: ask_user
Server: eca
Arguments: 
  question: "Please provide the list of Records topics you want me to check for implementation on this branch."
  options: [(:label "List of topics" :description "Provide the list of Records topics you want to check (e.g., ['topic1', 'topic2'])")]
  allowFreeform: t

zikajk avatar Apr 21 '26 12:04 zikajk

I am also not sure if it makes a sense to have "Cancel the question", LLM then picks up one answers randomly. So maybe it would be better to rename it to something like I don't care and pass that to LLM as an answer so its effect is more explicit? WDYT?

zikajk avatar Apr 22 '26 11:04 zikajk

As we discussed, for now we will disable ask_user tool for subagents, in the future we can revisit this as there still a problem with parallel agents asking questions

ericdallo avatar Apr 22 '26 13:04 ericdallo

Ok, let's keep it open until then? I've updated the title.

zikajk avatar Apr 22 '26 13:04 zikajk

@ericdallo I have an idea.

  1. LLM must always generate at least one or two answers. I think that is a good default, at least it will user give some ideas and I think it is how it usually works (which is not really important ;-)).
  2. User can select "Provide an answer"
  3. It will ask for the answer in Emacs mini-buffer, not sure about other IDEs, webview or CLI (if we will have some).

That would work with subagents too as providing answer can't automatically happen at the same time. WDYT?

zikajk avatar Apr 24 '26 06:04 zikajk

@zikajk that only changes where we will ask for user input right? in the end we will have the same issue with parallel agents but I think that's something we can accept for now, as 2 subagents asking questions at same time may be rare.

ericdallo avatar Apr 24 '26 15:04 ericdallo

@ericdallo The idea was that the last choice will something like "I will provide answer myself" and so two parallel tool calls can not evoke any user input. It will also be less confusing as it is IMHO not too obvious that this choice appears at the "user input" place right now.

zikajk avatar Apr 24 '26 15:04 zikajk

I see, makes sense, It may be a good approach

ericdallo avatar Apr 24 '26 15:04 ericdallo