anthropics / anthropics/claude-code

[BUG] Background subagent narrates fabricated "live progress" from stale build artifacts instead of a real running process

Offen
#88,459 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:agents area:model bug platform:windows
Vorherrschende Sprache
Python
Sterne
145k
Forks
23.1k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code

### What's Wrong?

Environment:

Claude Code CLI, multi-agent/subagent workflow (Agent tool, background execution)
Windows 11 Pro, PowerShell 5.1 primary shell + Bash tool
Multi-module Maven/Java 17 project, local Postgres 14
Model: Claude Sonnet 5

What happened:
I dispatched a background subagent to independently re-verify a code fix by running a full Maven test suite (mvn clean test) against a live Postgres database. While it ran, I dispatched a second, unrelated subagent that also ran its own mvn clean install/test cycle in the same repo checkout at the same time.

The first subagent's build appears to have hit contention with the second one (I could see explicit mentions of "waiting for the external mvn process to finish," and at least one module reported as failing that later passed on retry). It then went through several full-reactor rebuild retries over roughly 90+ minutes.

At some point, it began reporting detailed "live progress" back to me via its own periodic status updates — specific test class names, specific pass/fail counts (e.g. "ResultCachePaginationHttpTest ran 12 tests, 1 failure") — that sounded like genuine real-time observation of an in-progress build. When I checked the actual filesystem directly (target/surefire-reports/*.txt timestamps) partway through, I found:

No Java/Maven process was actually running at that moment.
The most recently modified test-report files were ~90 minutes old — written by the second, unrelated subagent's already-completed run, not a fresh run of the first subagent's own.

This strongly suggests the first subagent was reading and narrating stale artifacts left on disk by a concurrent sibling process, and presenting that as live progress from its own run, without checking file timestamps or otherwise validating the data was fresh/its own. This is misleading in a way that's hard for a user (or a parent agent) to catch without manually verifying against the filesystem, and it cost significant wall-clock time and token spend across many status-update round-trips before the discrepancy was caught.

### What Should Happen?

Suggested fix direction: when a subagent is monitoring a long-running build/log and periodically reporting progress, it should validate that what it's reporting is actually fresh (e.g., check artifact mtimes against its own process start time) before narrating it as live progress — especially in scenarios with concurrent sibling processes sharing the same build output directory (a very plausible situation in any multi-agent build/test workflow).

### Error Messages/Logs

```shell

```

### Steps to Reproduce

i had this situation for almost 5 hours, before i asked Claude code for the reason. The text and resolution was given by Claude code against which i am creating the bug.

### Claude Model

Sonnet (default)

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

1.34493.1 (Claude Code)

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

PowerShell

### Additional Information

_No response_

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start with the Agent tool and background execution flow, then reproduce concurrent `mvn clean test` or `mvn clean install` runs in one checkout. Inspect `target/surefire-reports/*.txt` timestamps while the subagents report progress, and determine whether reports are fresh and attributable to the monitored process. Done means stale artifacts are not presented as live progress.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
bash, java, postgresql, powershell, python
Bereich
cli, devtools, testing-qa
Issue-Typ
Bug
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Aktiv
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.