Skip to content

[BUG] Excessive settings.json file I/O (1000x/sec) after tool calls causes performance degradation in WSL #2906

Closed

Description

@aboveaboutbelow

Environment

  • Platform (select one):

    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
    • Claude CLI version: v1.0.41
    • Operating System: Windows 10 with WSL Debian
    • Terminal: WSL Debian terminal

    Bug Description

    Claude Code reads .claude/settings.json (and settings.local.json if present) approximately
    1000 times per second for 1-2 seconds after tool execution. The excessive file I/O is
    observable in Windows Process Monitor (procmon.exe) and occurs through COM Surrogate
    (Dllhost.exe) - this is WSL→Windows filesystem access.

    Steps to Reproduce

    1. Open Claude Code on Windows (project on Windows filesystem accessed via WSL /mnt/c/)
    2. Configure hooks in .claude/settings.json (PreToolUse and PostToolUse hooks)
    3. Execute any tool (e.g., Bash, Read, Edit)
    4. Monitor file access using Windows Process Monitor (procmon.exe)
    5. Observe Dllhost.exe reading settings files ~1000x/second for 1-2 seconds

    Expected Behavior

    Settings files should be read once on startup and cached, or at most once per tool execution
    if configuration changes need to be detected.

    Actual Behavior

    • Settings files are read ~1000 times per second after each tool call
    • Reading occurs through COM Surrogate (Dllhost.exe)
    • Causes 1-2 second delay/freeze after tool execution
    • Hooks seem to be causing "offline" status and freezing (worse than before using hooks) -
      might be related to this issue we're reporting

    Additional Context

    • Claude Code v1.0.41
    • Project uses PreToolUse hooks (4 bash scripts) and PostToolUse hooks (1 bash script)
    • Might be related to GitHub issue Unhandled EPIPE Error Causing Node.js Application Crash #2834 (Unhandled EPIPE Error) though the suggested
      workaround (CLAUDE_HTTP_KEEPALIVE=0) didn't help in this case
    • File path crosses WSL→Windows boundary: /mnt/c/[project]/.claude/settings.json
    • All MCP servers show as working (basic-memory, mcp-sequentialthinking-tools, serena)

    This excessive file I/O could explain the performance degradation with hooks enabled, as each
    settings file read through the WSL→Windows boundary has overhead.

Activity

  1. bogini commented on Jul 17, 2025

    @bogini
    Collaborator

    Fixed in 1.0.53.

  2. github-actions commented on Jul 31, 2025

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  3. locked as resolved and limited conversation to collaborators on Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions