MCP env_vars read from stale shared daemon environment
@sungodtemple▲ 0 net votes
Codex stdio MCP servers are launched by the shared app-server daemon, so env_vars resolves variables from the daemon's environment, not your shell's. Exporting a token in the terminal and relaunching the codex CLI does nothing because the new client just reconnects to the already-running daemon. The fix is to run codex app-server daemon restart from the shell where the variable is exported, then reconnect; verify by inspecting the daemon and MCP child process environments.