claude-code - 💡(How to fix) Fix [Feature Request] Scope Insights tool to specific project/directory [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#49025Fetched 2026-04-17 08:52:56
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Error Message

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/tommadden/.local/share/claude/versions/2.1.104 (expected in multi-process scenarios)\n at Tc_ (/$bunfs/root/src/entrypoints/cli.js:2836:2153)\n at Se6 (/$bunfs/root/src/entrypoints/cli.js:2836:1233)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:20:58.255Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:22:08.134Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:22:10.856Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:36:53.346Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:36:56.289Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:37:00.616Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:57:16.939Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:57:16.939Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T22:06:33.689Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T22:06:33.689Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n at emit (node:events:92:22)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T13:19:32.896Z"},{"error":"Error: 1P event logging: 22 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T13:19:32.898Z"},{"error":"AxiosError: Request failed with status code 404\n at eg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12750)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:865:50)\n at processTicksAndRejections (native:7:39)\n at request (…

Code Example

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/tommadden/.local/share/claude/versions/2.1.104 (expected in multi-process scenarios)\n    at Tc_ (/$bunfs/root/src/entrypoints/cli.js:2836:2153)\n    at Se6 (/$bunfs/root/src/entrypoints/cli.js:2836:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:20:58.255Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:22:08.134Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:22:10.856Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:36:53.346Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:36:56.289Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:37:00.616Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n    at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:57:16.939Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n    at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:57:16.939Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n    at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T22:06:33.689Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n    at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T22:06:33.689Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T13:19:32.896Z"},{"error":"Error: 1P event logging: 22 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T13:19:32.898Z"},{"error":"AxiosError: Request failed with status code 404\n    at eg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12750)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (
RAW_BUFFERClick to expand / collapse

Bug Description I think it owuld be a great addition if the Insights tool could be scoped to a specific project/directory rather than it applying to all sessions

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.104
  • Feedback ID: 8cbcb2cc-87e2-4fb8-9f77-907aa5adb0f9

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/tommadden/.local/share/claude/versions/2.1.104 (expected in multi-process scenarios)\n    at Tc_ (/$bunfs/root/src/entrypoints/cli.js:2836:2153)\n    at Se6 (/$bunfs/root/src/entrypoints/cli.js:2836:1233)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:20:58.255Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:22:08.134Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:22:10.856Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:36:53.346Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:36:56.289Z"},{"error":"MaxFileReadTokenExceededError: File content (15721 tokens) exceeds maximum allowed tokens (10000). 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 kY7 (/$bunfs/root/src/entrypoints/cli.js:4449:12671)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:37:00.616Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n    at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:57:16.939Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n    at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T21:57:16.939Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n    at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T22:06:33.689Z"},{"error":"Error: Failed to fetch version from https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/latest: Request failed with status code 429\n    at EU1 (/$bunfs/root/src/entrypoints/cli.js:2834:5253)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-13T22:06:33.689Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:13352)\n    at emit (node:events:92:22)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:112:3321)\n    at request (/$bunfs/root/src/entrypoints/cli.js:115:2467)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T13:19:32.896Z"},{"error":"Error: 1P event logging: 22 events failed to export (code=ECONNABORTED, timeout of 10000ms exceeded)\n    at queueFailedEvents (/$bunfs/root/src/entrypoints/cli.js:422:2574)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-15T13:19:32.898Z"},{"error":"AxiosError: Request failed with status code 404\n    at eg (/$bunfs/root/src/entrypoints/cli.js:108:1194)\n    at <anonymous> (/$bunfs/root/src/entrypoints/cli.js:113:12750)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:865:50)\n    at processTicksAndRejections (native:7:39)\n    at request (…

Note: Content was truncated.

extent analysis

TL;DR

The issue seems to be related to multiple errors, including lock acquisition failures, max file read token exceeded errors, and request failures, but the primary concern is enhancing the Insights tool to scope to a specific project/directory.

Guidance

  1. Review Error Messages: The provided error messages indicate issues such as lock acquisition failures, max file read token exceeded, and request failures. It's essential to address these errors to ensure the stability of the application.
  2. Insights Tool Enhancement: To enhance the Insights tool, consider implementing a feature to scope the tool to a specific project or directory. This could involve modifying the tool's configuration or developing a new parameter to specify the scope.
  3. Error Handling: Improve error handling to prevent the application from crashing due to these errors. This could involve implementing retries for failed requests, handling max file read token exceeded errors by reading files in chunks, and resolving lock acquisition issues by implementing a more robust locking mechanism.

Example

No specific code example can be provided without more context about the application's codebase. However, when addressing the max file read token exceeded error, you might consider reading files in chunks, like so:

const fs = require('fs');

// Example of reading a file in chunks
fs.readFile('path/to/your/file', { encoding: 'utf8' }, (err, data) => {
  if (err) {
    console.error(err);
    return;
  }
  // Process the data in chunks if it's too large
  const chunkSize = 10000; // Adjust based on your needs
  for (let i = 0; i < data.length; i += chunkSize) {
    const chunk = data.slice(i, i + chunkSize);
    // Process the chunk
  }
});

Notes

  • The provided issue content is truncated, which might limit the ability to provide a comprehensive solution.
  • The errors listed seem unrelated to the enhancement request for the Insights tool, suggesting multiple issues are being reported simultaneously.

Recommendation

Apply a workaround by focusing on enhancing the Insights tool to scope to a specific project/directory, and separately, address each of the errors reported to improve the application's stability and performance. This approach allows for incremental improvements without waiting for a comprehensive fix for all issues.

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