One morning I opened Camelot and saw a card stuck in the executing column.
The agent had been "working" on it since the previous day.
The funny part is that the work was already done. The agent had written the
code, pushed the branch, opened a pull request, and I had merged it myself the
evening before. The board just didn't know about any of that.
This post is about why that happened, and about the piece of code I had to
write to make it stop. It seems to be a piece of code that many Elixir projects
eventually need and few of us plan for: a controller loop that reconciles what
the database believes with what the infrastructure is actually doing.
How Camelot runs agents
Camelot AI runs coding agents on a kanban board. You
create a task, an agent plans it, you approve the plan, the agent implements it
and opens a PR.
Each agent runs inside its own container. In production that means a Docker
Swarm service per task, and the BEAM talks to the Swarm manager over an HTTP
socket proxy.β¦