Problem#
The Claude adapter passed the thread-scoped T3 Code MCP bearer token inline in --mcp-config. Process arguments are readable by every local user (ps -axo command) and are routinely captured by agents, monitoring tools, and logs. Anyone holding the token could call the session's orchestrator MCP tools while the session lived, and on a server bound to a LAN address the endpoint is reachable from the network.
Fix#
The --mcp-config header is now the placeholder ${T3_CODE_MCP_AUTHORIZATION}. The token goes into the Claude child process's environment, which only its owner can read, and the Claude CLI expands the placeholder when it connects. This matches how the ACP adapter already handles the token (T3_ACP_MCP_AUTHORIZATION).
- Verified against the real
claude CLI (2.1.293): a local HTTP server received the expanded Bearer <token> header.
- Rotating the token still restarts the live query, because the reuse key includes the environment value.
- Codex is unaffected: it receives MCP config over the app-server JSON-RPC connection, not argv.
Tests: ClaudeAdapterV2.test.ts now asserts that the token is absent from mcpServers (the argv-bound part) and present in the child environment.
Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code
Closes #10020
Closes #16028
Approvability#
Verdict: Not approved
Macroscope's review found this PR not approvable — This production change alters how Claude MCP authorization credentials cross the CLI process boundary, moving them from inline configuration into the child environment and changing query identity handling. The security-sensitive credential transport and dependency on CLI variable expansion warrant human review.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).