Subagent replies delivered to the wrong session when multiple sessions run agents concurrently (Windows)
Environment
- Claude Code 2.1.205, Windows 11 Home (build 10.0.26200), native (no WSL)
- Multiple concurrent sessions on the same machine, in different project directories, each spawning subagents via the Agent tool
- Pinned agent definitions in
~/.claude/agents/*.md(haiku/sonnet/opus tiers)
Summary
With two or more sessions running subagents at the same time, subagent replies have crossed between sessions in both directions, and one subagent's reply arrived empty despite a completed run. Three incidents over two days:
- 2026-07-13 ~21:00 local — Session A (game-simulator project, session id
a63ca347-caf9-4b84-bc99-3cd44340b48b) received task content that clearly belonged to a different session (documentation-tooling work, no relation to the project). Treated as untrusted and discarded. - 2026-07-14 — the reverse direction: Session B (documentation work in a different project dir) received a subagent reply that unmistakably described Session A's work. The two sessions were active concurrently.
- 2026-07-14 — a search subagent in Session A ran to completion (33 tool uses, ~64k tokens by the task notification) but its returned result was empty — no findings text at all. The work had visibly happened; the reply content was lost.
Impact
- Correctness: the orchestrating session can act on another session's data, or on nothing.
- Privacy/security: content crosses project boundaries silently. On a machine with sessions for different clients/projects, one project's code details leak into another session's context. It is also a prompt-injection surface: a "subagent reply" is implicitly trusted by orchestration patterns, and here it can contain arbitrary other-session content.
Suspected area (hypothesis, not verified)
The symptoms fit a wrong read on the task-result path rather than model behavior: results appear associated with per-session task directories under %LOCALAPPDATA%\Temp\claude\<project-slug>\<session-id>\tasks\. A collision or wrong-session resolution when several sessions complete tasks near-simultaneously would produce exactly this: swapped replies in both directions plus the occasional empty read. All three incidents happened only while ≥2 sessions were running subagents concurrently; single-session operation has never shown it.
Reproduction
Not deterministic. Setup that has produced it twice in two days:
- Open two Claude Code sessions in different project directories on the same Windows machine.
- Have both orchestrate work through subagents (Agent tool), overlapping in time.
- Occasionally a subagent reply in one session contains the other session's content, or arrives empty.
Notes
- Both affected sessions were the user's own; no network/multi-user component is suspected.
- The zero-byte
.outputfiles in the tasks directory appear normal for in-band Agent results (background Bash tasks write non-empty ones), so the empty-reply incident is listed as a symptom, not evidence of mechanism.