[Bug] Claude Code reading .env files despite gitignore exclusion

Resolved 💬 3 comments Opened Mar 4, 2026 by darrylhuffman Closed Mar 7, 2026

Bug Description
it just looked at my .env. it should not be able to do that. It's in my gitignore and everything. if this is not patched i will stop using claude.

Environment Info

  • Platform: win32
  • Terminal: windows-terminal
  • Version: 2.1.63
  • Feedback ID: d92f8f62-efb2-45d5-87cb-6e46ff1ec9c6

Errors

[{"error":"Error: 1P event logging: 37 events failed to export (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\n    at queueFailedEvents (B:/~BUN/root/claude.exe:6275:2403)\n    at async doExport (B:/~BUN/root/claude.exe:6275:1310)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-04T03:38:02.412Z"},{"error":"Error: {\"message\":\"Failed to export 37 events (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\",\"originalLine\":\"6275\",\"originalColumn\":\"1462\",\"line\":\"6275\",\"column\":\"1462\",\"sourceURL\":\"B:/~BUN/root/claude.exe\",\"stack\":\"Error: Failed to export 37 events (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\\n    at doExport (B:/~BUN/root/claude.exe:6275:1462)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (B:/~BUN/root/claude.exe:2421:25029)\n    at <anonymous> (B:/~BUN/root/claude.exe:118:92465)\n    at kM0 (B:/~BUN/root/claude.exe:118:93009)\n    at <anonymous> (B:/~BUN/root/claude.exe:119:17366)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-04T03:38:02.412Z"},{"error":"Error: 1P event logging: 54 events failed to export (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\n    at queueFailedEvents (B:/~BUN/root/claude.exe:6275:2403)\n    at async doExport (B:/~BUN/root/claude.exe:6275:1310)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-04T03:38:13.947Z"},{"error":"Error: {\"message\":\"Failed to export 54 events (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\",\"originalLine\":\"6275\",\"originalColumn\":\"1462\",\"line\":\"6275\",\"column\":\"1462\",\"sourceURL\":\"B:/~BUN/root/claude.exe\",\"stack\":\"Error: Failed to export 54 events (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\\n    at doExport (B:/~BUN/root/claude.exe:6275:1462)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (B:/~BUN/root/claude.exe:2421:25029)\n    at <anonymous> (B:/~BUN/root/claude.exe:118:92465)\n    at kM0 (B:/~BUN/root/claude.exe:118:93009)\n    at <anonymous> (B:/~BUN/root/claude.exe:119:17366)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-04T03:38:13.947Z"},{"error":"Error: 1P event logging: 4 events failed to export (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\n    at queueFailedEvents (B:/~BUN/root/claude.exe:6275:2403)\n    at async doExport (B:/~BUN/root/claude.exe:6275:1310)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-04T03:38:29.497Z"},{"error":"Error: {\"message\":\"Failed to export 4 events (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\",\"originalLine\":\"6275\",\"originalColumn\":\"1462\",\"line\":\"6275\",\"column\":\"1462\",\"sourceURL\":\"B:/~BUN/root/claude.exe\",\"stack\":\"Error: Failed to export 4 events (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\\n    at doExport (B:/~BUN/root/claude.exe:6275:1462)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (B:/~BUN/root/claude.exe:2421:25029)\n    at <anonymous> (B:/~BUN/root/claude.exe:118:92465)\n    at kM0 (B:/~BUN/root/claude.exe:118:93009)\n    at <anonymous> (B:/~BUN/root/claude.exe:119:17366)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-04T03:38:29.497Z"},{"error":"Error: 1P event logging: 1 events failed to export (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\n    at queueFailedEvents (B:/~BUN/root/claude.exe:6275:2403)\n    at async doExport (B:/~BUN/root/claude.exe:6275:1310)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-04T03:39:29.690Z"},{"error":"Error: {\"message\":\"Failed to export 1 events (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\",\"originalLine\":\"6275\",\"originalColumn\":\"1462\",\"line\":\"6275\",\"column\":\"1462\",\"sourceURL\":\"B:/~BUN/root/claude.exe\",\"stack\":\"Error: Failed to export 1 events (status=429, code=ERR_BAD_REQUEST, Request failed with status code 429)\\n    at doExport (B:/~BUN/root/claude.exe:6275:1462)\\n    at processTicksAndRejections (native:7:39)…

Note: Content was truncated.

View original on GitHub ↗

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