Agent host GitLab MCP returns 401 when using a Codex subscription in VS Code 1.138
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
## Description
VS Code 1.138 introduced support for using a Codex subscription in the Agent Host:
https://code.visualstudio.com/updates/v1_138#_expanded-codex-support-in-the-agent-host
When I use VS Code Chat with a Codex subscription, requests to the GitLab MCP server fail with an HTTP 401 Unauthorized error.
The same GitLab MCP server works correctly with Codex CLI and the Codex Desktop app.
## Steps to Reproduce
1. Install VS Code 1.138.
2. Enable Codex support in the Agent Host.
3. Sign in to VS Code Chat using a Codex subscription.
4. Configure the GitLab MCP server.
5. Start a Codex session in VS Code Chat.
6. Ask Codex to use the GitLab MCP server, for example, to list GitLab repositories or issues.
## Actual Behavior
The request to the GitLab MCP server fails with:
```text
401 Unauthorized
```
The MCP server cannot be used from the VS Code Codex session.
## Expected Behavior
The GitLab MCP server should authenticate successfully and process the request.
## Comparison
The same GitLab MCP server works correctly in:
- Codex CLI
- Codex Desktop
The GitLab credentials and token are valid, and the MCP server is reachable.
## Environment
- VS Code: 1.138.0
- Commit: `7debcd0e2acdea1c52de81bf9ee1620444407dda`
- OS: `Windows_NT x64 10.0.22621`
- Electron: `42.10.0`
- Electron Build ID: `15109253`
- Chromium: `148.0.7778.280`
- Node.js: `24.18.1`
- V8: `14.8.178.38-electron.0`
- GitHub Copilot extension: `1.0.84-4`
- GitHub Copilot SDK: `1.0.13`
- MCP server: GitLab MCP
- Subscription: Codex / ChatGPT subscription
Contributor guide
Assessment
This issue has not been assessed yet.