Skip to content

BUG: CC session halts on tool failure — no retry or approval surfacing #4704

Description

@OneStepAt4time

Bug Description

When Claude Code encounters a tool failure (e.g., unauthenticated gh api call, web search unavailable), the CC process halts instead of retrying or surfacing the error to the user for approval. The session dies silently on transient/external failures.

Impact

  • P1 — Breaks iterative development loops. A 4h+ session can die on a single failed tool call with no recovery path.
  • Affects any tool that may fail transiently (web search, GitHub API, file system edge cases).

Reproduction Steps

  1. Start a session via ag run <prompt> that will trigger a tool call
  2. Arrange for the tool to fail (e.g., unauthenticated GH API, missing web search provider)
  3. Observe: CC stops after the tool failure
  4. No retry, no error surfaced to Telegram/dashboard for approval, no recovery prompt

Expected Behavior

  • CC should surface tool failures to the approval layer (Telegram / dashboard)
  • User can approve/reject retry or skip the failed tool call
  • Session continues rather than halting

Root Cause (Hypothesis)

The ACP bridge or Aegis runner may not handle tool-error events from Claude Code. When CC reports a tool failure, the bridge either:

  • Does not forward the error to the approval queue
  • Does not propagate the error back to CC, causing CC to wait indefinitely
  • Does not implement retry logic in the runner layer

Evidence

Found during endurance test #4683 (2026-06-13).

Acceptance Criteria

  • Tool failure in CC session is surfaced to Telegram / dashboard approval queue
  • User can approve retry or skip from approval interface
  • Session continues after handled tool failure
  • E2E test: trigger tool failure → observe approval prompt → approve → session continues

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions