[BUG]

Resolved 💬 1 comment Opened Apr 27, 2026 by nazmul87-wq Closed May 29, 2026

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?

When creating a second subagent via the /agents command, the dialog shows an EEXIST error and
pressing 's' to save does nothing. The agent file is never created.

What Should Happen?

The agent file should be saved to .claude/agents/ successfully, regardless of whether the directory
already exists.

Error Messages/Logs

EEXIST: file already exists, mkdir 'C:\Users\<user>\<project>\.claude\agents'

Steps to Reproduce

  1. Create any first subagent via /agents — this succeeds and creates .claude/agents/
  2. Open /agents again and fill out a second agent
  3. Press 's' or Enter to save
  4. Error appears: "EEXIST: file already exists, mkdir '.claude/agents'"
  5. Agent file is never written to disk

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗