eca icon indicating copy to clipboard operation
eca copied to clipboard

Agent gets stuck on “Waiting for tool approval …” without showing an approval request in Emacs

Open mgmart opened this issue 2 months ago • 6 comments

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

Not sure if this is the correct repo or eca-emacs is better.

Summary

A custom agent consistently gets stuck at “Waiting for tool approval …” when tools require approval. No tool approval prompt, tool name, arguments, or UI action is shown in Emacs, so there is no way to approve or reject the request.

The built-in code agent has not exhibited this issue in my setup.

Environment

  • ECA server: 0.158.1
  • Client: Emacs 31.1 (aarch64-apple-darwin)
  • OS: macOS 26.6.2
  • Provider: OpenAI subscription / OAuth
  • Workspace: local Org Mode workspace
  • MCP servers configured: none

Custom agent configuration

---
name: org-assistant
mode: primary
description: Personal assistant for the Org Mode files in this workspace
model: openai/gpt-5.6-sol
variant: medium
tools:
  byDefault: ask
  allow:
    - eca__read_file
    - eca__directory_tree
    - eca__grep
    - eca__editor_diagnostics
    - eca__ask_user
    - eca__fetch_rule
---

The agent prompt also instructs the agent to inspect files before making changes and to request the required approval before write/edit operations.

Steps to reproduce

  1. Configure a custom agent with tools.byDefault: ask.
  2. Start a task that causes the agent to read workspace files or otherwise use a tool.
  3. Wait for the agent to request tool approval.

Actual behavior

The agent displays:

Waiting for tool approval …

However, Emacs does not display:

  • which tool needs approval,
  • its arguments,
  • an approve/reject prompt,
  • or any other actionable UI.

The agent remains stuck indefinitely.

Expected behavior

When an agent waits for tool approval, the Emacs client should display the corresponding tool request and provide an action to approve or reject it.

Alternatively, if no valid approval request can be rendered, the agent should fail with a visible error instead of waiting forever.

Additional observation / workaround

I temporarily changed the agent configuration to:

tools:
  byDefault: allow

With this setting, the agent proceeded. I was still asked for approval a few times, but those approval requests were at least visible and actionable.

This suggests the problem may be related specifically to the default ask approval path, or to an approval request that is created by the server but not delivered/rendered in the Emacs client.

mgmart avatar Sep 05 '26 16:09 mgmart

@mgmart This really sounds like a outdated eca-emacs package, what's the output of your M-x eca-version ?

ericdallo avatar Sep 08 '26 13:09 ericdallo

I just updated (almost) everything.

eca-emacs: 20260908.1259 | server: eca 0.158.1 | 
emacs: GNU Emacs 30.2 (build 1, aarch64-apple-darwin25.6.0, NS appkit-2685.70 Version 26.6.2 (Build 25G83))

The issue persists

mgmart avatar Sep 08 '26 14:09 mgmart

It seems to be a bugt with the task tool when your config has tools.byDefault ask, I will fix this but LMK if it fixes for you

ericdallo avatar Sep 08 '26 15:09 ericdallo

What happened: the task tool is rendered as the task widget above the prompt instead of a regular tool call block, so eca-emacs ignored its approval request. That never showed up with the built-in agents because eca__task is in the default allow list, but a custom agent's tools.allow replaces that list, so with byDefault: ask the server asked for approval and nothing was rendered. The prompt (tool arguments plus Accept/Reject) now shows in the task widget.

ericdallo avatar Sep 08 '26 15:09 ericdallo

Great - thank you @ericdallo

I do not have any need for my agent until the weekend. I will wait for next ECA release 😇. As I understood, I will then see the astra models and not gpt-reserve anymore.

mgmart avatar Sep 08 '26 15:09 mgmart

@ericdallo, I've just tested it. Works fine. Thank you. BTW: The new task-list is very nice!

mgmart avatar Sep 09 '26 14:09 mgmart