[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
Workaround ✓ Mentioned in thread ↓
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" />
3 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Hit the same
TypeErrorwhen spinning up subagents in a multi-agent deployment. Root cause for us was that the teammate process expectedargv[1]to be a JSON blob but the parent process was passing a stringified object with unescaped newlines in thesystem_promptfield.Two workarounds that unblocked us:
--teammate-init-fileflag 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.
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.