claude-code - 💡(How to fix) Fix [Bug] Claude Code corrupts source files with sed command, causing token waste on recovery [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46070Fetched 2026-04-11 06:29:46
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×5

Error Message

[{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/victorlee/Desktop/Yggdrasil/Odin/frontend_odin/src/shared/ui/unitComponents/badges'\n at N4H (/$bunfs/root/src/entrypoints/cli.js:3867:14841)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T00:59:10.943Z"},{"error":"Error: 1P event logging: 31 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:05.519Z"},{"error":"Error: {"message":"Failed to export 31 events (code=ECONNABORTED, timeout of 10000ms exceeded)","originalLine":"422","originalColumn":"1668","line":"422","column":"1668","sourceURL":"/$bunfs/root/src/entrypoints/cli.js","stack":"Error: Failed to export 31 events (code=ECONNABORTED, timeout of 10000ms exceeded)\n at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\n at processTicksAndRejections (native:7:39)","name":"Error"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1827:4371)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n at L04 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:05.519Z"},{"error":"Error: 1P event logging: 1 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:21.417Z"},{"error":"Error: {"message":"Failed to export 1 events (code=ECONNREFUSED, ECONNREFUSED)","originalLine":"422","originalColumn":"1668","line":"422","column":"1668","sourceURL":"/$bunfs/root/src/entrypoints/cli.js","stack":"Error: Failed to export 1 events (code=ECONNREFUSED, ECONNREFUSED)\n at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\n at processTicksAndRejections (native:7:39)","name":"Error"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1827:4371)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n at L04 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:21.417Z"},{"error":"Error: 1P event logging: 22 events failed to export (code=FailedToOpenSocket, Was there a typo in the url or port?)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:06:52.449Z"},{"error":"Error: {"message":"Failed to export 22 events (code=FailedToOpenSocket, Was there a typo in the url or port?)","originalLine":"422","originalColumn":"1668","line":"422","column":"1668","sourceURL":"/$bunfs/root/src/entrypoints/cli.js","stack":"Error: Failed to export 22 events (code=FailedToOpenSocket, Was there a typo in the url or port?)\n at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\n at processTicksAndRejections (native:7:39)","name":"Error"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1827:4371)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n at L04 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:06:52.449Z"},{"error":"Error: 1P event logging: 4 events failed to export (code=FailedToOpenSocket, Was there a typo in the url or port?)\n …

Code Example

[{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/victorlee/Desktop/Yggdrasil/Odin/frontend_odin/src/shared/ui/unitComponents/badges'\n    at N4H (/$bunfs/root/src/entrypoints/cli.js:3867:14841)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T00:59:10.943Z"},{"error":"Error: 1P event logging: 31 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:05.519Z"},{"error":"Error: {\"message\":\"Failed to export 31 events (code=ECONNABORTED, timeout of 10000ms exceeded)\",\"originalLine\":\"422\",\"originalColumn\":\"1668\",\"line\":\"422\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 31 events (code=ECONNABORTED, timeout of 10000ms exceeded)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:1827:4371)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n    at L04 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:05.519Z"},{"error":"Error: 1P event logging: 1 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:21.417Z"},{"error":"Error: {\"message\":\"Failed to export 1 events (code=ECONNREFUSED, ECONNREFUSED)\",\"originalLine\":\"422\",\"originalColumn\":\"1668\",\"line\":\"422\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 1 events (code=ECONNREFUSED, ECONNREFUSED)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:1827:4371)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n    at L04 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:21.417Z"},{"error":"Error: 1P event logging: 22 events failed to export (code=FailedToOpenSocket, Was there a typo in the url or port?)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:06:52.449Z"},{"error":"Error: {\"message\":\"Failed to export 22 events (code=FailedToOpenSocket, Was there a typo in the url or port?)\",\"originalLine\":\"422\",\"originalColumn\":\"1668\",\"line\":\"422\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 22 events (code=FailedToOpenSocket, Was there a typo in the url or port?)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:1827:4371)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n    at L04 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:06:52.449Z"},{"error":"Error: 1P event logging: 4 events failed to export (code=FailedToOpenSocket, Was there a typo in the url or port?)\n …
RAW_BUFFERClick to expand / collapse

Bug Description - 세션 ID: d09cf298-5916-4cef-8f4e-2338aebf7512
- 발생 일시: 2026-04-10
- 사고 요약: Claude Code가 sed 명령어로 source 파일을 0바이트로 만든 후 transcript 복구에 추가 토큰 소요

Environment Info

  • Platform: darwin
  • Terminal: intellij
  • Version: 2.1.96
  • Feedback ID: 81eea9c1-a4c9-47e6-bec9-48b92d0434ed

Errors

[{"error":"Error: EISDIR: illegal operation on a directory, read '/Users/victorlee/Desktop/Yggdrasil/Odin/frontend_odin/src/shared/ui/unitComponents/badges'\n    at N4H (/$bunfs/root/src/entrypoints/cli.js:3867:14841)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T00:59:10.943Z"},{"error":"Error: 1P event logging: 31 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:05.519Z"},{"error":"Error: {\"message\":\"Failed to export 31 events (code=ECONNABORTED, timeout of 10000ms exceeded)\",\"originalLine\":\"422\",\"originalColumn\":\"1668\",\"line\":\"422\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 31 events (code=ECONNABORTED, timeout of 10000ms exceeded)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:1827:4371)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n    at L04 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:05.519Z"},{"error":"Error: 1P event logging: 1 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:422:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:21.417Z"},{"error":"Error: {\"message\":\"Failed to export 1 events (code=ECONNREFUSED, ECONNREFUSED)\",\"originalLine\":\"422\",\"originalColumn\":\"1668\",\"line\":\"422\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 1 events (code=ECONNREFUSED, ECONNREFUSED)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:1827:4371)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n    at L04 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:04:21.417Z"},{"error":"Error: 1P event logging: 22 events failed to export (code=FailedToOpenSocket, Was there a typo in the url or port?)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:06:52.449Z"},{"error":"Error: {\"message\":\"Failed to export 22 events (code=FailedToOpenSocket, Was there a typo in the url or port?)\",\"originalLine\":\"422\",\"originalColumn\":\"1668\",\"line\":\"422\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 22 events (code=FailedToOpenSocket, Was there a typo in the url or port?)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:422:1668)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:1827:4371)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:417:36794)\n    at L04 (/$bunfs/root/src/entrypoints/cli.js:417:37338)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:19103)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-10T01:06:52.449Z"},{"error":"Error: 1P event logging: 4 events failed to export (code=FailedToOpenSocket, Was there a typo in the url or port?)\n …

Note: Content was truncated.

extent analysis

TL;DR

Check the URL and port configuration for event logging to resolve the "FailedToOpenSocket" error.

Guidance

  • Verify the URL and port used for event logging are correct and properly formatted.
  • Check the network connection and firewall settings to ensure they are not blocking the connection.
  • Review the error logs to identify any patterns or common issues related to event logging.
  • Consider increasing the timeout value (currently 10000ms) to allow for longer connection attempts.

Example

No specific code example is provided due to the lack of detailed implementation information in the issue.

Notes

The provided error logs indicate issues with event logging, including "ECONNREFUSED" and "FailedToOpenSocket" errors, suggesting a problem with the connection to the logging endpoint. The "Was there a typo in the url or port?" message in some errors hints at a potential configuration issue.

Recommendation

Apply a workaround by checking and correcting the URL and port configuration for event logging to resolve the connection issues. This should help mitigate the errors related to event logging failures.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING