Agent has no signal for "this tool call is taking too long" — silently waits on hangs

Resolved 💬 2 comments Opened Jun 2, 2026 by ringger Closed Jun 6, 2026

Description

Claude Code's agent has no native sense of elapsed time during long-running tool calls. When a Bash invocation (or any other tool) hangs or runs much longer than expected, the agent simply waits for the result with no internal trigger to:

  • Notice the hang.
  • Warn the user proactively ("this is taking longer than typical").
  • Suggest cancellation or backgrounding.

In a recent session, a Bash tool call for a project-specific dry-run hung for ~10 minutes due to file-lock contention with a concurrently-running sweep. The agent sat passively the entire time, with the user staring at a stalled prompt. The user finally interrupted manually; the agent had no awareness that anything unusual was happening.

Suggested behavior

  1. Surface elapsed wall time to the agent for in-flight tool calls (e.g., as a system reminder when a Bash call exceeds the tool's default timeout). The agent can already set timeout per Bash call, but it doesn't observe time passing within the call.
  2. After a configurable threshold (e.g., 60–120 seconds for typical commands, or timeout/2), inject a system reminder allowing the agent to check on the user, suggest a kill, or background the process.
  3. Alternatively, default Bash to run_in_background=true for commands flagged "may take a while," surfacing notifications when they complete.

User pain

The silent wait erodes trust — users can't tell whether the agent is thinking, the tool is working, or everything has stalled. Even a "still waiting on the Bash call (8 min elapsed)" heartbeat would help.

Environment

  • Claude Code CLI on macOS
  • Model: Claude Opus 4.7 (1M context)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗