Solution · Headless CI

Your agent runs on every pull request. Pay 20% to 23% less for each run.

Teams run a coding agent on every pull request and issue. Add two env lines to the job: same agent, same prompt, same model, and each run costs 20% to 23% less on 5 measured CI jobs.

CI job
Direct$0.0502
Through Context Mode$0.0420
Cost per run, Sonnet 5.5 and Opus 5.5Saves 22.8% per run95% range 11.6 to 32.2% · 14 of 16 tasks cheaper · $8 saved per 1,000 runs

Tests pass 16 of 16 direct, 15 of 16 with Context Mode (McNemar p = 1). Workflow · Tasks

Direct$0.1113
Through Context Mode$0.0872
Cost per run, Sonnet 5.5 and Opus 5.5Saves 21.8% per run95% range 10.3 to 32.1% · 16 of 19 tasks cheaper · $24 saved per 1,000 runs

Tests pass 9 of 19 direct, 10 of 19 with Context Mode (McNemar p = 1). Workflow · Tasks

Direct$0.0281
Through Context Mode$0.0223
Cost per run, Sonnet 5.5 and Opus 5.5Saves 22.4% per run95% range 15.5 to 27.7% · 24 of 26 tasks cheaper · $6 saved per 1,000 runs

Label F1 0.499 direct, 0.478 with Context Mode, inside the 0.05 margin. Workflow · Tasks

Direct$0.1691
Through Context Mode$0.1320
Cost per run, Sonnet 5.5 and Opus 5.5Saves 19.7% per run95% range 4.1 to 31.5% · 6 of 8 tasks cheaper · $37 saved per 1,000 runs

Tests pass 8 of 8 direct, 8 of 8 with Context Mode (McNemar p = 1). Workflow · Tasks

Direct$0.3350
Through Context Mode$0.2759
Cost per run, Sonnet 5.5 and Opus 5.5Saves 21.4% per run95% range 7.1 to 35.4% · 7 of 8 tasks cheaper · $59 saved per 1,000 runs

Tests pass 3 of 8 direct, 3 of 8 with Context Mode (McNemar p = 1). Workflow · Tasks

Who it is for

Teams that run an agent in CI on every PR or issue.

A job that runs often pays for the same prompt again and again. We scanned 3,530 GitHub repos with 12k+ stars. 167 of them run an agent in CI, in 374 workflows.

Use cases

The jobs teams run, and who runs them.

PR review

69 popular repos, such as storybookjs/storybook, astral-sh/uv, strapi/strapi and expo/expo.

@mention fix

81 repos let an agent turn an issue into a PR, such as anthropics/claude-code and ggml-org/llama.cpp.

CI failure fix

19 repos, such as n8n-io/n8n, firecrawl/firecrawl and pytorch/pytorch.

Issue triage and labels

31 repos, such as openai/codex, google-gemini/gemini-cli and microsoft/playwright.

Release notes

25 repos, such as openclaw/openclaw, openai/codex and astral-sh/uv.

Census 2026-10-31, public workflow files.

The saving

Lower cost per run, and money kept per 1,000 runs.

CI jobContext ModeDirectLower95% rangeSaved per 1,000 runs
CI failure fix, Sonnet 5.5 $0.0420 $0.0502 22.8% 11.6 to 32.2% $8
@claude fix (issue to PR), Sonnet 5.5 $0.0872 $0.1113 21.8% 10.3 to 32.1% $24
Issue triage and labels, Sonnet 5.5 $0.0223 $0.0281 22.4% 15.5 to 27.7% $6
CI failure fix, Opus 5.5 $0.1320 $0.1691 19.7% 4.1 to 31.5% $37
@claude fix (issue to PR), Opus 5.5 $0.2759 $0.3350 21.4% 7.1 to 35.4% $59

Claude Code headless on Sonnet 5.5 and Opus 5.5, 2026-11-01. Each task ran direct and through Context Mode, back to back. Tests and labels came out equal.

Proof

The plan came first. The raw rows are public.

The plan, written before the first paid run · the results · the raw rows · Method and sources →

Products used

What this uses.

Headless CI docs

The two commands, the env lines and each agent's install.

Context Saving

Long tool output is shortened before the model reads it.

Benchmarks

Every paired run, with its evidence file.

Plans

Your own account pays the model.

Keep your agent in CI. Pay for less of what it sends.

npx @context-mode/cli ci init writes the job. 10,000 requests free every month, no card.

Get started free

Context Mode Gateway: your coding agent costs less and remembers your project. Context Mode Engine installs from your terminal.

Start free: 10,000 requests, every feature, no card. After you sign in, the console gives you one command to connect your coding agent.

Read the docs