CommandCodeAI / CommandCodeAI/command-code

Uncaught exception: write EPIPE when exiting CLI

オープン
#716 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

@naymurdev がすでに取り組んでいます。

2026年8月20日 から。

windows
主要言語
言語のデータがありません
スター
4k
フォーク
350
PR マージ指標
30日以内にマージされた PR はありません

説明

Summary

The CLI crashes with an uncaught write EPIPE exception during normal use — while using the command-code CLI to make changes to a codebase — and exits instead of finishing gracefully.

Expected Behavior

The CLI should handle EPIPE gracefully (e.g. exit cleanly without a stack trace) when the output pipe/socket is closed by the reader, and complete its work.

Actual Behavior

While using the CLI to make changes to a codebase, the process crashes with a CRITICAL uncaught exception:

✖ CRITICAL: Uncaught Exception!
  This is an unexpected error. Please file a bug report at
  https://github.com/CommandCodeAI/command-code/issues/new
  ✖ ERROR → Error
  ℹ REASON → write EPIPE
  ℹ ERROR STACK ↓
   Error: write EPIPE
      at afterWriteDispatched (node:internal/stream_base_commons:159:15)
      at writeGeneric (node:internal/stream_base_commons:150:3)
      at Socket._writeGeneric (node:net:966:11)
      at Socket._write (node:net:978:8)
      at writeOrBuffer (node:internal/streams/writable:570:12)
      at _write (node:internal/streams/writable:499:10)
      at Writable.end (node:internal/streams/writable:821:17)
      at Socket.end (node:net:737:31)
      at file:///home/ultimatum/.nvm/versions/node/v24.13.0/lib/node_modules/command-code/dist/cli.mjs:2:19182
      at new Promise (<anonymous>)

  ℹ Trace ID: 144418bdf5fae64c987ae6f3a84b9d8b

Steps to reproduce the issue

  1. Run the cmd CLI in a codebase directory.
  2. Ask it to make changes to the codebase (edit files, apply a change, etc.).
  3. When the CLI finishes/exits, the uncaught write EPIPE crash occurs in Writable.end / Socket.end (dist/cli.mjs).

Command Code Version

1.28.4

Operating System

Linux (WSL2, kernel 6.18.33.2-microsoft-standard-WSL2)

Terminal/IDE

Terminal (default shell)

Shell

zsh

Additional context

  • Node: v24.13.0 (via nvm)
  • EPIPE occurs when the reader of the socket has gone away; suggest ignoring EPIPE on the final write/end and exiting cleanly.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。