FILED 01 Dec 2026 5 MIN READ EN

Self-Hosted Coding Agents Need Small Workflows

Self-hosted coding agents are useful when they take a repeatable unit of work off an engineer’s plate. They become a liability when we build a miniature company around them before we can show what work they finish. My default is a small workflow with clear permissions and a human at the boundary where risk changes.

That distinction matters in the recent “software factory” discussion. Dmitry Kudryavtsev’s November 29 write-up describes an always-on, self-hosted agent setup.

The Hacker News thread had 103 points and 42 comments at the December 1 scan. That signals interest and debate, but says little about whether a factory fits every team.

Self-hosted coding agents need a bounded workflow

Kudryavtsev’s setup has useful engineering ideas: isolated development machines, separated service and runner networks, proxied agent application programming interface (API) keys, and production credentials kept outside development. Those are security boundaries enforced by infrastructure. A prompt asking an agent to avoid secrets cannot enforce that boundary.

The task path is explicit, too. A Forgejo issue can move through research, plan, and implementation stages.

Recurring jobs run with fewer privileges and send proposed outputs through a verifier. The operator can inspect sessions, steer an agent, review changes, and approve main-branch deployment.

I like the separation of duties. I would avoid copying the whole stack just because it is technically interesting. Kudryavtsev notes the maintenance surface himself: custom orchestration, provisioning, network rules, and services need care.

A system that saves minutes per task but creates a second platform to maintain may simply relocate the toil.

What should an AI agent workflow automate?

Start with a work unit that already has a crisp definition of done. Good candidates include investigating a test failure, preparing a documentation update, or implementing a small issue with reproducible checks.

“Improve the product” is too vague to define a task. It is a way to discover that your agent has been busy for an hour and nobody knows what success looks like.

For each workflow, write down:

  • Input: the issue, repository state, and context the agent may use.
  • Allowed output: for example, a proposed branch or draft pull request.
  • Checks: tests and policy validations that must pass before review.
  • Stop point: the decision that requires a human to continue.

This is the practical core of AI agent workflow design. Scope the job before adding a scheduler, dashboard, or fleet manager.

If one issue template and a continuous integration check cover the use case, that is a good system. A factory-shaped logo adds nothing.

Secure agent orchestration means separating authority

Kudryavtsev’s article shows why self-hosting alone is insufficient for agent security. Infrastructure limits what a compromised or misdirected agent can reach.

His development virtual machines (VMs) are separated from service infrastructure. The continuous integration (CI) runner is isolated, while deployment keys sit in Semaphore rather than Forgejo secrets available to development jobs. API keys are proxied instead of stored in each VM.

The exact products matter less than the boundary. Code-editing authority and production deployment rights are separate privileges. A recurring job reading external or unvalidated input warrants fewer permissions than a human-authored issue.

Keep credentials and deployment authority outside the agent’s working environment, then make the approved transition explicit.

I have used Hermes for multi-agent workflows. That experience makes security boundaries concrete in my work on Dagango.com’s multi-tenant Next.js and FastAPI monorepo. Changes to data access need tests for tenant isolation, and an agent’s patch still needs review.

Human-in-the-loop development needs a real stop point

“Human in the loop” means more than a checkbox beside a workflow diagram. The human needs enough information to judge the change, and authority to stop it. In Kudryavtsev’s flow, work lands through issues and pull requests, sessions remain inspectable, and main-branch deploys wait for review and approval.

That is a more useful measure than PR volume. Count outcomes that survive review and the review effort they consume. A hundred generated changes have little value if someone spends the week sorting them.

One recurring task that reliably produces a small, verifiable patch may be worth keeping.

Before expanding an agent workflow, compare it with the manual baseline:

  • How often is the proposed output accepted without substantial rework?
  • How much engineer time does review and correction take?
  • What is the blast radius if the agent or verifier is wrong?

If you cannot answer those questions, add measurement before adding more orchestration. Interest on Hacker News is a useful prompt to inspect the idea. Your repository needs to supply the evidence.

Keep project knowledge in the repository

Kudryavtsev stores short project guidance in AGENTS.md and longer material in versioned Markdown under docs/. That choice makes sense for disposable development machines: the conventions an agent should follow survive a VM rebuild. A repository is also a place teammates can review and update those rules.

Keep the guidance actionable. Put stable commands, architecture constraints, and tenant-safety expectations where both engineers and agents can find them.

Keep the file focused on reusable guidance rather than a diary of every session. Attach important rules to checks when possible; prose alone cannot enforce a boundary.

My takeaway is simple: earn the factory one workflow at a time. Choose a narrow task, give it only the permissions it needs, make its output reviewable, and measure accepted results against the manual process. Expand only when the numbers and the security model both hold up.

FAQ

What should determine whether an agent gets its own virtual machine?

No. Kudryavtsev uses disposable project VMs as part of his isolation model. The right boundary depends on what the agent can access and what damage a compromised environment could do. Start from the threat model and likely impact.

Can an agent safely deploy after its pull request passes tests?

Passing tests alone cannot grant deployment authority. Keep production credentials separate and define who approves the deploy. Tests reduce uncertainty; accountability remains with the people operating the system.

What should we measure before adding more automation?

Track accepted outcomes, rework, and human review time against the manual baseline. Also record failures that cross the workflow’s intended boundary. More generated pull requests alone say little about delivery value.