Uncaught exception: write EPIPE when exiting CLI
@naymurdev đang làm issue này rồi.
Từ ngày 20/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Run the
cmdCLI in a codebase directory. - Ask it to make changes to the codebase (edit files, apply a change, etc.).
- When the CLI finishes/exits, the uncaught
write EPIPEcrash occurs inWritable.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.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 4k
- Fork
- 350
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CommandCodeAI/command-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CommandCodeAI/command-code#855 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CommandCodeAI/command-code#841 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CommandCodeAI/command-code#655 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CommandCodeAI/command-code#608 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
CommandCodeAI/command-code#893 ·