vivivi.games

← Dev log | 日本語版

Where I got stuck connecting GitHub

Article one. Last time I wrote "start with GitHub, whatever else you do" — but actually connecting it turned out to be where I got properly stuck. Here's how the connection works, what tripped me up, and how I ended up moving to Composio.

At first, everything happened inside the chat

When the HTML behind this scene passed 1 MB, the chat workflow broke down
When the HTML behind this scene passed 1 MB, the chat workflow broke down

Early on, the whole game lived in a single HTML file that I pasted back and forth in conversation with the AI. Paste the file, get the fixed version back, paste it again. Once the file passed a few hundred kilobytes, this fell apart.

Going through GitHub solves all three. The latest is on main. The differences are visible in the PR. The reasoning survives in the Issue. Obvious, really — but if you start out treating it as "a conversation with an AI", it's easy to put off.

How the connection works now

Three paths, used together.

1. Issues as the starting point for implementation

The flow goes like this. First I tell the AI in chat what I want. The AI organises that into a goal, a list of changes and a definition of done, and files it as a GitHub Issue. If that Issue mentions the AI, a second AI branches off, edits the code and opens a PR. I look at the diff and the preview, and if it's fine I say "merge it" — the AI performs the merge itself.

So what I write is the chat instruction, not the Issue. The AI writes the Issue. Turning a vague request into something implementable is the AI's job; my job is checking that the translation is right.

The real benefit is that large files never touch the chat. The AI works inside the repository.

2. Calling the GitHub API from the chat side

Filing Issues, checking PR status, reading and writing small files, re-running workflows — the lightweight operations happen straight from the chat. This is where most of the pain was, as you'll see below.

3. The decision to merge is mine; the operation is the AI's

Nothing reaches production until I say "merge it". The judgement is mine, the merge and deploy are performed by the AI. That the AI never merges unprompted is written into the rules document.

Things to watch out for

Getting to Composio

I rebuilt the path between the chat and GitHub several times.

First: a Docker-based connection

I started by connecting Claude's desktop app to GitHub via MCP. That connection runs on top of Docker, which means Docker Desktop has to be running first.

That turned out to be quietly exhausting.

My troubleshooting notes from that period still exist: "Docker not found → check Docker Desktop is running", "MCP connection error → full quit and restart", "no MCP response in an existing chat → continue in a new chat". Time meant for development was going into keeping the connection alive.

Then: switching to Composio

A few months later, Claude became able to use Composio, a general-purpose tool-integration service.

The trigger was simple. The Docker connection kept failing, and a Docker-based connection only works on the machine that's running it — nothing could be done from a phone while out. So I asked Claude, "isn't there something better?", and it suggested going through Composio to hit the GitHub API directly.

After switching: no Docker. I can work from a phone without turning on the computer. The AI can check whether the connection is alive. Fine-grained operations like fetching a file's SHA or re-running a workflow all became possible.

The trade-off is that there's more to remember — how to call the API, the shape of the response, how to retry on failure. Having the AI rediscover all that every time is wasteful, so I keep a document in the repository saying "for this operation, call this API like so", and have the AI read it.

The criterion I used

Simple: can I work out what's wrong when it breaks? The Docker connection was comfortable while it worked, but when it stopped neither the AI nor I could tell what was happening — and it only worked while sitting at the computer. A slightly more manual path whose insides are visible lasts longer.

What I wish I'd known

Series: "I wish I'd known this from the start"

← Back to the dev log