claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Error: write EPIPE

Open mahenzon opened this issue 1 month ago • 2 comments

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?

Almost every time when trying to edit file the claude-code cli fails with error:

  ⏵⏵ accept edits on (shift+tab to cycle)
node:events:486
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19)
Emitted 'error' event on TLSSocket instance at:
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Node.js v25.2.1

~/home/suren/some-project
➜ claude --version
2.0.62 (Claude Code)

~/home/suren/some-project
➜ npm list -g --depth 0 

/opt/homebrew/lib
├── @anthropic-ai/[email protected]
├── [email protected]
└── [email protected]

I tried different models, getting the same error.

What Should Happen?

I expect the app not crashing. If there's some connection error, the app can retry automatically several times, or at least just pause and wait for me, not loosing the context.

Error Messages/Logs

node:events:486
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19)
Emitted 'error' event on TLSSocket instance at:
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Node.js v25.2.1

Steps to Reproduce

Example how I get this error:

Terminal session

Running with CLAUDE_HTTP_KEEPALIVE=0 claude -d


╭─── Claude Code v2.0.62 ────────────────────────────────────────────────────────────────────────────────────╮
│                                        │ Tips for getting started                                          │
│              Welcome back!             │ Run /init to create a CLAUDE.md file with instructions for Claude │
│                                        │ ───────────────────────────────────────────────────────────────── │
│                ▗ ▗   ▖ ▖               │ Recent activity                                                   │
│                                        │ No recent activity                                                │
│                  ▘▘ ▝▝                 │                                                                   │
│                                        │                                                                   │
│     Haiku 4.5 · API Usage Billing      │                                                                   │
│   ~/MyFiles/Projects/example-project   │                                                                   │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

  Debug mode enabled
  Logging to: /Users/mahenzon/.claude/debug/6b38b9bd-307a-4402-b2f8-97373403df01.txt

  /model to try Opus 4.5

> /init is analyzing your codebase… 

⏺ init is analyzing your codebase…

  I'll analyze your codebase and create a comprehensive CLAUDE.md file. Let me start by exploring the
  structure and understanding the project setup.

⏺ Bash(find /Users/mahenzon/MyFiles/Projects/example-project -maxdepth 2 -type f \( -name "*.json" -o -name
      "*.md" -o -name "*.yaml" -o -name "*.yml" \) | head -20)
  ⎿  /Users/mahenzon/MyFiles/Projects/example-project/README.md

⏺ Search(pattern: "**/{package.json,tsconfig.json,jest.config.js,vite.config.ts,webpack.config.js,.eslintrc*,READ
        ME.md,CLAUDE.md}")
  ⎿  Found 1 file (ctrl+o to expand)

⏺ Let me get a broader view of the project structure and read the README:

⏺ Bash(ls -la /Users/mahenzon/MyFiles/Projects/example-project)
  ⎿  total 24                                            
     drwxr-xr-x   4 mahenzon  staff   128 Dec  9 13:19 .
     drwxr-xr-x  16 mahenzon  staff   512 Dec  9 13:18 ..
     … +2 lines (ctrl+o to expand)

⏺ Read(README.md)
  ⎿  Read 163 lines

⏺ Now let me examine the main application file to understand its structure:

⏺ Read(hello_app.py)
  ⎿  Read 134 lines

⏺ Perfect! I now have a clear understanding of this project. It's a simple Python CLI application using
  Typer. Let me create a comprehensive CLAUDE.md file:

⏺ Write(CLAUDE.md)
  ⎿  Wrote 95 lines to CLAUDE.md                                                                            
     # CLAUDE.md
     This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
     ## Project Overview
     This is a lightweight CLI application built with [Typer](https://typer.tiangolo.com/) that demonstrates
     a user-friendly command-line interface in Python. The application provides multiple greeting commands,
     games, and interactive features.
     ## Quick Start Commands

     … +85 lines (ctrl+o to expand)

⏺ Done! I've created a comprehensive CLAUDE.md file for your repository. Here's what I included:

  Key Sections:
  1. Project Overview - Context about what this is
  2. Quick Start Commands - Common commands for running the CLI
  3. Dependencies - Python version and required packages
  4. Code Architecture - Explanation of the Typer pattern and design structure:
    - How the single-file structure works
    - How commands are defined using decorators and type hints
    - Key design patterns for arguments, options, and styling
  5. Command Breakdown - Table summarizing each of the 6 commands
  6. Development Notes - Practical guidance for adding new commands, styling, and handling input
  7. Testing and Validation - Notes on the validation patterns used in the guess command

  The file provides what a future Claude instance would need to understand the codebase quickly without
  having to read through the entire application code, while focusing on patterns and architecture rather than
   listing every detail.

> check 

⏺ Read(CLAUDE.md)
  ⎿  Read 95 lines

⏺ ✓ CLAUDE.md has been successfully created and verified. The file contains:

  - Project overview and context
  - Quick start commands
  - Dependencies
  - Code architecture with detailed explanation of the Typer pattern
  - Command breakdown table
  - Development notes for extending the application
  - Testing and validation information

  The file is ready for future Claude instances to reference when working on this repository.

> what's next? 

⏺ That's up to you! The CLAUDE.md file is now in place for future Claude instances to reference.

  Here are some potential next steps for your project:

  1. Add more commands - Extend the CLI with new features
  2. Create tests - Set up unit tests for your commands (pytest)
  3. Package it - Create a setup.py or pyproject.toml to make it installable
  4. Add configuration - Support config files for default options
  5. Improve the guess game - Add difficulty levels or different modes
  6. Create GitHub Actions - Set up CI/CD workflows
  7. Generate distributable - Build an executable with PyInstaller

  Or if you'd like me to help with something specific on this project, just let me know what you'd like to
  work on!

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
>  
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ? for shortcuts                                                                                    Debug mode
node:events:486
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19)
Emitted 'error' event on TLSSocket instance at:
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:89:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Node.js v25.2.1

MyFiles/Projects/example-project took 51.5s 
➜ claude --version                 
2.0.62 (Claude Code)

And here's the log file:

6b38b9bd-307a-4402-b2f8-97373403df01.txt

Contents of the log file 6b38b9bd-307a-4402-b2f8-97373403df01.txt:

2025-12-09T10:33:22.603Z [DEBUG] Watching for changes in setting files /Users/mahenzon/.claude/settings.json, /Library/Application Support/ClaudeCode/managed-settings.json...
2025-12-09T10:33:22.636Z [DEBUG] [LSP MANAGER] initializeLspServerManager() called
2025-12-09T10:33:22.636Z [DEBUG] [LSP MANAGER] Created manager instance, state=pending
2025-12-09T10:33:22.636Z [DEBUG] [LSP MANAGER] Starting async initialization (generation 1)
2025-12-09T10:33:22.636Z [DEBUG] [LSP SERVER MANAGER] initialize() called
2025-12-09T10:33:22.636Z [DEBUG] [LSP SERVER MANAGER] Calling getAllLspServers()
2025-12-09T10:33:22.641Z [DEBUG] Found 0 plugins (0 enabled, 0 disabled)
2025-12-09T10:33:22.650Z [DEBUG] Total LSP servers loaded: 0
2025-12-09T10:33:22.650Z [DEBUG] [LSP SERVER MANAGER] getAllLspServers returned 0 server(s)
2025-12-09T10:33:22.650Z [DEBUG] LSP manager initialized with 0 servers
2025-12-09T10:33:22.650Z [DEBUG] LSP server manager initialized successfully
2025-12-09T10:33:22.650Z [DEBUG] LSP notification handlers registered successfully for all 0 server(s)
2025-12-09T10:33:22.653Z [DEBUG] Loading skills from directories: managed=/Library/Application Support/ClaudeCode/.claude/skills, user=/Users/mahenzon/.claude/skills, project=/Users/mahenzon/MyFiles/Projects/example-project/.claude/skills
2025-12-09T10:33:22.653Z [DEBUG] >>>>> getPluginSkills CALLED <<<<<
2025-12-09T10:33:22.654Z [DEBUG] Loaded 0 installed plugins from /Users/mahenzon/.claude/plugins/installed_plugins.json (schema version 1)
2025-12-09T10:33:22.664Z [DEBUG] Creating shell snapshot for zsh (/bin/zsh)
2025-12-09T10:33:22.664Z [DEBUG] Looking for shell config file: /Users/mahenzon/.zshrc
2025-12-09T10:33:22.664Z [DEBUG] Snapshots directory: /Users/mahenzon/.claude/shell-snapshots
2025-12-09T10:33:22.664Z [DEBUG] Creating snapshot at: /Users/mahenzon/.claude/shell-snapshots/snapshot-zsh-1765276402664-nf4i1o.sh
2025-12-09T10:33:22.665Z [DEBUG] Shell binary exists: true
2025-12-09T10:33:22.665Z [DEBUG] Execution timeout: 10000ms
2025-12-09T10:33:22.665Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude/todos/6b38b9bd-307a-4402-b2f8-97373403df01-agent-6b38b9bd-307a-4402-b2f8-97373403df01.json.tmp.92153.1765276402665
2025-12-09T10:33:22.673Z [DEBUG] Temp file written successfully, size: 2 bytes
2025-12-09T10:33:22.673Z [DEBUG] Renaming /Users/mahenzon/.claude/todos/6b38b9bd-307a-4402-b2f8-97373403df01-agent-6b38b9bd-307a-4402-b2f8-97373403df01.json.tmp.92153.1765276402665 to /Users/mahenzon/.claude/todos/6b38b9bd-307a-4402-b2f8-97373403df01-agent-6b38b9bd-307a-4402-b2f8-97373403df01.json
2025-12-09T10:33:22.673Z [DEBUG] File /Users/mahenzon/.claude/todos/6b38b9bd-307a-4402-b2f8-97373403df01-agent-6b38b9bd-307a-4402-b2f8-97373403df01.json written atomically
2025-12-09T10:33:22.675Z [DEBUG] getPluginSkills: Processing 0 enabled plugins
2025-12-09T10:33:22.675Z [DEBUG] Total plugin skills loaded: 0
2025-12-09T10:33:22.675Z [DEBUG] Total plugin commands loaded: 0
2025-12-09T10:33:22.675Z [DEBUG] Registered 0 hooks from 0 plugins
2025-12-09T10:33:22.676Z [DEBUG] Loaded 0 unique skills (managed: 0, user: 0, project: 0, duplicates removed: 0)
2025-12-09T10:33:22.677Z [DEBUG] getSkills returning: 0 skill dir commands, 0 plugin skills
2025-12-09T10:33:22.677Z [DEBUG] Total plugin agents loaded: 0
2025-12-09T10:33:22.687Z [DEBUG] Git remote URL: null
2025-12-09T10:33:22.687Z [DEBUG] No git remote URL found
2025-12-09T10:33:22.687Z [DEBUG] Not in a GitHub repository, skipping path mapping update
2025-12-09T10:33:22.705Z [DEBUG] Loaded 0 installed plugins from V2 file at /Users/mahenzon/.claude/plugins/installed_plugins_v2.json
2025-12-09T10:33:22.705Z [DEBUG] Initialized versioned plugins system with 0 plugins
2025-12-09T10:33:22.706Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276402706
2025-12-09T10:33:22.706Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:22.711Z [DEBUG] Temp file written successfully, size: 53747 bytes
2025-12-09T10:33:22.711Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:22.711Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276402706 to /Users/mahenzon/.claude.json
2025-12-09T10:33:22.711Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:22.713Z [DEBUG] Getting matching hook commands for SessionStart with query: startup
2025-12-09T10:33:22.713Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:22.713Z [DEBUG] Matched 0 unique hooks for query "startup" (0 before deduplication)
2025-12-09T10:33:22.736Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276402736
2025-12-09T10:33:22.736Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:22.741Z [DEBUG] Temp file written successfully, size: 53674 bytes
2025-12-09T10:33:22.741Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:22.741Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276402736 to /Users/mahenzon/.claude.json
2025-12-09T10:33:22.742Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:22.745Z [DEBUG] performStartupChecks called
2025-12-09T10:33:22.745Z [DEBUG] Starting background plugin installations
2025-12-09T10:33:22.745Z [DEBUG] performBackgroundPluginInstallations called
2025-12-09T10:33:22.749Z [DEBUG] AutoUpdaterWrapper: Installation type: npm-global
2025-12-09T10:33:22.750Z [DEBUG] Setting installation status: 0 marketplaces, 0 installable plugins, 0 uninstallable plugins
2025-12-09T10:33:22.750Z [DEBUG] Loaded plugins - Enabled: 0, Disabled: 0, Commands: 0, Agents: 0, Errors: 0
2025-12-09T10:33:22.750Z [DEBUG] Ripgrep first use test: PASSED (mode=builtin, path=/opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/vendor/ripgrep/arm64-darwin/rg)
2025-12-09T10:33:22.751Z [DEBUG] Getting matching hook commands for SubagentStart with query: Explore
2025-12-09T10:33:22.752Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:22.752Z [DEBUG] Matched 0 unique hooks for query "Explore" (0 before deduplication)
2025-12-09T10:33:22.753Z [DEBUG] Getting matching hook commands for SubagentStart with query: Plan
2025-12-09T10:33:22.753Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:22.753Z [DEBUG] Matched 0 unique hooks for query "Plan" (0 before deduplication)
2025-12-09T10:33:22.761Z [DEBUG] Skills and commands included in Skill tool:
2025-12-09T10:33:22.761Z [DEBUG] Slash commands included in SlashCommand tool:
2025-12-09T10:33:22.843Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276402843
2025-12-09T10:33:22.844Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:22.849Z [DEBUG] Temp file written successfully, size: 53674 bytes
2025-12-09T10:33:22.849Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:22.849Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276402843 to /Users/mahenzon/.claude.json
2025-12-09T10:33:22.849Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:22.851Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276402851
2025-12-09T10:33:22.851Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:22.858Z [DEBUG] Temp file written successfully, size: 53674 bytes
2025-12-09T10:33:22.858Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:22.858Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276402851 to /Users/mahenzon/.claude.json
2025-12-09T10:33:22.859Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:22.861Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276402861
2025-12-09T10:33:22.861Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:22.866Z [DEBUG] Temp file written successfully, size: 53674 bytes
2025-12-09T10:33:22.866Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:22.866Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276402861 to /Users/mahenzon/.claude.json
2025-12-09T10:33:22.866Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:22.867Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276402867
2025-12-09T10:33:22.868Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:22.872Z [DEBUG] Temp file written successfully, size: 53674 bytes
2025-12-09T10:33:22.872Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:22.872Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276402867 to /Users/mahenzon/.claude.json
2025-12-09T10:33:22.872Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:22.874Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276402874
2025-12-09T10:33:22.874Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:22.880Z [DEBUG] Temp file written successfully, size: 53674 bytes
2025-12-09T10:33:22.880Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:22.880Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276402874 to /Users/mahenzon/.claude.json
2025-12-09T10:33:22.880Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:22.883Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276402883
2025-12-09T10:33:22.883Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:22.887Z [DEBUG] Temp file written successfully, size: 53747 bytes
2025-12-09T10:33:22.887Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:22.887Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276402883 to /Users/mahenzon/.claude.json
2025-12-09T10:33:22.887Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:22.910Z [DEBUG] Shell snapshot created successfully (106720 bytes)
2025-12-09T10:33:24.046Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:24.374Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:24.868Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276404868
2025-12-09T10:33:24.868Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:24.875Z [DEBUG] Temp file written successfully, size: 53747 bytes
2025-12-09T10:33:24.875Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:24.875Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276404868 to /Users/mahenzon/.claude.json
2025-12-09T10:33:24.875Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:25.459Z [DEBUG] Getting matching hook commands for SubagentStop with query: undefined
2025-12-09T10:33:25.459Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:25.459Z [DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
2025-12-09T10:33:26.231Z [DEBUG] AutoUpdaterWrapper: Installation type: npm-global
2025-12-09T10:33:26.673Z [DEBUG] AutoUpdaterWrapper: Installation type: npm-global
2025-12-09T10:33:26.674Z [DEBUG] Metadata string for init:
2025-12-09T10:33:26.674Z [DEBUG] <command-message>init is analyzing your codebase…</command-message>
<command-name>/init</command-name>
2025-12-09T10:33:26.674Z [DEBUG] command-message tags in metadata: 1
2025-12-09T10:33:26.680Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2025-12-09T10:33:26.681Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2025-12-09T10:33:26.681Z [DEBUG] Hooks: Found 0 total hooks in registry
2025-12-09T10:33:26.681Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2025-12-09T10:33:26.695Z [DEBUG] [TeammateMailbox] getTeammateMailboxAttachments called: envAgentName=undefined, isTeamLead=false, resolved agentName=undefined, teamName=undefined
2025-12-09T10:33:26.695Z [DEBUG] [TeammateMailbox] Not checking inbox - not a teammate or team lead
2025-12-09T10:33:26.698Z [DEBUG] processPromptSlashCommand creating 3 messages for init
2025-12-09T10:33:26.698Z [DEBUG] Message 1: <command-message>init is analyzing your codebase…</command-message>
<command-name>/init</command-name>
2025-12-09T10:33:26.698Z [DEBUG] Message 2 [META]: [{"type":"text","text":"Please analyze this codebase and create a CLAUDE.md file, which will be given to future instances of Claude Code to operate in this repository.\n\nWhat to add:\n1. Commands tha
2025-12-09T10:33:26.698Z [DEBUG] Message 3: [ATTACHMENT]
2025-12-09T10:33:26.703Z [DEBUG] Getting matching hook commands for UserPromptSubmit with query: undefined
2025-12-09T10:33:26.703Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:26.703Z [DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
2025-12-09T10:33:26.704Z [DEBUG] FileHistory: Added snapshot for 3a475854-b0bc-47c1-a23a-e41f5771e6e0, tracking 0 files
2025-12-09T10:33:26.705Z [DEBUG] UserCommandMessage rendering: "init is analyzing your codebase…" (args: "none")
2025-12-09T10:33:26.705Z [DEBUG] isSkillFormat: false, prefix: "/"
2025-12-09T10:33:26.713Z [DEBUG] Total plugin output styles loaded: 0
2025-12-09T10:33:27.119Z [DEBUG] Getting matching hook commands for SubagentStop with query: undefined
2025-12-09T10:33:27.119Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:27.119Z [DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
2025-12-09T10:33:27.997Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:29.736Z [DEBUG] executePreToolHooks called for tool: Bash
2025-12-09T10:33:29.736Z [DEBUG] executePreToolHooks called for tool: Glob
2025-12-09T10:33:29.738Z [DEBUG] Getting matching hook commands for PreToolUse with query: Bash
2025-12-09T10:33:29.739Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:29.739Z [DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
2025-12-09T10:33:29.739Z [DEBUG] Getting matching hook commands for PreToolUse with query: Glob
2025-12-09T10:33:29.739Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:29.739Z [DEBUG] Matched 0 unique hooks for query "Glob" (0 before deduplication)
2025-12-09T10:33:29.746Z [DEBUG] tree-sitter: WASM files not found
2025-12-09T10:33:29.760Z [DEBUG] No session environment scripts found
2025-12-09T10:33:29.766Z [DEBUG] Getting matching hook commands for PostToolUse with query: Glob
2025-12-09T10:33:29.766Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:29.766Z [DEBUG] Matched 0 unique hooks for query "Glob" (0 before deduplication)
2025-12-09T10:33:29.782Z [DEBUG] Getting matching hook commands for PostToolUse with query: Bash
2025-12-09T10:33:29.782Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:29.782Z [DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
2025-12-09T10:33:29.786Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2025-12-09T10:33:29.786Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2025-12-09T10:33:29.786Z [DEBUG] Hooks: Found 0 total hooks in registry
2025-12-09T10:33:29.786Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2025-12-09T10:33:29.787Z [DEBUG] [TeammateMailbox] getTeammateMailboxAttachments called: envAgentName=undefined, isTeamLead=false, resolved agentName=undefined, teamName=undefined
2025-12-09T10:33:29.787Z [DEBUG] [TeammateMailbox] Not checking inbox - not a teammate or team lead
2025-12-09T10:33:30.799Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:31.010Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:31.752Z [DEBUG] executePreToolHooks called for tool: Bash
2025-12-09T10:33:31.754Z [DEBUG] Getting matching hook commands for PreToolUse with query: Bash
2025-12-09T10:33:31.754Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:31.754Z [DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
2025-12-09T10:33:31.754Z [DEBUG] executePreToolHooks called for tool: Read
2025-12-09T10:33:31.756Z [DEBUG] Getting matching hook commands for PreToolUse with query: Read
2025-12-09T10:33:31.756Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:31.756Z [DEBUG] Matched 0 unique hooks for query "Read" (0 before deduplication)
2025-12-09T10:33:31.769Z [DEBUG] Getting matching hook commands for PostToolUse with query: Read
2025-12-09T10:33:31.769Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:31.769Z [DEBUG] Matched 0 unique hooks for query "Read" (0 before deduplication)
2025-12-09T10:33:31.784Z [DEBUG] Getting matching hook commands for PostToolUse with query: Bash
2025-12-09T10:33:31.784Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:31.784Z [DEBUG] Matched 0 unique hooks for query "Bash" (0 before deduplication)
2025-12-09T10:33:31.788Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2025-12-09T10:33:31.788Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2025-12-09T10:33:31.788Z [DEBUG] Hooks: Found 0 total hooks in registry
2025-12-09T10:33:31.788Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2025-12-09T10:33:31.790Z [DEBUG] [TeammateMailbox] getTeammateMailboxAttachments called: envAgentName=undefined, isTeamLead=false, resolved agentName=undefined, teamName=undefined
2025-12-09T10:33:31.790Z [DEBUG] [TeammateMailbox] Not checking inbox - not a teammate or team lead
2025-12-09T10:33:32.534Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:33.063Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:33.763Z [DEBUG] executePreToolHooks called for tool: Read
2025-12-09T10:33:33.765Z [DEBUG] Getting matching hook commands for PreToolUse with query: Read
2025-12-09T10:33:33.765Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:33.765Z [DEBUG] Matched 0 unique hooks for query "Read" (0 before deduplication)
2025-12-09T10:33:33.775Z [DEBUG] Getting matching hook commands for PostToolUse with query: Read
2025-12-09T10:33:33.775Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:33.775Z [DEBUG] Matched 0 unique hooks for query "Read" (0 before deduplication)
2025-12-09T10:33:33.779Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2025-12-09T10:33:33.779Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2025-12-09T10:33:33.779Z [DEBUG] Hooks: Found 0 total hooks in registry
2025-12-09T10:33:33.779Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2025-12-09T10:33:33.781Z [DEBUG] [TeammateMailbox] getTeammateMailboxAttachments called: envAgentName=undefined, isTeamLead=false, resolved agentName=undefined, teamName=undefined
2025-12-09T10:33:33.781Z [DEBUG] [TeammateMailbox] Not checking inbox - not a teammate or team lead
2025-12-09T10:33:35.889Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:45.034Z [DEBUG] executePreToolHooks called for tool: Write
2025-12-09T10:33:45.037Z [DEBUG] Getting matching hook commands for PreToolUse with query: Write
2025-12-09T10:33:45.037Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:45.037Z [DEBUG] Matched 0 unique hooks for query "Write" (0 before deduplication)
2025-12-09T10:33:45.043Z [DEBUG] Permission suggestions for Write: [
  {
    "type": "setMode",
    "mode": "acceptEdits",
    "destination": "session"
  }
]
2025-12-09T10:33:45.070Z [DEBUG] executePermissionRequestHooks called for tool: Write
2025-12-09T10:33:45.077Z [DEBUG] Getting matching hook commands for PermissionRequest with query: Write
2025-12-09T10:33:45.077Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:45.077Z [DEBUG] Matched 0 unique hooks for query "Write" (0 before deduplication)
2025-12-09T10:33:46.423Z [DEBUG] FileHistory: Tracked file modification for /Users/mahenzon/MyFiles/Projects/example-project/CLAUDE.md
2025-12-09T10:33:46.430Z [DEBUG] AutoUpdaterWrapper: Installation type: npm-global
2025-12-09T10:33:46.436Z [DEBUG] Writing to temp file: /Users/mahenzon/MyFiles/Projects/example-project/CLAUDE.md.tmp.92153.1765276426436
2025-12-09T10:33:46.445Z [DEBUG] Temp file written successfully, size: 3292 bytes
2025-12-09T10:33:46.445Z [DEBUG] Renaming /Users/mahenzon/MyFiles/Projects/example-project/CLAUDE.md.tmp.92153.1765276426436 to /Users/mahenzon/MyFiles/Projects/example-project/CLAUDE.md
2025-12-09T10:33:46.445Z [DEBUG] File /Users/mahenzon/MyFiles/Projects/example-project/CLAUDE.md written atomically
2025-12-09T10:33:46.452Z [DEBUG] Getting matching hook commands for PostToolUse with query: Write
2025-12-09T10:33:46.452Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:46.453Z [DEBUG] Matched 0 unique hooks for query "Write" (0 before deduplication)
2025-12-09T10:33:46.461Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2025-12-09T10:33:46.461Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2025-12-09T10:33:46.461Z [DEBUG] Hooks: Found 0 total hooks in registry
2025-12-09T10:33:46.461Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2025-12-09T10:33:46.464Z [DEBUG] [TeammateMailbox] getTeammateMailboxAttachments called: envAgentName=undefined, isTeamLead=false, resolved agentName=undefined, teamName=undefined
2025-12-09T10:33:46.464Z [DEBUG] [TeammateMailbox] Not checking inbox - not a teammate or team lead
2025-12-09T10:33:48.165Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:50.284Z [DEBUG] Getting matching hook commands for Stop with query: undefined
2025-12-09T10:33:50.284Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:50.284Z [DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
2025-12-09T10:33:50.303Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276430303
2025-12-09T10:33:50.304Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:50.310Z [DEBUG] Temp file written successfully, size: 53747 bytes
2025-12-09T10:33:50.310Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:50.310Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276430303 to /Users/mahenzon/.claude.json
2025-12-09T10:33:50.310Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:53.657Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2025-12-09T10:33:53.658Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2025-12-09T10:33:53.658Z [DEBUG] Hooks: Found 0 total hooks in registry
2025-12-09T10:33:53.658Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2025-12-09T10:33:53.660Z [DEBUG] [TeammateMailbox] getTeammateMailboxAttachments called: envAgentName=undefined, isTeamLead=false, resolved agentName=undefined, teamName=undefined
2025-12-09T10:33:53.660Z [DEBUG] [TeammateMailbox] Not checking inbox - not a teammate or team lead
2025-12-09T10:33:53.670Z [DEBUG] Getting matching hook commands for UserPromptSubmit with query: undefined
2025-12-09T10:33:53.670Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:53.670Z [DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
2025-12-09T10:33:53.671Z [DEBUG] FileHistory: Making snapshot for message a0be8540-a035-4fd2-be33-34d55f360ca9
2025-12-09T10:33:53.678Z [DEBUG] FileHistory: Added snapshot for a0be8540-a035-4fd2-be33-34d55f360ca9, tracking 1 files
2025-12-09T10:33:53.685Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276433685
2025-12-09T10:33:53.685Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:33:53.690Z [DEBUG] Temp file written successfully, size: 53792 bytes
2025-12-09T10:33:53.691Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:33:53.691Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276433685 to /Users/mahenzon/.claude.json
2025-12-09T10:33:53.692Z [DEBUG] File /Users/mahenzon/.claude.json written atomically
2025-12-09T10:33:54.560Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:55.628Z [DEBUG] Stream started - received first chunk
2025-12-09T10:33:56.470Z [DEBUG] executePreToolHooks called for tool: Read
2025-12-09T10:33:56.472Z [DEBUG] Getting matching hook commands for PreToolUse with query: Read
2025-12-09T10:33:56.472Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:56.472Z [DEBUG] Matched 0 unique hooks for query "Read" (0 before deduplication)
2025-12-09T10:33:56.480Z [DEBUG] Getting matching hook commands for PostToolUse with query: Read
2025-12-09T10:33:56.481Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:33:56.481Z [DEBUG] Matched 0 unique hooks for query "Read" (0 before deduplication)
2025-12-09T10:33:56.484Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2025-12-09T10:33:56.484Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2025-12-09T10:33:56.484Z [DEBUG] Hooks: Found 0 total hooks in registry
2025-12-09T10:33:56.484Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2025-12-09T10:33:56.486Z [DEBUG] [TeammateMailbox] getTeammateMailboxAttachments called: envAgentName=undefined, isTeamLead=false, resolved agentName=undefined, teamName=undefined
2025-12-09T10:33:56.486Z [DEBUG] [TeammateMailbox] Not checking inbox - not a teammate or team lead
2025-12-09T10:33:58.862Z [DEBUG] Stream started - received first chunk
2025-12-09T10:34:00.482Z [DEBUG] Getting matching hook commands for Stop with query: undefined
2025-12-09T10:34:00.482Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:34:00.482Z [DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
2025-12-09T10:34:05.658Z [DEBUG] LSP Diagnostics: getLSPDiagnosticAttachments called
2025-12-09T10:34:05.658Z [DEBUG] LSP Diagnostics: Checking registry - 0 pending
2025-12-09T10:34:05.659Z [DEBUG] Hooks: Found 0 total hooks in registry
2025-12-09T10:34:05.659Z [DEBUG] Hooks: checkForNewResponses returning 0 responses
2025-12-09T10:34:05.662Z [DEBUG] [TeammateMailbox] getTeammateMailboxAttachments called: envAgentName=undefined, isTeamLead=false, resolved agentName=undefined, teamName=undefined
2025-12-09T10:34:05.662Z [DEBUG] [TeammateMailbox] Not checking inbox - not a teammate or team lead
2025-12-09T10:34:05.673Z [DEBUG] Getting matching hook commands for UserPromptSubmit with query: undefined
2025-12-09T10:34:05.673Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:34:05.673Z [DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
2025-12-09T10:34:05.674Z [DEBUG] FileHistory: Making snapshot for message 97aabdf4-3c24-4bcd-b857-ade52e23a725
2025-12-09T10:34:05.674Z [DEBUG] FileHistory: Added snapshot for 97aabdf4-3c24-4bcd-b857-ade52e23a725, tracking 1 files
2025-12-09T10:34:06.614Z [DEBUG] Stream started - received first chunk
2025-12-09T10:34:07.257Z [DEBUG] Stream started - received first chunk
2025-12-09T10:34:12.641Z [DEBUG] Getting matching hook commands for Stop with query: undefined
2025-12-09T10:34:12.641Z [DEBUG] Found 0 hook matchers in settings
2025-12-09T10:34:12.641Z [DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
2025-12-09T10:34:13.684Z [DEBUG] Writing to temp file: /Users/mahenzon/.claude.json.tmp.92153.1765276453684
2025-12-09T10:34:13.684Z [DEBUG] Preserving file permissions: 100644
2025-12-09T10:34:13.690Z [DEBUG] Temp file written successfully, size: 54212 bytes
2025-12-09T10:34:13.691Z [DEBUG] Applied original permissions to temp file
2025-12-09T10:34:13.691Z [DEBUG] Renaming /Users/mahenzon/.claude.json.tmp.92153.1765276453684 to /Users/mahenzon/.claude.json
2025-12-09T10:34:13.692Z [DEBUG] File /Users/mahenzon/.claude.json written atomically

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.0.62 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Looks like #3925

mahenzon avatar Dec 09 '25 10:12 mahenzon

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/3912
  2. https://github.com/anthropics/claude-code/issues/3888
  3. https://github.com/anthropics/claude-code/issues/3918

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Dec 09 '25 10:12 github-actions[bot]

All those issues that the bot found are closed. But the issue is still here and happens on my computer.

mahenzon avatar Dec 09 '25 11:12 mahenzon

I got the same issue. Error: write EPIPE at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19) { errno: -32, code: 'EPIPE', syscall: 'write' }

jaderyang-sms avatar Dec 10 '25 06:12 jaderyang-sms

@jaderyang-sms @mahenzon I got the same issue repeatable. but when I change another vpn/network, it disappered, you can try change the network.

alingse avatar Dec 10 '25 14:12 alingse

Same. Randomly crashes after ~5-10 messages in the convo. Error:

  ⏵⏵ accept edits on (shift+tab to cycle)
node:events:486
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:87:19)
Emitted 'error' event on TLSSocket instance at:
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Node.js v24.7.0
~/c/c/cloud-go/iam/activeprobes "trunk" ❯ claude --version                          4m 16s
2.0.69 (Claude Code)
~/c/c/cloud-go/iam/activeprobes "trunk" ❯ 

VeryBigSad avatar Dec 15 '25 11:12 VeryBigSad