Claude Code cannot create files in nested folders

Been playing with Claude Code in Xcode 26.3 as a code assistant and discovered it cannot create files in nested folders, only repo root. Letting Claude troubleshoot itself, it appears that str_replace_based_edit_tool strips forward slashes from the path variable. This is what Claude claims to send:

<invoke name="str_replace_based_edit_tool">
  <parameter name="command">create</parameter>
  <parameter name="path">/repo/Test App/EntityTestsAttempt3.swift</parameter>
  <parameter name="file_text">
    // ... file contents ...
  </parameter>
</invoke>

And the file that gets created is:

Test AppEntityTestsAttempt3.swift

Anyone else run into this before or can reproduce it?

Answered by Engineer in 876467022

Based on the log you're showing, I think that you actually may be using the existing built-in Xcode coding assistant agent, not Claude Agent!

If you see a line of text that says "Claude Sonnet 4.5" or "Claude Opus 4.5" in your prompt bar, you are using the old feature — make sure that says "Claude Agent."

If you're having trouble getting this to show up, double check you've downloaded the Claude Agent binary from Anthropic in Xcode Settings > Intelligence > Anthropic (hit the "Get" button if one is showing) and that you have signed in using the "..." next to "Account" on the Claude Agent settings page.

Accepted Answer

Based on the log you're showing, I think that you actually may be using the existing built-in Xcode coding assistant agent, not Claude Agent!

If you see a line of text that says "Claude Sonnet 4.5" or "Claude Opus 4.5" in your prompt bar, you are using the old feature — make sure that says "Claude Agent."

If you're having trouble getting this to show up, double check you've downloaded the Claude Agent binary from Anthropic in Xcode Settings > Intelligence > Anthropic (hit the "Get" button if one is showing) and that you have signed in using the "..." next to "Account" on the Claude Agent settings page.

That is 100% true! I'll continue playing around with it, but so far the agent doesn't seem to have the same limitations or buggy-ness the code assistant does. It definitely uses significantly more tokens faster, though. Thanks!

Claude Code cannot create files in nested folders
 
 
Q