eca icon indicating copy to clipboard operation
eca copied to clipboard

Support for Interactive Tool Rejection (Veto)

Open zikajk opened this issue 8 months ago • 6 comments

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

Summary Introduce a mechanism to reject tool calls without stopping the entire run. This allows the user to provide a reason for the rejection, which is then sent back to the LLM as a tool response, enabling the agent to adjust its plan.

Motivation Currently, if an agent proposes an undesirable or dangerous tool call (e.g., deleting a wrong file), the user must:

  1. Reject the tool (terminating the whole process).
  2. Write a new prompt with instructions on why the previous action was wrong.

This is inefficient, consumes extra premium requests in Copilot, and forces the agent to re-analyze the entire context from scratch.

Proposed Behavior

When the agent requests tool execution, the user should have the option to Reject with a reason.

Upon rejection, the user provides a brief text reason (e.g., "Don't modify this file, it's a config.").

The system sends this reason as a standard tool response.

The LLM receives the feedback and continues the current run, ideally finding an alternative path.

UX Idea In the chat/tool-call buffer, add a "Reject with reason" action. But I'm not sure if the title shouldn't make it clearer that it doesn't interrupt the flow.

zikajk avatar Mar 31 '26 17:03 zikajk

"Support non interrupting tool call reject with reason"? 😄

+1 I also felt this need

ovistoica avatar Apr 01 '26 04:04 ovistoica

@zikajk I agree we should send the rejection as a tool response and not user prompt, but I don't see changing user UX right? It would be: when user clicks on reject, we already mention: "What's the reason for the rejection", user types and then we send the rejection as a tool call response

ericdallo avatar Apr 04 '26 19:04 ericdallo

@ericdallo Maybe I don't understand your UX description too well but does that mean, there is an extra prompt after you hit reject? If that is the case, it adds an extra step in the flow. I think it should be:

  1. Accept
  2. Accept and remember
  3. Reject (current behavior)
  4. Reject with reason - (this would be great if it can be just a placeholder), put your cursor here and you type your reason, Enter, that's it

You might be saying the same thing, but just making sure

ovistoica avatar Apr 06 '26 04:04 ovistoica

@ovistoica the way reject works today is: when user clicks on it, eca stops and ask what's the reason of the rejection, user types the reason and then server sends to LLM a tool_call_output of "Tool call rejected by user choice" a new user message saying that last tool was rejected and then a new user message with "I rejected one or more tool calls with the following reason: ".

I believe we can improve doing 2 things:

  • Maybe offer a reject generic, mentionin in tool_call_output that the tool was rejected by user with no reason, no new user mesages.
  • change the current reject to mention "Reject with reason", and then change to mention the reason in the tool_call_output, not as a new user message.

WDYT?

ericdallo avatar Apr 06 '26 18:04 ericdallo

I'm really not sure a generic reject makes sense, a reason is always good

ericdallo avatar Apr 06 '26 18:04 ericdallo

I see the main difference in the fact that the current mechanism stops everything and returns control to the user. Very often, my follow-up prompt might be something like: "I’ve decided that was a bad idea, let’s do something completely different..." At that point, the loop starts over, the LLM begins "thinking" again, and so on.

The new mechanism would be closer to a STEER approach. I would likely use it for moments like "Try using this tool instead" or "I don’t like that variable name." Also, LLM wouldn't receive a new user message, which might be a disadvantage in the case of stronger instructions (as in the first scenario).

Actually, I see it as: Hard-stop vs. Steer

For the hard-stop, I can imagine that we no longer need to append "I rejected one or more tool calls with the following reason: " to the user message; simply stating "Tool call rejected by user choice" would be more than enough.

It would also be interesting to consider whether we could apply a template to denied tools. Currently, a hard-stop completely halts the agent's progress, but we might prefer to simply return something like: 'Never call this command, use ........ instead,' and allow the agent to continue its work autonomously.


What we could perhaps do—and what your message suggests—is this: even when a tool is being called, the user could click 'Stop' (instead of the current 'Reject'). This effectively preserves the existing behavior and remains consistent with the 'Stop' function used during model generation. We could then modify 'Reject' to be the variant where the user can provide a 'Reason.' However, this require a new UI for the reason, since at that point it isn't possible to append extra system context, images and so on (like with steer). Right?

zikajk avatar Apr 07 '26 13:04 zikajk