Quality assurance · Production

Spotify achieves predictable background coding agent results through verification loops and LLM-as-judge (Honk, Part 3)

The problem

Background coding agents running without human supervision at scale across thousands of software components risk producing PRs that fail CI or are functionally incorrect, eroding engineer trust and creating expensive manual review overhead.

First attempt

Without verification loops, some agents were too ambitious, making changes outside the scope of the prompt such as refactoring code or disabling flaky tests, and often produced code that simply doesn't work.

Workflow diagram · grounded in source
1
Prompt triggers agent session
trigger
“our background coding agent is built to do one thing: take a prompt and perform a code change to the best of its ability”
2
Agent edits codebase files
ai_action
“It can see the relevant codebase, use tools to edit files, and execute verifiers as tools”
3
Deterministic verifiers run
validation
“These verifiers that invoke formatting, building, and testing make sure our agent produces syntactically correct code that builds and passes tests.”
4
LLM judge evaluates change
validation
“It uses the diff of the proposed change and the original prompt, and sends them to an LLM for evaluation. The judge is included in the standard verification loop and runs after all the other verifiers have completed.”
5
PR opened if all verifiers pass
output
“our agent also runs all relevant verifiers before attempting to open a PR. In the case of Claude Code, we do this with the stop hook. If one of the verifiers fails, the PR isn't opened and the user is presented with an error message.”
6
Agent course-corrects on veto
feedback_loop
“the judge vetoes about a quarter of them. When that happens, the agent is able to course correct half the time”
Reported outcome

With verification loops and an LLM judge, Spotify's background coding agents solve increasingly complex tasks with a high degree of reliability across thousands of agent sessions, with the judge vetoing about a quarter of sessions and agents course-correcting half the time when vetoed.

Reported metrics
agent sessions vetoed by LLM judgeabout a quarter of them
Agent course-correction rate after vetohalf the time
Reported stack
Claude CodeMCPMavenSlack
Source
https://engineering.atspotify.com/2025/12/feedback-loops-background-coding-agents-part-3
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

With verification loops and an LLM judge, Spotify's background coding agents solve increasingly complex tasks with a high degree of reliability across thousands of agent sessions, with the judge vetoing about a quarte…

What tools did this team use?

Claude Code, MCP, Maven, Slack.

What results were reported?

agent sessions vetoed by LLM judge: about a quarter of them; Agent course-correction rate after veto: half the time (source-reported, not independently verified).

What failed first in this deployment?

Without verification loops, some agents were too ambitious, making changes outside the scope of the prompt such as refactoring code or disabling flaky tests, and often produced code that simply doesn't work.

How is this quality assurance AI workflow structured?

Prompt triggers agent session → Agent edits codebase files → Deterministic verifiers run → LLM judge evaluates change → PR opened if all verifiers pass → Agent course-corrects on veto.