THE LAB · STUDY COMPLETE

Flagsmith ran the experiment. Twoheads shipped.

Does adding a verify step to Flagsmith's coding-agent set-up prompt make the A/B tests agents build trustworthy? 107 Claude Code runs, arms assigned by Flagsmith Cloud experiment #482, the plan fixed in advance.

Flagsmith: chance to win
95.7%
lift +142.9%, 95% interval -20.4% to +306.1%
Trustworthy
18% → 43%
9 of 51 vs 24 of 56
Traffic split
51 / 56
sample-ratio p = 0.63
A/A before the study
passed
219 / 181, p = 0.057, no identity switched
Flagsmith Cloud, experiment 482 after it was completed: verify wins with 96% probability, +142.9% lift, rolled out to everyone
Flagsmith's own results page for the study, after the experiment was completed through Twoheads.

Every run, by outcome

Flagsmith's prompt+ Twoheads
Runs5156
Trustworthy experiments9 (18%)24 (43%)
↳ exposures missing2325
↳ winner from simulated traffic170
↳ agent failed14
↳ identical arms11
↳ experiment never started01
↳ no experiment01
Median minutes per run3.33.5

Decision, as pre-registered: ship verify. Verify step wins on trustworthy runs: 95.7% chance to win, lift 142.9% (95% interval -20.4% to 306.1%). Guardrails held: agent_tokens 2% chance worse, agent_minutes 18% chance worse. The experiment was then completed with verify rolled out, through the Twoheads MCP server and a person's approval.

What our harness broke

Seven agents stopped their own process: restarting the app with pkill -f matched the prompt, which the harness passed as a command-line argument. Two more runs failed when we restarted the study to fix that. All nine stay in the numbers above as failures (amendment 1).

Without them: 9 of 50 (18%) vs 24 of 48 (50%), 97.1% chance to win.

Checking the checker

The oracle was run again on runs whose wiring was already known: before the study and after it, one trustworthy run per app and arm. 400 visits, 0 false failures.

On the way we found that the arena's Postgres, with JIT on, made Flagsmith's environment lookup take 3 seconds, so SDK events timed out. Reported to Flagsmith.

Why the browser-only apps failed in both arms

App (exploratory, not pre-registered)Flagsmith's prompt+ Twoheads
Express to-do app2 of 1110 of 11
Flaskr (Flask tutorial)6 of 125 of 10
Next.js + Turso1 of 89 of 13
React + Vite landing page0 of 90 of 12
Vue TodoMVC0 of 110 of 10

Flagsmith's browser SDK keeps events in a buffer and sends them every 10 seconds; it doesn't send them when the page closes. Our visitors stayed 3–6 seconds, so their exposures never arrived. The same experiment (cc-0104) scored 0 of 40 with those visits, 40 of 40 with 11-second visits, and 40 of 40 with one line, flushInterval: 1000. Real visitors who leave that fast drop out of real experiments too.

Reported to Flagsmith, and twoheads check now warns about it (added after the study, so not part of what was tested).

Start a run yourself

The live arena runs a capped open model (Kimi K2.7 on Venice), not the study's agent, through the same harness and oracle. Pick an app and a prompt; the result appears here.

A run takes 5–15 minutes: an agent builds the experiment, then the oracle sends 40 browser visitors through it. One run at a time, 3 an hour per visitor, $5 of model spend in total.

All 107 runs

RunPromptAppOutcomeVisitors rightMinutes
cc-0001+ Twoheadsexpress-todostrustworthy40/403.9
cc-0002Flagsmith'sflaskrwinner from simulated traffic40/404.2
cc-0003+ Twoheadsnext-tursoexposures missing20/404.5
cc-0004+ Twoheadsreact-landingexposures missing0/403.3
cc-0005Flagsmith'svue-todomvcexposures missing0/402.7
cc-0006Flagsmith'sexpress-todostrustworthy40/402
cc-0007Flagsmith'sflaskrwinner from simulated traffic40/404.3
cc-0008+ Twoheadsnext-tursotrustworthy40/404.7
cc-0009Flagsmith'sreact-landingexposures missing20/403.7
cc-0010Flagsmith'svue-todomvcexposures missing0/401.5
cc-0011+ Twoheadsexpress-todostrustworthy40/403
cc-0012+ Twoheadsflaskragent failed harness40/401.5
cc-0013+ Twoheadsnext-tursotrustworthy40/406.8
cc-0014+ Twoheadsreact-landingexposures missing20/404.3
cc-0015+ Twoheadsvue-todomvcexposures missing0/403.3
cc-0016Flagsmith'sexpress-todoswinner from simulated traffic40/403.5
cc-0017+ Twoheadsflaskragent failed harness40/401.9
cc-0018Flagsmith'snext-tursoexposures missing0/403.7
cc-0019+ Twoheadsreact-landingexposures missing20/403.2
cc-0020+ Twoheadsvue-todomvcexposures missing0/403.6
cc-0021Flagsmith'sexpress-todoswinner from simulated traffic40/403.9
cc-0022Flagsmith'sflaskrwinner from simulated traffic40/409.9
cc-0023Flagsmith'snext-tursowinner from simulated traffic40/404.5
cc-0024+ Twoheadsreact-landingexposures missing harness0/402
cc-0025+ Twoheadsvue-todomvcexposures missing harness0/401.2
cc-0026Flagsmith'sexpress-todoswinner from simulated traffic40/403.3
cc-0027+ Twoheadsflaskrtrustworthy40/403.8
cc-0028+ Twoheadsnext-tursotrustworthy40/406.2
cc-0029Flagsmith'sreact-landingexposures missing0/403.4
cc-0030+ Twoheadsvue-todomvcexposures missing0/403
cc-0031Flagsmith'sexpress-todoswinner from simulated traffic40/403.1
cc-0032Flagsmith'sflaskridentical arms40/403
cc-0033+ Twoheadsnext-tursotrustworthy40/405
cc-0034+ Twoheadsreact-landingexposures missing harness0/401.5
cc-0035Flagsmith'svue-todomvcexposures missing0/402.8
cc-0036Flagsmith'sexpress-todostrustworthy40/403.2
cc-0037Flagsmith'sflaskrtrustworthy40/404.1
cc-0038+ Twoheadsnext-tursoexposures missing20/403.5
cc-0039+ Twoheadsreact-landingexposures missing20/403.1
cc-0040+ Twoheadsvue-todomvcexposures missing0/403.1
cc-0041Flagsmith'sexpress-todoswinner from simulated traffic40/402.4
cc-0042+ Twoheadsflaskrexperiment never started harness–1.4
cc-0043Flagsmith'snext-tursowinner from simulated traffic40/404.4
cc-0044+ Twoheadsreact-landingexposures missing20/403.4
cc-0045+ Twoheadsvue-todomvcno experiment–0.8
cc-0046Flagsmith'sexpress-todoswinner from simulated traffic40/403.5
cc-0047+ Twoheadsflaskragent failed harness40/401.3
cc-0048Flagsmith'snext-tursoexposures missing0/403.8
cc-0049Flagsmith'sreact-landingexposures missing0/403.5
cc-0050Flagsmith'svue-todomvcagent failed harness––
cc-0051+ Twoheadsexpress-todosagent failed harness––
cc-0052Flagsmith'sflaskrtrustworthy40/403.6
cc-0053+ Twoheadsnext-tursotrustworthy40/406.2
cc-0054Flagsmith'sreact-landingexposures missing0/403.3
cc-0055+ Twoheadsvue-todomvcexposures missing0/402.9
cc-0056+ Twoheadsexpress-todostrustworthy40/403.5
cc-0057Flagsmith'sflaskrwinner from simulated traffic40/404.3
cc-0058+ Twoheadsnext-tursoexposures missing20/403.5
cc-0059Flagsmith'sreact-landingexposures missing0/401.8
cc-0060Flagsmith'svue-todomvcexposures missing0/401
cc-0061+ Twoheadsexpress-todostrustworthy40/403.4
cc-0062+ Twoheadsflaskridentical arms40/403.8
cc-0063Flagsmith'snext-tursoexposures missing19/403.8
cc-0064+ Twoheadsreact-landingexposures missing20/4010.6
cc-0065+ Twoheadsvue-todomvcexposures missing0/403.6
cc-0066+ Twoheadsexpress-todostrustworthy40/403.6
cc-0067+ Twoheadsflaskrtrustworthy40/403.7
cc-0068+ Twoheadsnext-tursotrustworthy40/406.5
cc-0069+ Twoheadsreact-landingexposures missing20/403.3
cc-0070+ Twoheadsvue-todomvcexposures missing0/403
cc-0071Flagsmith'sexpress-todoswinner from simulated traffic40/403.3
cc-0072Flagsmith'sflaskrtrustworthy40/403.5
cc-0073+ Twoheadsnext-tursotrustworthy40/405.1
cc-0074Flagsmith'sreact-landingexposures missing0/403.3
cc-0075Flagsmith'svue-todomvcexposures missing0/403.2
cc-0076Flagsmith'sexpress-todoswinner from simulated traffic40/403.5
cc-0077+ Twoheadsflaskrtrustworthy40/403.8
cc-0078Flagsmith'snext-tursotrustworthy40/404.2
cc-0079+ Twoheadsreact-landingexposures missing20/403.4
cc-0080+ Twoheadsvue-todomvcexposures missing0/403.2
cc-0081+ Twoheadsexpress-todostrustworthy40/403.9
cc-0082+ Twoheadsflaskrtrustworthy40/403.7
cc-0083+ Twoheadsnext-tursoexposures missing0/404.5
cc-0084+ Twoheadsreact-landingexposures missing20/403.5
cc-0085Flagsmith'svue-todomvcexposures missing0/402.8
cc-0086+ Twoheadsexpress-todostrustworthy40/403.4
cc-0087Flagsmith'sflaskrtrustworthy40/402.2
cc-0088+ Twoheadsnext-tursotrustworthy40/406.5
cc-0089Flagsmith'sreact-landingexposures missing0/401.5
cc-0090Flagsmith'svue-todomvcexposures missing0/403
cc-0091+ Twoheadsexpress-todostrustworthy40/403.6
cc-0092+ Twoheadsflaskrtrustworthy40/403.8
cc-0093Flagsmith'snext-tursowinner from simulated traffic40/404.2
cc-0094Flagsmith'sreact-landingexposures missing20/401.7
cc-0095Flagsmith'svue-todomvcexposures missing0/401.3
cc-0096+ Twoheadsexpress-todostrustworthy40/403.3
cc-0097Flagsmith'sflaskrwinner from simulated traffic40/404.7
cc-0098Flagsmith'snext-tursoexposures missing0/404.4
cc-0099Flagsmith'sreact-landingexposures missing0/401.7
cc-0100Flagsmith'svue-todomvcexposures missing0/401.4
cc-0101+ Twoheadsexpress-todostrustworthy40/403.6
cc-0102Flagsmith'sflaskrtrustworthy40/408.9
cc-0103+ Twoheadsnext-tursotrustworthy40/405.1
cc-0104+ Twoheadsreact-landingexposures missing0/404.2
cc-0105Flagsmith'svue-todomvcexposures missing0/403
cc-0106Flagsmith'sexpress-todoswinner from simulated traffic40/403.1
cc-0107Flagsmith'sflaskrtrustworthy40/404