Back to Explore
NewsVibeFix editorialUpdated Nov 21, 2026

JetBrains brings Codex and Claude Code into CI: a new TeamCity plugin lets builds do the work themselves

JetBrains released the experimental TeamCity AI Agents plugin on 16 November 2026: a build can start Codex or Claude Code to review code, analyse failures, and update docs. Keys are issued only for the build, and token usage plus a full trajectory are archived with it. Experimental — try it on a low-risk build first.

Two developers reviewing code together on monitors in a bright office, one pointing at the screen

In short: JetBrains invites Codex and Claude Code into CI — but don't put it on your release pipeline yet

On 16 November 2026, JetBrains announced an experimental AI Agents plugin for TeamCity on the TeamCity blog: a build can now start the Codex or Claude Code command-line agents, so jobs like code review, failed-build analysis, and documentation updates happen inside the pipeline. The plugin installs from JetBrains Marketplace onto the TeamCity server. Note its status: experimental, with JetBrains saying features may change. Treat it as a public trial, not a finished feature.

One honest note on sourcing: the official blog post "Run AI Agents in TeamCity" returned a 403 when we tried to open it directly during drafting. The facts in this article come from a full read of an independent write-up that follows the official post step by step (installation, the five connection types, token statistics, trajectory formats), cross-checked against two other independent write-ups from 16 November that confirm the date and the core facts. The official blog link is still listed in sources, and the publisher can retry it before release. The evidence grade is therefore B; see evidence.md.

The plugin does not solve "can you run an agent in CI?" — you could, and plenty of teams already did, with a shell script and a secret sitting on a build machine. It solves "who manages it afterwards?": how the key stays off the machine, how much tokens cost, and what the agent actually did. Those three things used to require hand-rolled scripts and conventions. Now they live in TeamCity settings, where an administrator can see and audit them. That is the real selling point.

The four jobs the plugin takes over

According to the official post, the plugin takes over four things people used to do by hand. First, installing the agent: when a build starts, the plugin checks whether the chosen CLI client is on the build agent and installs it if it is missing. No more preparing each machine by hand or pre-installing CLI tools in images. Second, connecting to the model provider: the provider's key is stored as a TeamCity connection at project level, not written into build scripts or stuffed into a build machine's environment variables. Third, short-lived credentials: the build agent receives the key only while the build runs and loses it when the build ends. This is the most important part of the design, and the security section below explains why. Fourth, bookkeeping: token usage and a full record of the agent's run are saved with the build.

The agent itself is called in a deliberately ordinary way: a plain Command Line build step that runs the codex or claude command with a prompt. The official post's example prompt asks the agent to summarize the repository; the actual task can be anything — reviewing code, analyzing a failure, updating docs. There is no new DSL to learn, no new configuration language; anyone who has written a build step can use it. That ordinariness is intentional: the plugin only handles getting the agent safely into the build; the prompt decides what it does.

Two agents can be selected today: Codex and Claude Code. Behind them, five kinds of connection are accepted: JetBrains Air, OpenAI, Anthropic, LiteLLM, and OpenRouter. The last two are gateways, which makes the range of usable models much wider than the connection list itself — a team that already routes model traffic through a gateway does not have to change course. An Air connection asks for a service account client ID and client secret, and each team can have its own service account, so usage and spending are split per team. For companies where several teams share one TeamCity instance, that detail matters more than it sounds: costs only get owned when they can be attributed to a team.

Three steps to connect: connection, build feature, prompt

The official post describes three steps. First, create the connection: under Project Settings, open Connections, pick the provider, and enter its credentials. Second, add the build feature: in the build configuration, add the AI Agent build feature, choose Codex or Claude Code, then choose the connection. Third, write the prompt: create a Command Line step that calls the agent with the task. When the build runs, the plugin locates or installs the client and writes its configuration, and the agent works through the prompt.

The real trial starts after those three steps. JetBrains suggests a feedback loop: run the agent in CI, pull the trajectories of several builds with the TeamCity CLI, study them with a local coding agent, improve the prompt, and run again. That advice is worth noting — it assumes the first prompt will not be very good, and that tuning prompts is part of everyday use, not a one-time setup. Treat it as a "set and forget" feature and it will disappoint; treat it as work to be tuned inside CI and it matches its experimental nature.

One premise is easy to miss: the tokens are billed by whichever model provider you connect; JetBrains does not charge for that part. Whether the plugin itself is free now or charged later, the official post does not say. For budgeting, that means the cost sits on the OpenAI, Anthropic, or gateway bill, not on a JetBrains price list. Decide which budget it comes from before the trial, not when the month-end bill arrives with no owner.

The books: token statistics and trajectories you can chart like build time

The plugin publishes token usage as standard TeamCity statistical values: prompt, completion, cached, and total tokens. Because they are ordinary statistics, they can be charted over time like build duration or test counts. How much an agent spent in a single build is visible at a glance, and a sudden jump in spending is easy to spot. That was the hardest thing to do with the old shell-script approach — usage was scattered through logs nobody reads every day.

More important than the token statistics is the trajectory. The plugin stores the agent's full record — the messages it sent, the tools it called — in two formats: an HTML version for people to read, and a JSON version for scripts that compare many runs. The files are kept as hidden build artifacts in the .teamcity/ai-agents/ folder. To view the HTML report from the build results page, add a report tab under Project Settings, Report Tabs, with .teamcity/ai-agents/trajectory.html as the start page. The JSON version matters for scale: pull trajectories from many builds and compare them, and you can see whether a prompt change actually made the agent better, instead of guessing.

Together, the two solve a management problem: when an agent works in CI, who is responsible when something goes wrong, and how do you review it afterwards? The old answer was "go read the logs"; now there is at least a structured record and chartable usage. The catch is that someone has to actually look. Trajectory files do not turn into improvements by themselves, and statistics curves do not turn into budget control by themselves. The tool provides visibility; the discipline still has to come from the team.

How the TeamCity AI Agents plugin works: after a build starts, the plugin installs or locates the agent, issues a short-lived key, a Command Line step calls Codex or Claude Code to do the task, and token statistics plus the trajectory are archived with the build. Five connections are supported: JetBrains Air, OpenAI, Anthropic, LiteLLM, OpenRouter

Security deserves the closest read

The biggest risk of putting an agent in CI is not that it writes bad code — it is that it holds a key, can read the repository, and can run commands. The plugin's short-lived credentials address exactly that: the key exists on the build agent only during the build, and is revoked when the build ends. Build agents are usually shared across tasks, so a long-lived key left on one is open to every build that runs afterwards. Recent campaigns stealing CI secrets have shown how much attackers want the secrets pipelines hold. Short-lived credentials shrink the exposure window from "always" to "one build". The risk gets smaller, not zero.

Two reasons it is not zero. First, during the build, the agent can still read the repository and run commands, and if the prompt mixes in untrusted text — say, the description of an outside pull request — the agent can be steered into doing things beyond the prompt. That is prompt injection, moved from a chat box into the pipeline. Second, the trajectory artifacts the plugin saves can contain prompts, source code, and model output, and JetBrains itself warns to limit who can open them. Trajectories exist for review and audit, but with loose permissions they become another way for source code to leak.

So the pragmatic starting point is: begin with read-only tasks such as repository summaries and failed-build analysis; keep tasks involving outside PR text out for now; set trajectory access to the minimum scope; and watch the token statistics curve from day one. An experimental plugin plus those four rules is a setup you can trial with confidence. Hooking it straight onto a release pipeline, letting the agent change code on every commit and push automatically, is not trialling a feature — it is experimenting on production.

How to pick among the five connections: follow your model bill

The five connection types look like technical options, but they are really billing options. Teams already calling OpenAI or Anthropic directly should pick the matching connection — the key is the API key they already have, and the token bill stays on the existing account. Teams already using LiteLLM or OpenRouter as a gateway get more from the gateway connection: model routing, rate limits, and usage statistics all live at the gateway layer, so the TeamCity plugin does not have to rebuild them, and switching models later means changing gateway configuration, not build configuration. Teams choosing JetBrains Air go through JetBrains' own service-account system, which splits usage per team by design — a good fit for companies where several teams share one TeamCity instance and want the bill split cleanly.

One easy trap: pick the wrong connection and changing it later costs more than swapping a key. Direct and gateway connections differ in billing, model lists, and rate limits, and prompts behave differently across models. During the trial, settle on one connection and one model first, get the prompt and a usage baseline stable, and only then compare models. Trying all five connections at once means moving five variables together, and when something goes wrong you will not know whether the prompt or the model is at fault. Once the baseline is stable, the gateway's advantage — comparing prices and results side by side — becomes cheap to use.

One more thing to decide early: the model an agent uses in CI does not have to be the model a person uses in the IDE. A person in the IDE can accept a pricier, slower model because a person is waiting and watching; CI runs unattended batch jobs, and costs multiply by the number of builds, so price matters more. That is where gateways like LiteLLM and OpenRouter earn their keep: run routine tasks on a cheap model with the same prompt, and switch to a strong model only for hard jobs like failure analysis. The plugin itself does not do that routing, but by publishing usage as standard statistics it gives teams the data to build that split.

What it means for vibe coding teams

For teams that write code with AI, the plugin fills a gap that is easy to overlook: code is written by agents, so code should also be checked by agents — and the check should happen before merge, not when a person finds the time. The old flow was: the agent writes code locally or in the IDE, a person glances at it and merges, and CI only runs tests. Tests catch "it does not run"; they do not catch "it is ugly, it leaves a hole, the docs were not updated". The plugin puts a code-reading role inside CI, so review, failure analysis, and documentation updates can happen automatically in the pipeline.

But it raises a new question about division of labor: if agent-written code is reviewed by an agent, will two models just wave each other through? The plugin's current answer is the trajectory: every review leaves a record of what was said and which tools were called, and a person can sample trajectories afterwards to check whether the review was real. Whether that prevents "agents rubber-stamping each other" has no answer yet, because the plugin just launched and there is no large-scale usage data from real teams. The pragmatic approach is to start review tasks as "comments only, no automatic edits", keep the final decision with a person, and only open up automatic changes once enough trajectory data has accumulated for the team to judge review quality.

Another change worth noting: after a build fails, the traditional flow is a person reading logs, locating the problem, and fixing it. The plugin supports letting the agent analyze the failed build directly, which turns failure analysis from "someone's to-do item" into "a step in the pipeline". For small teams that saves late-night debugging time; for large teams it means the quality of failure analysis starts to depend on prompt quality rather than on one senior engineer's experience. Experience becomes a prompt that can be versioned and reused — a good thing, but only if the prompt is refined against real failure cases instead of shipped after a single draft.

How to try it: pick a build nobody depends on

If your team uses TeamCity and wants to try the plugin, the safest trial is: pick an unimportant build configuration — a nightly docs check, say, or a test-report summary — and wire it up for read-only tasks first. In week one, watch three things: whether the token statistics curve jumps unexpectedly, whether the agent's actions in the trajectory HTML match the prompt, and whether a prompt revision produces an observable change in results. If all three look normal, consider widening to failed-build analysis; code review that touches production code should wait until the team has an explicit approach to prompt-injection protection.

Whether to try it now depends on your tolerance for the word "experimental". JetBrains says features may change, which means today's configuration and trajectory format may look different tomorrow. The trial cost is low, but do not bet a critical flow on it. Wait until the plugin drops the experimental label and has a stable configuration format and a clearer permission model before talking about rolling it out widely.

Overall, the plugin matters not because "agents can run in CI" is new, but because it turns running agents from "each team stitches together scripts" into "the platform provides an auditable way of doing it". Short-lived keys, visible usage, and a paper trail are exactly the three things enterprises care about and script-based setups do worst. The feature is still experimental — worth trying, in a low-risk place.

Views 5Comments 0

Comments (0)

ME
0/1000
Loading comments...

Sources

Browse projectsPublish your project

Related articles

A developer with glasses types on a laptop at a wooden desk, an external monitor to the left showing C code on a dark background, a small plant on the desk
News
Microsoft's Coding Model Stops Playing Second Fiddle: MAI Code 2 Scores 96% of Opus 5.5 for 5% of the Cost — Read the Three Caveats First

On 17 November 2026, Microsoft launched MAI Code 2 and Code 2 Flash: the larger model has 77 billion active parameters and a one-million-token context, averaging 63.2% across four benchmarks — close to GPT-6.1 Sol and Claude Opus 5.5 — at $0.309 per task. Read the three caveats first: promotional pricing, the lowest score of the three, and no long-horizon work.

Developer WorkflowProduct LaunchModel Updates
A developer types at a dual-monitor workstation; the left screen shows a dark code editor, the right a testing dashboard with green checkmarks and bar charts
News
Did Your Agent Get Better or Worse? AWS Open-Sources UAEF to Measure Agents from Every Framework with One Ruler

On 11 November 2026, AWS open-sourced UAEF: adapters turn traces from LangGraph, LangChain, Strands and Bedrock AgentCore into one format, then 36 metrics across 7 dimensions score them, flagging regressions past 5%. The judge model is hardened too — scores must cite verbatim evidence, and never decide safety.

Developer WorkflowProduct LaunchTesting & Quality
Against a black background, a conductor seen from behind raises a baton, with swirling trails of light circling beneath him like an orchestra being conducted
News
One API for 45 Models, and It Switches Providers When One Fails: Perplexity's Orchestrator Wants to Be the Switchboard

On 17 November 2026, Perplexity launched the Orchestrator API: one interface reaching OpenAI, Anthropic, Google, xAI and open-weight models such as GLM, Kimi and DeepSeek, billed at the answering model's published rate with no platform fee. When one provider fails, the same model retries on another deployment, and preview routing assigns requests to models by task.

Developer WorkflowProduct LaunchModel Updates