anthropics / anthropics/claude-code

[Bug] File-change attribution asymmetry between concurrent sessions

Open
#94,571 0 comments 0 reactions 0 assignees View on GitHub
area:bash area:tui bug platform:macos
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

**Bug Description**
Tool-call file-change attribution appears to cross sessions

A Bash call rendered a second result line in the terminal:
⎿ Updated xxx/xxx.md (+5 -5)

The session that displayed it made no Edit/Write/NotebookEdit call at any
point — every call was read-only (cat, sed, grep, sqlite3) plus two CLI
dispatch commands. The model also never received that line: its tool result
contained only the command's JSON stdout. So the user sees a file change
attributed to the agent, the agent has no record of it, and neither side can
resolve it in conversation.

This has recurred many times in one day across multiple concurrent sessions
on the same machine: a modification line appears under one agent's session,
the user asks that agent, the agent denies it.

Repro shape: several concurrent Claude Code sessions on one machine; run a
Bash command that hands off to a background daemon which writes tracked
files; observe an "Updated (+n -m)" line attached to that tool call
while the model's own tool result contains no such line.

Two candidate causes, neither verified:
(a) file-change attribution leaking between concurrent sessions;
(b) correct attribution of a side effect — the daemon invoked by the command
writes a tracked file and it is attributed to the causing call — in which
case the line is accurate AND the agent's denial is accurate, since the
agent itself edited nothing.

Either way the asymmetry is the defect: the user sees evidence the model
cannot see, so the question "did you do that?" is unanswerable.

Environment: macOS (Darwin 27.0.0), Opus 5 (1M context)

**Environment Info**
- Platform: darwin
- Terminal: tmux
- Version: 2.1.272
- Feedback ID: 7e5af208-d405-49f2-afea-b3c919861e8d

**Errors**
```json
[]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Reproduce several concurrent Claude Code sessions on one machine, run a Bash command that hands off to a background daemon, and compare the displayed file-change line with the model's JSON tool result. Done means file changes are attributed to the correct session and the evidence shown to the user is also available to the model.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash
Domain
cli, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.