Once agents increase commit throughput, the expensive part is no longer writing code. It is repeatedly verifying, building, and deploying it. So the build system has to move closer to controlled hardware, while the hosted platform becomes a dumb artifact receiver.
Author: James Phoenix | Date: July 2026
The Hosted Build Was Convenient at Human Speed
For years the default web deployment loop was obvious. Push to GitHub, let the hosted platform notice the commit, install dependencies, build the app, create a preview, and serve it. That was a good abstraction when a human pushed a handful of meaningful commits each day.
At that pace, the build host was not only a deployment target. It was also a casual verification machine. If TypeScript failed, the hosted build failed. If the frontend bundle was broken, the preview failed.
Agentic coding changes the denominator. The commit button is no longer pressed by one tired human at the end of a considered change. It is pressed by loops, worktrees, canary fixes, cleanup passes, and narrow agents moving faster than the old process expected. A platform build that felt cheap at five commits a day becomes a tax at thirty or fifty. That is the point where hosted builds stop being an abstraction and start being a leak. I am no longer paying the edge to serve a finished artifact. I am paying it to find out whether my code compiles.
Verification Belongs Near the State
The feedback loop for an agent is not the public deployment. It is the verifier: format, lint, typecheck, unit tests, integration tests, migration checks, codegen checks, and the frontend build. That loop wants the actual repo checkout, the pnpm store, the turbo cache, the test database, the Redis namespace, the Temporal task queues, and the logs.
For my setup, that place is the Mac Studio self-hosted GitHub Actions runner. It has the horsepower, local caches, and test services. Its job is to absorb noisy agent throughput: run cheap lanes constantly, run deeper lanes at the PR boundary, and build the artifact only when the code is worth shipping.
The edge should not be the first machine to discover that TypeScript failed. By the time an artifact is uploaded, the artifact should already have earned the right to exist.
The New Shape
The clean architecture is simple:
agent branch or PR
-> Mac Studio GitHub runner
-> install from local cache
-> lint, typecheck, tests, integration checks
-> Vite build
-> upload dist/ to Cloudflare Pages
Cloudflare Pages is then the static delivery layer, not the build engine. The frontend is a Vite artifact. Vite’s default production output is dist, which is exactly what a static host wants: a directory of prebuilt assets.
Cloudflare Pages Direct Upload is the important mode here. Its docs frame Direct Upload as the path for a custom build platform or prebuilt assets, which is precisely the agentic use case. Git Integration recreates the old problem: the platform watches pushes and turns commit volume into hosted builds.
For OctoSpark, the rest of the stack becomes clearer too:
Cloudflare Pages
static Vite frontend
Effect HTTP API
typed backend contract
auth/session context
domain services
observability
Temporal and workers
durable jobs
retries
publishing and render workflows
R2 or object storage
generated media
videos
captions
render artifacts
The important boundary is the Effect HTTP API. The Vite app is a UI shell. It talks to the backend through the API contract. It does not import repositories, service layers, workflow internals, database types, or server config. Shared code should stay boring: schemas, branded IDs, request and response types, and the client.
That boundary makes the build split honest. If the frontend depends only on the HTTP contract, the web lane can stay cheap unless the contract changes.
Hosted Platforms Should Serve, Not Decide
The mistake is bundling four jobs together:
- Decide whether a change needs a deploy.
- Verify that the change is correct.
- Build the deployable artifact.
- Serve the artifact to users.
At human speed, bundling those jobs is convenient. At agent speed, it is expensive and hard to reason about. The decision needs git history, path filters, package graph knowledge, labels, and confidence boundaries. Verification needs repo-local state. Artifact creation needs caches. Serving needs global edge infrastructure.
Those are different jobs. They do not all belong on the same platform. The deployment host should serve. The build machine should decide.
The Policy I Want
The policy is deliberately boring:
agent local loop
affected lint, typecheck, and focused tests
push or draft PR
cheap self-hosted checks
ready PR
relevant integration lanes and Vite build on the Mac Studio
merge to staging or main
build once, upload prebuilt assets
preview deploy
explicit label or manual command
That policy has one core invariant: no agent-generated change should trigger expensive hosted infrastructure until it crosses a confidence boundary.
A random agent commit is not a release candidate. A docs-only change is not a reason to rebuild the frontend. A backend-only change is not a reason to upload a static site. Once those distinctions are explicit, the pipeline stops behaving like a slot machine.
Self-Hosted Is Not Magic
Moving builds to a Mac Studio does not remove engineering discipline. It moves the discipline closer to home. Two parallel GitHub Actions workers is a reasonable starting point because it gives throughput without turning the machine into a contention factory. More workers are not automatically better. They compete for CPU, disk, Docker, Postgres, Redis, pnpm stores, test ports, and local services.
The runner contract has to be explicit:
- Each job gets an isolated workspace.
- Redis keys are prefixed by run and attempt.
- Postgres schemas or databases are unique per job.
- Temporal task queues and ports are deterministic per run.
- Caches, concurrency groups, and cleanup jobs are measured against the real hardware.
Self-hosting is cheaper because the hardware is already paid for and agents can operate the boring parts. It is not cheaper if the machine becomes a mutable shared-state box that produces flakes nobody trusts.
The Rule
I do not want to pay a hosted platform to discover that a generated diff is bad. I want my own verification machine to say either:
no artifact exists
or:
this artifact passed the checks and is ready to upload
That is the abstraction shift. Hosted builds made sense when code creation was slow and build frequency was low. Agentic coding makes code creation cheap and build frequency high. The answer is not to stop using hosted platforms. It is to narrow their job.
Build near the truth. Serve near the user.
Related
- Agents Broke the Economics of Your CI – The diagnosis: agent throughput multiplies every per-build leak.
- When Parallelism Makes Tests Slower – The test-loop side of the same throughput problem.
- The Harness Is Cheaper Now – Why verification has become the main engineering product.
- The Ops Tax Was the Real Cost of Self-Hosting – Why agents make local infrastructure more viable.
- Cloudflare Pages Direct Upload – Official docs for uploading prebuilt assets.
- Vite build options – Official docs for
build.outDir, whose default isdist.

