[BUG] Claude Code 2.1.252: Windows local-Agent transcript/output link race
Preflight Checklist
- [x] I have searched existing issues 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?
Claude Code 2.1.252 appears to have a client-side issue affecting local Agents on Windows: a transcript/output link race.
Claude Code logs:
[WARN] [adopt] win32 link ...\subagents\agent-<id>.jsonl
-> ...\tasks\<id>.output.staging
failed: ENOENT
Exact filesystem timestamps from one reproduced case show:
20:56:11.340
Claude Code attempts the link and receives ENOENT
20:56:11.428
source subagent JSONL is created
So Claude Code attempts to create the link roughly 88 ms before the source transcript exists.
The Agent itself still completes successfully, but the final <id>.output file is a zero-byte regular file rather than the expected transcript link.
This issue was reproduced even when foreground Agent execution was working correctly, so it appears to be a separate issue.
What Should Happen?
The final <id>.output file should link to the subagent transcript JSONL after the source file exists, rather than being left as a zero-byte regular file. If the link is attempted before the source transcript is created, Claude Code should retry once the .jsonl exists.
Error Messages/Logs
Steps to Reproduce
- Launch Claude Code 2.1.252 on Windows with default settings (no fork/background/coordinator environment variables preset at User or Machine scope).
- Run a local Agent session (general-purpose local Agent).
- Observe the log line: [WARN] [adopt] win32 link
...\subagents\agent-<id>.jsonl->...\tasks\<id>.output.stagingfailed: ENOENT - Inspect the tasks directory: the final
<id>.outputis a zero-byte regular file instead of a link to the subagent transcript.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.252 (Claude Code)
Platform
Other
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
Summary:
Windows transcript/output bookkeeping
→ link attempted before source transcript exists
Could Anthropic confirm:
- Is the Windows adopt / transcript-link ENOENT behavior a known race condition?
- Should Claude Code retry the transcript/output link after the source .jsonl is created?
- Is a fix for this behavior planned in a version after 2.1.252?