[Bug] Read-only Bash command rendered as "Created src/agent/loop.ts" file diff

Status Open
Reported on v2.1.300
Maintainer reply None cached
Activity 0 comments · opened Oct 15, 2026

Bug Description
A read-only Bash call (date, pgrep, tail, pi-status.sh, stat, sleep 15) was rendered with "Created src/agent/loop.ts (+238 -0)" and a full content

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.300
  • Feedback ID: 640eb2c8-b300-4998-b831-0f09d964ebc0
  • What happened: A read-only Bash call (date, pgrep, tail, pi-status.sh, stat, sleep 15) was rendered with "Created src/agent/loop.ts (+238 -0)" and a full diff under it. The file was written by a separate process (a local model agent via Pi, run by a background plan runner) during that call's sleep 15; Claude did not create it. Expected: no file change attributed to the Bash call, or a label saying it was changed outside Claude.
  • What the user said: "why have you created the src/agent/loop.ts file? the files must be created by qwen" and later "this was shown in our session, may report it as a bug"
  • Repro: run a background process that writes a new file in the working directory; meanwhile run a Bash call that does not touch it (e.g. sleep 15); the new file appears as "Created <path>" under that Bash call.
  • Evidence: 2026-10-15 15:46:36–15:46:51 local Bash call; file mtime 15:47:16 per stat (the writer's own event log shows write then two edits on src/agent/loop.ts); repo local-harness, path

<img width="2059" height="739" alt="Image" src="https://github.com/user-attachments/assets/3b585b41-e963-4624-891c-338cb5868531" />

src/agent/loop.ts; user screenshot ~/Desktop/Screenshot 2026-10-15 at 15.47.42.png.

  • Cause: not verified; looks like the file-change tracker diffs the working tree around a tool call and attributes any change to it.

Area: Bash tool output / file change display · Type: bug · Task: shell

View original on GitHub ↗