Cody — my personal background coding agent

Apr 11, 2026

Cody

For the last few months, I have been running a background coding agent built using OpenCode on a VPS.

I was inspired by Ramp Inspect and other implementations and wanted to see how far I can push it.

I started with a tall order for the agent to be useful and worth investing my time in.

What I want the agent to do

I want the coding agent to handle the following tasks (almost) autonomously:

The litmus test

What would make this agent actually useful to me? It needs to be able to:

Enter OpenCode

OpenCode terminal

OpenCode is a really great agent. It exposes an HTTP interface and you can spawn as many instances as you want. But managing multiple sessions and projects was getting complex, so I built a small script used for high-level project management.

Caddy setup

In order to expose multiple projects on custom subdomains, I decided to use a proxy server. I started with nginx but didn’t like the setup. Then I found Caddy — really simple and straightforward.

Here’s a sample config that reverse-proxies to OpenCode instances running on different ports for better isolation:

*.example.com {
    tls {
        dns digitalocean {env.DO_AUTH_TOKEN}
    }

    @app1 host app1.example.com
    handle @app1 {
        reverse_proxy localhost:4096
    }

    @app2 host app2.example.com
    handle @app2 {
        reverse_proxy localhost:4097
    }

    handle {
        abort
    }
}

Tools

In the default setup, OpenCode can only make changes locally on the server. But I wanted it to use the same tools I have access to as a dev. So I set up:

Using OpenClaw as an orchestrator

BerryClaw on Raspberry Pi

I gave this setup to BerryClaw — my personal OpenClaw instance running on a Raspberry Pi — and used it to manage multiple projects.

Results

BerryClaw, with the help of this background coding agent:

I’ll keep improving this agent, but I’m happy with where it is now.

References