Running an autonomous agent loop until it opened pull requests
Three scheduled agents, a shared memory, and the operational failures nobody documents
Attribution · The agent framework is Union.ai’s open-source Flyte agent loop. I did not write it. What follows is what I did with it: deploy it, run it end to end, debug it, and write down what broke.
Three pipelines wake on a schedule and share a durable memory. A builder reads a GitHub issue and proposes files; a stricter verifier agent decides whether the work is correct and complete, and the pull request opens only if it passes, retrying up to three times before releasing the issue. A distiller reads the history of past runs and consolidates it into lessons the builder and reviewer read as context on their next run — which is the part that makes it a loop rather than three cron jobs. I wrote four issues. The agents opened three pull requests without any further prompting.
- Below 10% free disk, kubelet marks the node under disk pressure and every pod stays pending. The only visible symptom is a connection reset on the API port — nothing in the error surface points at the disk.
- A fine-grained GitHub token is read-only by default and needs contents, issues, pull requests and discussions all set to read/write. Closing an issue additionally requires pull-request write on top of issue write, which is not obvious from the permission names.
- The shared memory needs two stores, not one. The save operation re-uploads the whole local tree, so with a single store a builder run silently overwrites lessons the distiller has just written.
- Coordination between overlapping runs is best-effort rather than a lock, because GitHub comments have no atomic compare-and-swap. The builder therefore re-checks for an existing pull request immediately before opening one.
- Flyte
- Python
- Docker
- Kubernetes
- GitHub API

