Codex and GitLab: From Code to Production in Three Stages
Codex writes code in the terminal quickly, but that is only half the job. GitLab adds context: requirements from an issue via MCP, collaboration in a merge request, a CI/CD pipeline and human approval. The article walks through three scenarios: a local fix, a fix driven by requirements, and help with code review.
AI-processed from GitLab Blog; edited by Hamidun News
Codex is an AI agent for coding in the terminal. It writes code, runs tests and commits to a branch, all quickly. But writing code is only the first step. After that you need a task, a pull request, CI/CD, code review and a human decision on merge. GitLab helps connect Codex's speed with the context production requires.
Codex locally: from bug to code
The first scenario runs in the terminal. In the Tanuki IoT Platform project, there is a WebSocket bug: filtering metrics by type does not work. You describe the task to Codex, and it analyzes the Rust code, finds the missing metric parameter, adds the filtering and writes tests. After you review the result, Codex creates a branch, commits and pushes. GitLab CI checks Rust style and runs the tests. The change is ready to merge.
Here the agent works with the repository and a local AGENTS.md file, which describes what a good implementation looks like.
GitLab MCP: requirements context
The second scenario adds depth. Codex can now pull information from a GitLab issue via MCP (Model Context Protocol). Issue #32 lists the requirements: tests, documentation and updates are needed. Instead of copying everything into the prompt, you simply ask Codex to "help implement issue 32", and it loads the requirements directly from GitLab.
Now the fix accounts not only for the technical solution but also for business requirements. Codex creates a pull request with an automatic "Closes #32":
- Reads requirements from the issue via MCP
- Implements the change with all the details in mind
- Creates an MR that closes the issue on merge
- Links the code to the requirements
- Makes the agent part of the delivery workflow
This is no longer local coding but participation in the delivery process.
An external agent in the merge request
The third scenario is the most interesting. Code review points out problems: documentation and error-case tests are missing. You mention Codex in an MR comment (@ai-codex-agent), and the agent now works in the context of the pull request. It sees the diff, the feedback, the CI results and the approvals. Codex adds documentation, writes the missing tests, commits and runs the checks. It then posts a reply back in the MR.
The merge request becomes the central surface: the code is here, the review is here, the agent helps here, and the human approves here.
What this means
Coding has become fast, but speed without context is an assembly line of patches. When the agent sees requirements (from the issue) and collaboration (from the MR), the result is meaningful work. It joins the speed of code with the context of production: the agent works fast, and the human makes the decisions.
- Dec 2, 2026Ai2 Releases MolmoWeb2 Web Agents: 27B Model Solves 75.3% of Tasks
- Dec 2, 2026Amazon Releases Ergo Open Weights for Coding: 1.1 Trillion Parameters and 2,200 Tokens per Second
- Dec 2, 2026OpenAI Opens Dots Agent to ChatGPT Plus Subscribers With 10,000+ Plugins
- Dec 2, 2026FSK Group Has Launched 395 AI Agents in Six Months, with a 97.7% Success Rate
Key Questions Answered
What are the key details on Codex locally: from bug to code?
The first scenario runs in the terminal. In the Tanuki IoT Platform project, there is a WebSocket bug: filtering metrics by type does not work. You describe the task to Codex, and it analyzes the Rust code, finds the missing metric parameter, adds the filtering and writes tests. After you review the result, Codex creates a branch, commits and pushes. GitLab CI checks Rust style and runs the tests. The change is ready to merge.
What are the key details on GitLab MCP: requirements context?
The second scenario adds depth. Codex can now pull information from a GitLab issue via MCP (Model Context Protocol). Issue #32 lists the requirements: tests, documentation and updates are needed. Instead of copying everything into the prompt, you simply ask Codex to "help implement issue 32", and it loads the requirements directly from GitLab. Now the fix accounts not only for the technical solution but also for business requirements.
What are the key details on An external agent in the merge request?
The third scenario is the most interesting. Code review points out problems: documentation and error-case tests are missing. You mention Codex in an MR comment (@ai-codex-agent), and the agent now works in the context of the pull request. It sees the diff, the feedback, the CI results and the approvals. Codex adds documentation, writes the missing tests, commits and runs the checks. It then posts a reply back in the MR.
Free 2-Day Vibecoding & AI Agents Intensive
Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.

