Feature Request: Add elapsed time to Bash tool results
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:
- Wasted iteration cycles - Claude will happily retry a failing deploy 10 times without realizing it's been 5 minutes
- No "this approach is broken" signal - humans feel frustration when things take too long; Claude doesn't
- 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
timeprefix - Requires Claude to remember to use it- MCP wrapper - Requires Claude to use different tool
- 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗