[Feature Request] Add safeguards to reduce token waste from repeated agent errors

Resolved 💬 3 comments Opened Mar 25, 2026 by rpinales Closed Mar 29, 2026

Bug Description
I am expending a lot of my money in tokens trying to prevent the agent from messing things up. We keep having recurring problems.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.83
  • Feedback ID: ea9d4ef6-c0fb-4c38-9c85-2744589f3432

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/richardpinales/.local/share/claude/versions/2.1.83 (expected in multi-process scenarios)\n    at ibT (/$bunfs/root/src/entrypoints/cli.js:2735:2168)\n    at Zcq (/$bunfs/root/src/entrypoints/cli.js:2735:1326)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T16:04:47.329Z"},{"error":"Error: Failed to delete keychain entry\n    at XS6 (/$bunfs/root/src/entrypoints/cli.js:415:51938)\n    at async SS6 (/$bunfs/root/src/entrypoints/cli.js:416:698)\n    at async jMq (/$bunfs/root/src/entrypoints/cli.js:416:596)\n    at async Qr_ (/$bunfs/root/src/entrypoints/cli.js:2712:2202)\n    at async E1_ (/$bunfs/root/src/entrypoints/cli.js:2736:5409)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:2757:2735)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T16:04:56.573Z"},{"error":"Error: Failed to delete keychain entry\n    at XS6 (/$bunfs/root/src/entrypoints/cli.js:415:51938)\n    at async SS6 (/$bunfs/root/src/entrypoints/cli.js:416:698)\n    at async I2q (/$bunfs/root/src/entrypoints/cli.js:415:65080)\n    at async x2q (/$bunfs/root/src/entrypoints/cli.js:393:49696)\n    at async E1_ (/$bunfs/root/src/entrypoints/cli.js:2736:6234)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:2757:2735)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T16:04:57.782Z"},{"error":"Error: 1P event logging: 17 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-03-25T16:20:42.931Z"},{"error":"Error: {\"message\":\"Failed to export 17 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 17 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:2681:27375)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:138:85511)\n    at mP4 (/$bunfs/root/src/entrypoints/cli.js:138:86055)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:139:17366)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T16:20:42.931Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: timeout of 30000ms exceeded\n    at dh$ (/$bunfs/root/src/entrypoints/cli.js:2733:2084)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T17:48:47.436Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: timeout of 30000ms exceeded\n    at dh$ (/$bunfs/root/src/entrypoints/cli.js:2733:2084)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T17:48:47.437Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: timeout of 30000ms exceeded\n    at dh$ (/$bunfs/root/src/entrypoints/cli.js:2733:2084)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T18:18:47.336Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: timeout of 30000ms exceeded\n    at dh$ (/$bunfs/root/src/entrypoints/cli.js:2733:2084)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T18:18:47.337Z"}]

View original on GitHub ↗

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