Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseCode / SDK · ActionableGitLab Blog→ original

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 and GitLab: From Code to Production in Three Stages
Source: GitLab Blog. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceGitLab Blog ↗
Editor-in-Chief
Key metric #1Reads requirements from the issue via MCP
Key metric #2Implements the change with all the details in mind
Key metric #3Creates an MR that closes the issue on merge
Codex and GitLab: From Code to Production in Three Stages
Featured Video / Demo
Click to load the embedded player (privacy-enhanced youtube-nocookie mode) or read the full breakdown below.Watch on YouTube ↗

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.

Story

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.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Free · Waitlist · Hermes + DeepSeek

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.

Join the waitlist →Nomad AI Workspace
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — Codex and GitLab: From Code to Production in Three Stages https://news.hamidun.com/en/news/9823/codex-and-gitlab-from-code-to-production-in-three-stages

What do you think?
Loading comments…