Skip to content

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

Description

@S-Luiten

Preflight Checklist

  • I have searched existing issues for similar behavior reports
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions