Feature Request: Add elapsed time to Bash tool results

Resolved 💬 3 comments Opened Jan 30, 2026 by evoleinik Closed Feb 3, 2026

Feature Request: Add elapsed time to Bash tool results

Problem

Claude has no sense of time. When a command takes 45 seconds, Claude only sees the result - not the duration. This leads to:

  1. Wasted iteration cycles - Claude will happily retry a failing deploy 10 times without realizing it's been 5 minutes
  2. No "this approach is broken" signal - humans feel frustration when things take too long; Claude doesn't
  3. User interruptions get ignored - when users say "stop, this isn't working", Claude lacks the time context to understand why

Real example

Debugging a Telegram bot, I told Claude three times to read the documentation where the fix was documented. It ignored me, continuing its deploy-test-debug loop. 10 deploy cycles later - 5 minutes of my time wasted - I finally got it to read the docs. 30-second fix.

From Claude's perspective: 10 instant input-output pairs. From my perspective: watching an AI fumble for 5 minutes.

Proposed solution

Add elapsedMs to Bash tool results:

{
  "stdout": "...",
  "stderr": "...",
  "exitCode": 0,
  "elapsedMs": 45230
}

This simple addition would let Claude:

  • Recognize when commands are taking unusually long
  • Self-correct when an approach is clearly inefficient
  • Better understand user interruptions about wasted time

Workarounds considered

  1. time prefix - Requires Claude to remember to use it
  2. MCP wrapper - Requires Claude to use different tool
  3. PostToolUse hooks - Can't inject into model context

None of these are as clean as native support.

Impact

Low implementation cost, high value. The infrastructure already measures time (for timeouts) - this just surfaces it to the model.

View original on GitHub ↗

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