[BUG] his is a Node.js socket error (write EOF) occurring in Claude Code itself. This error typically happens when Claude Code tries to write data to a connection that has already been closed or terminated unexpectedly.

Resolved 💬 4 comments Opened Nov 11, 2025 by x0143426 Closed Jan 19, 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?

I am seeing this error in claude ⏵⏵ accept edits on (alt+m to cycle)
node:events:495
throw er; // Unhandled 'error' event
^

Error: write EOF
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4095,
code: 'EOF',
syscall: 'write'
}

Node.js v18.20.8

● This is a Node.js socket error (write EOF) occurring in Claude Code itself. This error typically happens when Claude Code tries to write data to a
connection that has already been closed or terminated unexpectedly.
I am using Claude :
Claude Code v2.0.37

What Should Happen?

It should not throw error message.

Error Messages/Logs

I am seeing this error in claude ⏵⏵ accept edits on (alt+m to cycle)
node:events:495
      throw er; // Unhandled 'error' event
      ^

Error: write EOF
    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -4095,
  code: 'EOF',
  syscall: 'write'
}

Node.js v18.20.8

Steps to Reproduce

I am seeing this error in claude ⏵⏵ accept edits on (alt+m to cycle)
node:events:495
throw er; // Unhandled 'error' event
^

Error: write EOF
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
Emitted 'error' event on Socket instance at:
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4095,
code: 'EOF',
syscall: 'write'
}

Node.js v18.20.8

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.34

Claude Code Version

Claude Code v2.0.37

Platform

AWS Bedrock

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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