claude-code - 💡(How to fix) Fix [Bug] /clear command incorrectly reports token savings when session usage is low [1 comments, 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#45516Fetched 2026-04-09 08:03:36
View on GitHub
Comments
1
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3commented ×1

Error Message

[{"error":"Error: 1P event logging: 3 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:424:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:424:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T01:52:57.120Z"},{"error":"Error: {"message":"Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)","originalLine":"424","originalColumn":"1668","line":"424","column":"1668","sourceURL":"/$bunfs/root/src/entrypoints/cli.js","stack":"Error: Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\n at doExport (/$bunfs/root/src/entrypoints/cli.js:424:1668)\n at processTicksAndRejections (native:7:39)","name":"Error"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1829:4366)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:36796)\n at IJ4 (/$bunfs/root/src/entrypoints/cli.js:418:37340)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:419:19103)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T01:52:57.120Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:47.127Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:47.127Z"},{"error":"Error: 1P event logging: 3 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:424:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:424:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:57.125Z"},{"error":"Error: {"message":"Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)","originalLine":"424","originalColumn":"1668","line":"424","column":"1668","sourceURL":"/$bunfs/root/src/entrypoints/cli.js","stack":"Error: Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\n at doExport (/$bunfs/root/src/entrypoints/cli.js:424:1668)\n at processTicksAndRejections (native:7:39)","name":"Error"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1829:4366)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:36796)\n at IJ4 (/$bunfs/root/src/entrypoints/cli.js:418:37340)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:419:19103)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:57.125Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:52:47.136Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:52:47.136Z"},{"error":"Error: 1P event logging: 3 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:424:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:424:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:52:57.137Z"},{"error":"Error: {"message":"Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)","originalLine":"424","originalColumn":"1668","line":"424","column":"1668","sourceURL":"/$bunfs/root/src/entrypoints/cli.js","stack":"Error: Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\n at doExport (/$bunfs/root/src/entrypoints/cli.js:424:1668)\n at processTicksAndRejections (native:7:39)","name":"Error"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1829:4366)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:…

Code Example

[{"error":"Error: 1P event logging: 3 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:424:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:424:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T01:52:57.120Z"},{"error":"Error: {\"message\":\"Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\",\"originalLine\":\"424\",\"originalColumn\":\"1668\",\"line\":\"424\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:424:1668)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:1829:4366)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:36796)\n    at IJ4 (/$bunfs/root/src/entrypoints/cli.js:418:37340)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:419:19103)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T01:52:57.120Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:47.127Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:47.127Z"},{"error":"Error: 1P event logging: 3 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:424:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:424:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:57.125Z"},{"error":"Error: {\"message\":\"Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\",\"originalLine\":\"424\",\"originalColumn\":\"1668\",\"line\":\"424\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:424:1668)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:1829:4366)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:36796)\n    at IJ4 (/$bunfs/root/src/entrypoints/cli.js:418:37340)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:419:19103)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:57.125Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:52:47.136Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n    at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:52:47.136Z"},{"error":"Error: 1P event logging: 3 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:424:2574)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:424:1516)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:52:57.137Z"},{"error":"Error: {\"message\":\"Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\",\"originalLine\":\"424\",\"originalColumn\":\"1668\",\"line\":\"424\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:424:1668)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:1829:4366)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:
RAW_BUFFERClick to expand / collapse

Bug Description wrong /clear suggestion about token reduce for new task it says Iwould prevent 400k token but the session is at 18%

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.89
  • Feedback ID: a4d7898d-9ee1-447a-b099-2209295037df
<!-- Uploading "image.png"... —> **Errors** ```json [{"error":"Error: 1P event logging: 3 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:424:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:424:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T01:52:57.120Z"},{"error":"Error: {\"message\":\"Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\",\"originalLine\":\"424\",\"originalColumn\":\"1668\",\"line\":\"424\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\\n at doExport (/$bunfs/root/src/entrypoints/cli.js:424:1668)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1829:4366)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:36796)\n at IJ4 (/$bunfs/root/src/entrypoints/cli.js:418:37340)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:419:19103)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T01:52:57.120Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:47.127Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:47.127Z"},{"error":"Error: 1P event logging: 3 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:424:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:424:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:57.125Z"},{"error":"Error: {\"message\":\"Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\",\"originalLine\":\"424\",\"originalColumn\":\"1668\",\"line\":\"424\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\\n at doExport (/$bunfs/root/src/entrypoints/cli.js:424:1668)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1829:4366)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:418:36796)\n at IJ4 (/$bunfs/root/src/entrypoints/cli.js:418:37340)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:419:19103)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:22:57.125Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:52:47.136Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: ECONNREFUSED\n at TZ1 (/$bunfs/root/src/entrypoints/cli.js:1889:14943)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:52:47.136Z"},{"error":"Error: 1P event logging: 3 events failed to export (code=ECONNREFUSED, ECONNREFUSED)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:424:2574)\n at async doExport (/$bunfs/root/src/entrypoints/cli.js:424:1516)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-06T02:52:57.137Z"},{"error":"Error: {\"message\":\"Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\",\"originalLine\":\"424\",\"originalColumn\":\"1668\",\"line\":\"424\",\"column\":\"1668\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 3 events (code=ECONNREFUSED, ECONNREFUSED)\\n at doExport (/$bunfs/root/src/entrypoints/cli.js:424:1668)\\n at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n at error (/$bunfs/root/src/entrypoints/cli.js:1829:4366)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:… ``` **Note:** Content was truncated.

extent analysis

TL;DR

Check network connectivity and server availability for the specified URLs, as the errors indicate a connection refusal (ECONNREFUSED).

Guidance

  1. Verify Network Connectivity: Ensure that the network connection is stable and allows access to the specified URLs, such as https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest.
  2. Check Server Status: Confirm that the servers hosting the resources (e.g., Google Storage) are operational and not experiencing downtime or maintenance.
  3. Review Firewall and Proxy Settings: If applicable, inspect firewall rules and proxy settings to ensure they are not blocking the connection to the required URLs.
  4. Inspect Application Logs: Further analyze the application logs for any patterns or additional error messages that could indicate the root cause of the connection issues.

Example

No specific code example can be provided without more context on the application's codebase, but checking network connectivity can be done using command-line tools like curl or ping for the specified URLs.

Notes

The provided error messages suggest a network connectivity issue (ECONNREFUSED) rather than an application logic error. The truncated content might contain additional clues, but based on the available information, focusing on network and server availability is the most direct approach.

Recommendation

Apply a workaround by checking and ensuring stable network connectivity and server availability before attempting to use the application or service again. This approach addresses the immediate issue indicated by the error messages.

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

claude-code - 💡(How to fix) Fix [Bug] /clear command incorrectly reports token savings when session usage is low [1 comments, 1 participants]