[MODEL] Claude inefficiently builds the same project twice in a single tool call

Open 💬 2 comments Opened Jun 29, 2026 by S-Luiten

Preflight Checklist

  • [x] I have searched existing issues for similar behavior reports
  • [x] This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Other unexpected behavior

What You Asked Claude to Do

Just a regular feature implementation where Claude builds at the end to catch compile errors

What Claude Actually Did

cd REDACTED
dotnet build REDACTED.csproj 2>&1 | grep -iE "error CS|error RZ" | sort -u
echo "=== result ==="
dotnet build REDACTED.csproj 2>&1 | grep -E "Error\(s\)|Build succeeded|Build FAILED"

Expected Behavior

Claude should only build the project once, building it twice just to use a different grep pattern is inefficient.

Files Affected

Permission Mode

Accept Edits was OFF (manual approval required)

Can You Reproduce This?

Sometimes (intermittent)

Steps to Reproduce

_No response_

Claude Model

Opus

Relevant Conversation

Impact

Low - Minor inconvenience

Claude Code Version

2.1.195 (Claude Code)

Platform

Anthropic API

Additional Context

_No response_

View original on GitHub ↗

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