claude-code - 💡(How to fix) Fix [Bug] Agent teammate process crashes on startup with TypeError "Line number must start from 1" [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#54261Fetched 2026-04-29 06:32:01
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Author
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 f2H (/$bunfs/root/src/entrypoints/cli.js:2738:30496)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T05:47:10.858Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at f2H (/$bunfs/root/src/entrypoints/cli.js:2738:30496)\n at async G (/$bunfs/root/src/entrypoints/cli.js:6296:11019)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T05:47:15.946Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at f2H (/$bunfs/root/src/entrypoints/cli.js:2738:30496)\n at async v (/$bunfs/root/src/entrypoints/cli.js:6296:11825)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T05:47:15.947Z"}]

Code Example

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at f2H (/$bunfs/root/src/entrypoints/cli.js:2738:30496)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T05:47:10.858Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at f2H (/$bunfs/root/src/entrypoints/cli.js:2738:30496)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6296:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T05:47:15.946Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at f2H (/$bunfs/root/src/entrypoints/cli.js:2738:30496)\n    at async v (/$bunfs/root/src/entrypoints/cli.js:6296:11825)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T05:47:15.947Z"}]
RAW_BUFFERClick to expand / collapse

Bug Description Agent teammate process crashes on startup with TypeError "Line number must start from 1" in cli.js (createInstance → Yo8). Repro: TeamCreate + Agent spawn in tmux with teammateMode "tmux". Crashes consistently within first 30s of teammate's first turn before any user-facing output. Started 2026-04-26.

Environment Info

  • Platform: linux
  • Terminal: tmux
  • Version: 2.1.119
  • Feedback ID: 46300f7e-ba02-48dd-8594-c27ebeb654e3

Errors

[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at f2H (/$bunfs/root/src/entrypoints/cli.js:2738:30496)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T05:47:10.858Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at f2H (/$bunfs/root/src/entrypoints/cli.js:2738:30496)\n    at async G (/$bunfs/root/src/entrypoints/cli.js:6296:11019)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T05:47:15.946Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n    at f2H (/$bunfs/root/src/entrypoints/cli.js:2738:30496)\n    at async v (/$bunfs/root/src/entrypoints/cli.js:6296:11825)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-28T05:47:15.947Z"}]
<img width="2435" height="1346" alt="Image" src="https://github.com/user-attachments/assets/253b144d-db48-4e63-a67f-718bf15fdc9e" />

extent analysis

TL;DR

Set the GITHUB_PERSONAL_ACCESS_TOKEN environment variable to resolve the "Missing environment variables" error.

Guidance

  • The error messages indicate a missing GITHUB_PERSONAL_ACCESS_TOKEN environment variable, which is required for the MCP server to function correctly.
  • Verify that the environment variable is set before starting the teammate process.
  • Check the documentation for the correct format and scope of the GITHUB_PERSONAL_ACCESS_TOKEN.
  • Consider setting the environment variable in the tmux configuration or in a separate environment file to ensure it is set consistently.

Notes

The provided image does not contain any relevant information for debugging the issue. The error messages are consistent and point to a missing environment variable, which is the most likely cause of the problem.

Recommendation

Apply workaround: Set the GITHUB_PERSONAL_ACCESS_TOKEN environment variable to resolve the error. This is the most straightforward solution based on the provided error messages.

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