[Bug] Agent teammate process crashes on startup with TypeError "Line number must start from 1"

Status Fixed / completed
Reported on v2.1.119
Maintainer reply None cached
Activity 3 comments · opened Apr 28, 2026 · closed Apr 29, 2026

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" />

View original on GitHub ↗

3 Comments

github-actions[bot] · 5 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/53200
  2. https://github.com/anthropics/claude-code/issues/53894

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

abhinas90 · 5 months ago

Hit the same TypeError when spinning up subagents in a multi-agent deployment. Root cause for us was that the teammate process expected argv[1] to be a JSON blob but the parent process was passing a stringified object with unescaped newlines in the system_prompt field.

Two workarounds that unblocked us:

  • Base64-wrap the init payload instead of passing raw JSON on the command line. Eliminates all newline/quote escaping issues.
  • Add a --teammate-init-file flag to read the config from a temp file rather than argv. This is what we ended up shipping in production.

We documented the full subagent bootstrap pattern in Multi-Agent Deployment Pro — includes the base64 wrapper and a health-check retry loop so crashed teammates auto-restart within 5s.

Hope this unblocks you.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.