[Bug] Claude Code repeatedly requests permissions and forgets environment variables across sessions

Resolved 💬 4 comments Opened Apr 20, 2026 by Malc75 Closed Jun 11, 2026

Bug Description
Whenever tests are run I need to use environment variables. Claude keeps forgetting this. I am also prompted to give permission for grepping results for tests. It makes it impossible to be AFK and leave it running. I've asked claude to asjust permissions but it keeps asking. Also it has taken well over an hour and used lots of extra tokens to change a few files. This exprerience feels a lot worse than a few weeks back. I was 100% taken with Claude code but am starting to have second thoughts.

Environment Info

  • Platform: darwin
  • Terminal: intellij
  • Version: 2.1.81
  • Feedback ID: 5a3a44de-dd4c-4c5f-bac5-36f184d5654b

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/malcolm.titchmarsh/.local/share/claude/versions/2.1.81 (expected in multi-process scenarios)\n    at TET (/$bunfs/root/src/entrypoints/cli.js:2724:2174)\n    at fgq (/$bunfs/root/src/entrypoints/cli.js:2724:1318)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-19T06:29:51.962Z"},{"error":"Error: Request was aborted.\n    at w0T (/$bunfs/root/src/entrypoints/cli.js:1907:8297)\n    at next (native:1:11)\n    at B29 (/$bunfs/root/src/entrypoints/cli.js:7276:7438)\n    at next (native:1:11)\n    at c29 (/$bunfs/root/src/entrypoints/cli.js:7281:10008)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T12:59:48.743Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:79:13364)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:78:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:81:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T13:27:57.065Z"},{"error":"Error: {\"message\":\"Operation timed out.\",\"originalLine\":\"138\",\"originalColumn\":\"156250\",\"line\":\"138\",\"column\":\"156250\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Operation timed out.\\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:138:156250)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:2670:27423)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:138:85385)\n    at pz4 (/$bunfs/root/src/entrypoints/cli.js:138:85929)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:139:16930)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T13:27:57.114Z"},{"error":"Error: 1P event logging: 11 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:397:2687)\n    at async doExport (/$bunfs/root/src/entrypoints/cli.js:397:1559)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T13:27:57.166Z"},{"error":"Error: {\"message\":\"Failed to export 11 events (code=ECONNABORTED, timeout of 10000ms exceeded)\",\"originalLine\":\"397\",\"originalColumn\":\"1710\",\"line\":\"397\",\"column\":\"1710\",\"sourceURL\":\"/$bunfs/root/src/entrypoints/cli.js\",\"stack\":\"Error: Failed to export 11 events (code=ECONNABORTED, timeout of 10000ms exceeded)\\n    at doExport (/$bunfs/root/src/entrypoints/cli.js:397:1710)\\n    at processTicksAndRejections (native:7:39)\",\"name\":\"Error\"}\n    at error (/$bunfs/root/src/entrypoints/cli.js:2670:27423)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:138:85385)\n    at pz4 (/$bunfs/root/src/entrypoints/cli.js:138:85929)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:139:17366)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T13:27:57.171Z"},{"error":"MaxFileReadTokenExceededError: File content (35805 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at gT9 (/$bunfs/root/src/entrypoints/cli.js:4312:23670)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T14:06:04.924Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:244:3940)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T14:52:42.618Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaFEamk4XbFEtr3AiTS13\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:205:286312)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:244:5435)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-20T15:09:33.300Z"},{"…

Note: Content was truncated.

View original on GitHub ↗

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