claude-code - 💡(How to fix) Fix [Bug] Claude Code not following claude.md directives and authorization guidelines [2 comments, 3 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#48060Fetched 2026-04-15 06:34:24
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×2

Error Message

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at FH6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1960:34078)","timestamp":"2026-04-14T11:33:59.625Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at FH6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1960:34078)\n at async V (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:6238:11676)","timestamp":"2026-04-14T11:34:01.008Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at FH6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1960:34078)\n at async T (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:6238:10881)","timestamp":"2026-04-14T11:34:01.009Z"},{"error":"MaxFileReadTokenExceededError: File content (12456 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 ULK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4666:12262)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async QLK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4670:2638)\n at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4675:7235)\n at async hMY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3954:8327)","timestamp":"2026-04-14T11:37:14.997Z"},{"error":"MaxFileReadTokenExceededError: File content (21374 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 ULK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4666:12262)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async QLK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4670:2638)\n at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4675:7235)\n at async hMY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3954:8327)","timestamp":"2026-04-14T11:37:38.648Z"},{"error":"MaxFileReadTokenExceededError: File content (12456 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 ULK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4666:12262)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async QLK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4670:2638)\n at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4675:7235)\n at async hMY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3954:8327)","timestamp":"2026-04-14T11:40:04.837Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n at iN.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:116:13080)\n at iN.emit (node:events:508:28)\n at Timeout._onTimeout (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:115:3292)\n at listOnTimeout (node:internal/timers:605:17)\n at process.processTimers (node:internal/timers:541:7)\n at qQ6.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:118:2450)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async tC1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:509:3704)","timestamp":"2026-04-14T12:48:17.058Z"},{"error":"Error: Request was aborted.\n at ZS8 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1549:12493)\n at ZS8.next (<anonymous>)\n at seK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8156:9174)\n at seK.next (<anonymous>)\n at q65 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8161:12395)\n at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8156:8063\n a…

Code Example

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FH6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1960:34078)","timestamp":"2026-04-14T11:33:59.625Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FH6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1960:34078)\n    at async V (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:6238:11676)","timestamp":"2026-04-14T11:34:01.008Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FH6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1960:34078)\n    at async T (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:6238:10881)","timestamp":"2026-04-14T11:34:01.009Z"},{"error":"MaxFileReadTokenExceededError: File content (12456 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 ULK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4666:12262)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async QLK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4670:2638)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4675:7235)\n    at async hMY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3954:8327)","timestamp":"2026-04-14T11:37:14.997Z"},{"error":"MaxFileReadTokenExceededError: File content (21374 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 ULK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4666:12262)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async QLK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4670:2638)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4675:7235)\n    at async hMY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3954:8327)","timestamp":"2026-04-14T11:37:38.648Z"},{"error":"MaxFileReadTokenExceededError: File content (12456 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 ULK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4666:12262)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async QLK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4670:2638)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4675:7235)\n    at async hMY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3954:8327)","timestamp":"2026-04-14T11:40:04.837Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at iN.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:116:13080)\n    at iN.emit (node:events:508:28)\n    at Timeout._onTimeout (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:115:3292)\n    at listOnTimeout (node:internal/timers:605:17)\n    at process.processTimers (node:internal/timers:541:7)\n    at qQ6.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:118:2450)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async tC1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:509:3704)","timestamp":"2026-04-14T12:48:17.058Z"},{"error":"Error: Request was aborted.\n    at ZS8 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1549:12493)\n    at ZS8.next (<anonymous>)\n    at seK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8156:9174)\n    at seK.next (<anonymous>)\n    at q65 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8161:12395)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8156:8063\n    a…
RAW_BUFFERClick to expand / collapse

Bug Description esta muito ruim, nao segue as diretrizes, faz coisas sem sentido, pede autorizacao e ja faz. nao esta seguindo o claude.md

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.107
  • Feedback ID: 0830ecd3-fde5-4059-82bd-da05e0ac39c8

Errors

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FH6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1960:34078)","timestamp":"2026-04-14T11:33:59.625Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FH6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1960:34078)\n    at async V (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:6238:11676)","timestamp":"2026-04-14T11:34:01.008Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at FH6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1960:34078)\n    at async T (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:6238:10881)","timestamp":"2026-04-14T11:34:01.009Z"},{"error":"MaxFileReadTokenExceededError: File content (12456 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 ULK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4666:12262)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async QLK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4670:2638)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4675:7235)\n    at async hMY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3954:8327)","timestamp":"2026-04-14T11:37:14.997Z"},{"error":"MaxFileReadTokenExceededError: File content (21374 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 ULK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4666:12262)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async QLK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4670:2638)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4675:7235)\n    at async hMY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3954:8327)","timestamp":"2026-04-14T11:37:38.648Z"},{"error":"MaxFileReadTokenExceededError: File content (12456 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 ULK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4666:12262)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async QLK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4670:2638)\n    at async Object.call (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:4675:7235)\n    at async hMY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3954:8327)","timestamp":"2026-04-14T11:40:04.837Z"},{"error":"AxiosError: timeout of 5000ms exceeded\n    at iN.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:116:13080)\n    at iN.emit (node:events:508:28)\n    at Timeout._onTimeout (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:115:3292)\n    at listOnTimeout (node:internal/timers:605:17)\n    at process.processTimers (node:internal/timers:541:7)\n    at qQ6.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:118:2450)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async tC1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:509:3704)","timestamp":"2026-04-14T12:48:17.058Z"},{"error":"Error: Request was aborted.\n    at ZS8 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1549:12493)\n    at ZS8.next (<anonymous>)\n    at seK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8156:9174)\n    at seK.next (<anonymous>)\n    at q65 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8161:12395)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:8156:8063\n    a…

Note: Content was truncated.

extent analysis

TL;DR

Set the GITHUB_PERSONAL_ACCESS_TOKEN environment variable to resolve the mcp-config-invalid error.

Guidance

  • The error messages indicate a missing GITHUB_PERSONAL_ACCESS_TOKEN environment variable, which is required for the MCP server to function correctly.
  • To fix this, set the GITHUB_PERSONAL_ACCESS_TOKEN environment variable before running the application.
  • Additionally, the MaxFileReadTokenExceededError suggests that the file being read exceeds the maximum allowed tokens; consider using offset and limit parameters to read specific portions of the file.
  • The AxiosError: timeout of 5000ms exceeded error may be related to network issues or server timeouts; check the server status and network connectivity.

Example

No code example is provided as the issue is related to environment variable configuration and file reading limits.

Notes

The provided error messages are truncated, which may limit the ability to provide a comprehensive solution. However, setting the GITHUB_PERSONAL_ACCESS_TOKEN environment variable should resolve the primary error.

Recommendation

Apply the workaround by setting the GITHUB_PERSONAL_ACCESS_TOKEN environment variable, as this is the most direct solution to the primary error reported.

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