[Bug] Tmux teammates not inheriting API key environment variables from parent session
Bug Description
I am using the tmux teammate mode and my main team lead is on api billing
from setting the environtmen variable to the appropriate api key. however,
when the team lead starts tmux teammates, they are set to max subscription. I
can change this by exit the teammate and resubmitting the command
prepended with the appropriate environment variable change and &&. However,
the team lead claims they have no ability to do this themselves when
creating the team so i must do it manually. why do the teammates not inherit
the environment variable setting of the team lead? and why can't the team
lead prepend the necessary command / environment variable update to the
command that starts the agent in the tmux pane? this is a large pain point
for us who need to use different api keys for different projects for billing
purposes. I tried to submit from the main session this was happening in but the /feedback command kept giving Could not submit feedback. Please try again later.
Environment Info
- Platform: linux
- Terminal: windows-terminal
- Version: 2.1.98
- Feedback ID: 8a7e4359-33ff-467e-af70-1a713686a780
Errors
[{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at uj6 (file:///home/a/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1728:34078)","timestamp":"2026-04-10T01:15:44.890Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at uj6 (file:///home/a/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1728:34078)\n at async G (file:///home/a/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:6169:10566)","timestamp":"2026-04-10T01:15:46.388Z"},{"error":"Error: Plugin MCP server error - mcp-config-invalid: MCP server github invalid: Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN\n at uj6 (file:///home/a/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1728:34078)\n at async T (file:///home/a/.nvm/versions/node/v23.11.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:6169:11336)","timestamp":"2026-04-10T01:15:46.402Z"}]This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗