[BUG] model misspells my $HOME directory name, causing repeated tool failures

Resolved 💬 3 comments Opened Oct 8, 2025 by blimmer Closed Oct 8, 2025

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?

Lately, Claude repeately tries to edit files in the wrong path. I see output like this:

⏺ Update(/Users/blimner/code/graphql-typescript-resolver-scaffolding/tests/utils/test-helpers.ts)
  ⎿  Error editing file

⏺ Bash(yarn test queries.test.ts 2>&1 | grep -A5 "mkdir") timeout: 1m 0s
  ⎿  No matches found

> /feedback

⏺ To give feedback about Claude Code, you can report issues at
  https://github.com/anthropics/claude-code/issues.

  Regarding our current issue with memfs - let me check the memfs version and see if there's a compatibility
   issue:

⏺ Bash(npm list memfs)
  ⎿ @homebound/graphql-typescript-resolver-scaffolding@2.0.0-bump /Users/blimmer/code/graphql-typ
    escript-resolver-scaffolding
    └── memfs@4.49.0


⏺ Let me create a simple test to verify memfs's mkdir works with recursive option:

⏺ Write(tests/memfs-test.js)
  ⎿  Wrote 32 lines to tests/memfs-test.js
     const { Volume } = require('memfs');
     async function test() {
       const vol = new Volume();
       // Create base directory
       vol.mkdirSync('/test-project', { recursive: true });
       console.log('Created /test-project');
       console.log('Contents:', Object.keys(vol.toJSON()));
     … +22 lines (ctrl+o to expand)

⏺ Bash(node tests/memfs-test.js)
  ⎿  Created /test-project
     Contents: [ '/test-project' ]
     Successfully created /test-project/src/resolvers/queries
     … +3 lines (ctrl+o to expand)

⏺ Good! memfs's recursive mkdir works perfectly. The issue must be in how we're mocking it. Let me check if
  there's a promise/await issue. Let me also simplify the test to remove the memfs-test file:

⏺ Bash(rm tests/memfs-test.js)
  ⎿  remove tests/memfs-test.js?

⏺ Bash(rm -f tests/memfs-test.js)
  ⎿  (No content)

⏺ Now let me fix the test helper - the issue might be in how we're handling the async mocking. Let me be
  more explicit:

⏺ Read(/Users/blimner/code/graphql-typescript-resolver-scaffolding/tests/utils/test-helpers.ts)
  ⎿  Error reading file

⏺ Read(tests/utils/test-helpers.ts)
  ⎿  Read 117 lines (ctrl+o to expand)

⏺ Let me make the mkdir mock explicitly async to ensure proper promise handling:

⏺ Update(/Users/blimner/code/graphql-typescript-resolver-scaffolding/tests/utils/test-helpers.ts)
  ⎿  Error editing file

Note that it's trying to work with files in /Users/blimner but my $HOME is /Users/blimmer (note the typo).

> echo $HOME
/Users/blimmer

What Should Happen?

Claude should use my real homedir, not the one with a typo in it.

Error Messages/Logs

Steps to Reproduce

I can't consistently repro this, it seems to happen randomly.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

1.x

Claude Code Version

2.0.10 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗