Skip to content

fix: Remove unconditional bell ring for auto-approved tool calls (cli-21)#513

Merged
dwash96 merged 1 commit into
cecli-dev:v0.99.12from
szmania:cli-21-agent-mode-all-notifications-bug
May 12, 2026
Merged

fix: Remove unconditional bell ring for auto-approved tool calls (cli-21)#513
dwash96 merged 1 commit into
cecli-dev:v0.99.12from
szmania:cli-21-agent-mode-all-notifications-bug

Conversation

@szmania
Copy link
Copy Markdown

@szmania szmania commented May 12, 2026

Summary

This PR fixes an issue where notifications (bell rings) were being sent for every tool call in agent mode, even after the user had approved all tool calls with "(A)ll".

Problem

In agent mode, after a user approves all tool calls with "(A)ll", cecli continued to send a notification (ring a bell) for every subsequent tool call that was automatically approved. This was annoying and unnecessary.

Root Cause

The _print_tool_call_info method in cecli/coders/base_coder.py unconditionally called self.io.ring_bell() before checking if user confirmation was actually required. The confirmation check itself (io.confirm_ask) is smart enough not to prompt (and thus not to notify) if an "all" preference is already registered, but the bell had already been rung.

Solution

Removed the unconditional self.io.ring_bell() call from the _print_tool_call_info method. The bell/notification is already correctly handled within the io.confirm_ask method, which is called right after _print_tool_call_info. This ensures the notification only triggers when the user is actually being prompted for confirmation.

Changes

  • cecli/coders/base_coder.py: Removed self.io.ring_bell() from _print_tool_call_info method

Testing

User tested manually in agent mode:

  1. Run cecli in agent mode
  2. Issue a prompt that results in multiple tool calls
  3. When prompted to "Run tools?", respond with "(A)ll"
  4. Observe that subsequent, automatically-approved tool calls do not produce notifications

Fixes: cli-21

Co-authored-by: cecli (openai/gemini_cli_local/gemini-2.5-pro)
@szmania szmania marked this pull request as draft May 12, 2026 23:08
@dwash96 dwash96 changed the base branch from main to v0.99.12 May 12, 2026 23:43
@dwash96 dwash96 marked this pull request as ready for review May 12, 2026 23:43
@dwash96 dwash96 merged commit ffc5933 into cecli-dev:v0.99.12 May 12, 2026
12 checks passed
@dwash96 dwash96 mentioned this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants