claude-code - 💡(How to fix) Fix [Bug] Claude Code consumes excessive tokens for local filesystem operations available via Google Drive sync [1 comments, 2 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#45088Fetched 2026-04-09 08:13:34
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/casa/.local/share/claude/versions/2.1.92 (expected in multi-process scenarios)\n at im_ (/$bunfs/root/src/entrypoints/cli.js:1884:2153)\n at An6 (/$bunfs/root/src/entrypoints/cli.js:1884:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T15:43:22.447Z"},{"error":"Error: ripgrep exited with code null\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:537:2729)\n at emit (node:events:98:22)\n at #maybeClose (node:child_process:766:16)\n at #handleOnExit (node:child_process:520:72)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T15:44:41.199Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/casa.\n at call (/$bunfs/root/src/entrypoints/cli.js:4303:7610)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T15:45:31.876Z"},{"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 Py1 (/$bunfs/root/src/entrypoints/cli.js:1882:15046)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T16:29:29.390Z"},{"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 Py1 (/$bunfs/root/src/entrypoints/cli.js:1882:15046)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T16:29:29.390Z"},{"error":"Error: 1P event logging: 3 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…

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/casa/.local/share/claude/versions/2.1.92 (expected in multi-process scenarios)\n    at im_ (/$bunfs/root/src/entrypoints/cli.js:1884:2153)\n    at An6 (/$bunfs/root/src/entrypoints/cli.js:1884:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T15:43:22.447Z"},{"error":"Error: ripgrep exited with code null\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:537:2729)\n    at emit (node:events:98:22)\n    at #maybeClose (node:child_process:766:16)\n    at #handleOnExit (node:child_process:520:72)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T15:44:41.199Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/casa.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4303:7610)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T15:45:31.876Z"},{"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 Py1 (/$bunfs/root/src/entrypoints/cli.js:1882:15046)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T16:29:29.390Z"},{"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 Py1 (/$bunfs/root/src/entrypoints/cli.js:1882:15046)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T16:29:29.390Z"},{"error":"Error: 1P event logging: 3 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…
RAW_BUFFERClick to expand / collapse

Bug Description opération triviale (création dossiers Google Drive)", body: "Bonjour,\n\nClaude Code (Opus 4.6) a consommé environ 10 000 tokens et 10+ minutes pour créer 7 dossiers sur Google Drive — une opération qui prend 1 seconde à un humain ou à Claude Desktop.\n\nProblèmes constatés :\n\n1. gws drive files create ignore le champ "name" (crée des "Untitled") — Claude n'a pas détecté le bug immédiatement et a tenté 3 approches différentes avant de trouver --json\n\n2. gdrive-upload avait un token OAuth expiré — Claude a tenté de l'utiliser quand même au lieu de basculer directement\n\n3. Google Drive est synchronisé localement sur le Mac — Claude aurait dû créer les dossiers en local (mkdir) dès le départ. 1 commande, 0 token API.\n\n4. Claude Desktop fait la même chose en moins de 1 seconde via MCP\n\nLe coût en tokens pour cette opération triviale est inacceptable. L'agent devrait :\n- Vérifier l'accès local avant d'utiliser des API\n- Détecter les bugs d'outils rapidement (1 essai, pas 5)\n- Privilégier la solution la plus simple\n\nEnvironnement : Claude Code CLI, macOS, Opus 4.6 (1M context)\nSession : pricing dynamique LCD\n\nCordialement,\nThibault Casabianca\[email protected]\n+33 6 63 03 90 89")

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.92
  • Feedback ID: 82b3afbe-a760-40c0-a49c-c4038fc0b321

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/casa/.local/share/claude/versions/2.1.92 (expected in multi-process scenarios)\n    at im_ (/$bunfs/root/src/entrypoints/cli.js:1884:2153)\n    at An6 (/$bunfs/root/src/entrypoints/cli.js:1884:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T15:43:22.447Z"},{"error":"Error: ripgrep exited with code null\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:537:2729)\n    at emit (node:events:98:22)\n    at #maybeClose (node:child_process:766:16)\n    at #handleOnExit (node:child_process:520:72)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T15:44:41.199Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/casa.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4303:7610)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T15:45:31.876Z"},{"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 Py1 (/$bunfs/root/src/entrypoints/cli.js:1882:15046)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T16:29:29.390Z"},{"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 Py1 (/$bunfs/root/src/entrypoints/cli.js:1882:15046)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-07T16:29:29.390Z"},{"error":"Error: 1P event logging: 3 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…

Note: Content was truncated.

extent analysis

TL;DR

The issue can be mitigated by optimizing the approach to creating folders on Google Drive, prioritizing local creation and verifying access before using APIs.

Guidance

  1. Verify local access: Before using Google Drive APIs, check if the agent can create folders locally to avoid unnecessary API calls.
  2. Detect tool bugs quickly: Implement a mechanism to detect bugs in tools like gws drive files create and gdrive-upload to prevent repeated attempts and wasted tokens.
  3. Prioritize simple solutions: Favor the most straightforward approach, such as using mkdir for local folder creation, to reduce token consumption.
  4. Check OAuth token expiration: Ensure that OAuth tokens used by gdrive-upload are valid and handle expiration by refreshing or renewing them as needed.

Example

No specific code example can be provided without modifying the existing implementation, but the approach should involve checking local access and handling potential errors in tool interactions.

Notes

The provided information suggests issues with the current implementation, including inefficient use of APIs and failure to detect bugs promptly. Addressing these concerns should improve performance and reduce token consumption.

Recommendation

Apply workaround: Optimize the folder creation process by prioritizing local creation and improving error handling for tool interactions to reduce token consumption and improve efficiency. This approach addresses the immediate issues without requiring a version upgrade or significant changes to the existing infrastructure.

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] Claude Code consumes excessive tokens for local filesystem operations available via Google Drive sync [1 comments, 2 participants]